Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(KongConsumer) delete consumers not present in k8s #81

Merged
merged 1 commit into from
Aug 13, 2018

Conversation

hbagdi
Copy link
Member

@hbagdi hbagdi commented Aug 11, 2018

Problem:
When KongConsumer custom resource is created, a consumer entity is
created in Kong. But when the custom resource is deleted in k8s, the
change is not propagated to Kong. This results in an odd and confusing
behavior(#58) where consumers can be created but never deleted in Kong via
ingress controller.

Solution:
Perform complete sync like we do for all other entities in Kong. This
means that after this change, consumers present in Kong but not present
in k8s will be deleted.
This reverses the past decision of allowing users to manage consumer entity in Kong via ingress controller and by other means outside the controller.

The long term solution will involve storing more metadata in Kong to
detect if an entity is created by the ingress controller or via another
mechanism.

Breaking change:
Consumers created in Kong directly will be deleted if the corresponding
custom resource (KongConsumer) is not present in k8s object store.

Problem:
When KongConsumer custom resource is created, a consumer entity is
created in Kong. But when the custom resource is deleted in k8s, the
change is not propagated to Kong. This results in an odd and confusing
behavior(#58) where consumers can be created but never deleted in Kong via
ingress controller.

Solution:
Perform complete sync like we do for all other entities in Kong. This
means that after this change, consumers present in Kong but not present
in k8s will be deleted.

The long term solution will involve storing more metadata in Kong to
detect if an entity is created by the ingress controller or via another
mechanism.

Breaking change:
Consumers created in Kong directly will be deleted if the corresponding
custom resource (KongConsumer) is not present in k8s object store.
@codecov-io
Copy link

codecov-io commented Aug 11, 2018

Codecov Report

Merging #81 into master will decrease coverage by 0.1%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #81      +/-   ##
==========================================
- Coverage   32.28%   32.17%   -0.11%     
==========================================
  Files          33       33              
  Lines        2850     2859       +9     
==========================================
  Hits          920      920              
- Misses       1817     1826       +9     
  Partials      113      113
Impacted Files Coverage Δ
internal/ingress/controller/kong.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c97c4b6...05b7493. Read the comment docs.

@hbagdi hbagdi merged commit c429230 into master Aug 13, 2018
@hbagdi hbagdi deleted the feat/delete-consumers branch August 13, 2018 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants