-
Notifications
You must be signed in to change notification settings - Fork 470
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
[kong] add support for controller-only deployments #136
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should highlight/comment kong_url and publish_service properties in the value file like we do for the admin token
kong_url: http://kong-admin.kong.svc:80 admin api url in the cluster
publish_service: kong/kong-proxy **proxy service **
Covered in the standalone readme section
This seems like a hack and a bad one. Such global conditional flags usually cause more trouble in the long run and provide a terrible user-experience. Reading from the diff, I see:
After reading through the values.yaml file, I figured out why you did this. It seems like everything specific to Kong is being governed at the root level and hence adding an I don't think adding a root level What instead we can do is think of this change in terms of change in behavior of the single deployment resource. So what if we do: introduce a property to tweak deployment behavior: |
I agree that the lack of structure is bad, but it's the lack of structure we already have. There are a lot of things scattered around the root level that apply to the Deployment that could be better gathered together like so:
However, I don't think we should move to that new style piecemeal. Controlling the Kong container via I think having the standalone This satisfies #135 by disabling both along with the existing "this isn't Helm 2" flag:
This isn't perfectly exhaustive--there are things like pdb.yaml that I haven't explicitly conditioned on the Deployment, but it should catch all the defaults. We can make it explicit if desired. That's in kind of a weird place as far as configuration. It uses the existing flag for Helm 2, even though it's nested under the controller settings and makes the if condition a mess (whatever, we probably won't need to touch it again and Helm 2 will eventually go away). For Helm 3 I don't think we can really add a dedicated "install CRDs" toggle--it doesn't appear that you can place template directives in CRDs at all. Something like this renders nothing:
So I don't think there's any way to handle CRD-only with the standard
https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#some-caveats-and-explanations I believe that adds new additions, but won't update, for instance, KongPlugin to include |
Although confusing, I'd recommend doing a
Let's do the disabling all the templates part. Any risks with that? |
Add a new top-level `enabled` setting that controls whether the chart deploys Kong and its associated resources. Setting this to `false` allows users to create controller-only deployments.
Reconcile docs with upstream changes, fix outdated example, and add comment for complex truth table.
0c4cc97
to
b6723aa
Compare
FP for the release. b6723aa has changes for the comments. |
Add a new top-level `deployment.kong.enabled` setting that controls whether the chart deploys Kong and its associated resources. Setting this to `false` allows users to create controller-only deployments. Allow for CRD-only deployments by setting the above to `false`, `ingressController.enabled` to `false`, and `ingressController.installCRDs` to `true`.
What this PR does / why we need it:
Add a new
enabled
setting to values.yaml. When set totrue
, Kong and associated resources are rendered. When set to false, they are not.This allows deploying the controller alone, which has been requested often.
Special notes for your reviewer:
CCed Satwant as he asked about this recently.
I'm not thrilled about the naming, and feel like we should eventually move the Kong-specific top-level configuration under a
kong
block. That's breaking, however, so we can't do it in the near future.Thoughts on whether there's some better name we can use for this?
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
next
branch and targetsnext
, notmaster
[kong]
)