-
Notifications
You must be signed in to change notification settings - Fork 480
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 watch-namespace #79
Conversation
ecd0dcc
to
ce21222
Compare
Can you change this to instead inject arbitrary CLI arguments to the controller? We need to do this to make it easy enough for folks to override other properties via CLI flags. |
Yes, i can do this. Did you mean something like that?
And one more question. What with hardcoded arguments in |
No. Let's move them over to the values.yaml file as well so that a user can change them, if needed. |
Now this is a little bit more complicated, but we have all default arguments and we can replace them when we define the same argument in args Map. |
954f718
to
10c0a80
Compare
In values.yaml, we can simply add and keep this simple: ingressController
args:
- --flag=value1
- --bolean-flag
- --flag2=value2 Users can inject any flag and edit the default as well. |
I prefer simple solution but what if someone use arguments like that:
Which values should have higher priority for |
Specifying via args should have a higher priority. Some background: Only logging based variables are not yet supported by environment variables, which is why we want to merge this PR in. |
This will be more difficulty and less readable to check if in args array exist some key when not exist generate default e.g |
bd471c3
to
db2e769
Compare
db2e769
to
9833117
Compare
charts/kong/templates/_helpers.tpl
Outdated
{{- else }} | ||
- --kong-url=http://localhost:{{ .Values.admin.containerPort }} | ||
{{- end }} | ||
{{- if .Values.ingressController.admissionWebhook.enabled }} | ||
- --admission-webhook-listen=0.0.0.0:{{ .Values.ingressController.admissionWebhook.port }} | ||
{{- end }} | ||
|
||
|
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.
Please remove these line jumps.
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.
Done
This looks good to me since going forward, users should add CLI args only for logging related settings. |
@hbagdi you mean migrate Post-0.8 is there any reason you'd still use CLI arguments over their equivalent variable? It almost seems like it'd make more sense to wait and have users use environment variables only, since we wouldn't have any means of avoiding conflicts between envvar/CLI settings. |
Yes.
Yes, because Kong/kubernetes-ingress-controller#506. |
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.
Ah, okay, I thought 0.8 was going to add support also.
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.
This is looking good and we would like to merge it in.
Please also add a test case to an existing test (don't add another test file as it puts pressure on the CI).
Add a harmless argument like --ingress-class=test-kong
or something like that. A logging arg would be even better. Full list here: https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/references/cli-arguments.md.
Thank you for pushing through this even though the purpose of the PR changed significantly.
charts/kong/README.md
Outdated
- [Prerequisites](#prerequisites-1) | ||
- [Kong Enterprise License](#kong-enterprise-license) | ||
- [Kong Enterprise Docker registry access](#kong-enterprise-docker-registry-access) | ||
- [Service location hints](#service-location-hints) | ||
- [RBAC](#rbac) | ||
- [Sessions](#sessions) | ||
- [Email/SMTP](#emailsmtp) | ||
- [Changelog](https://github.com/Kong/charts/blob/master/charts/kong/CHANGELOG.md) | ||
- [Seeking help](#seeking-help) |
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.
Please remove changes to this table.
charts/kong/README.md
Outdated
@@ -276,6 +283,7 @@ section of `values.yaml` file: | |||
| installCRDs | Create CRDs. Regardless of value of this, Helm v3+ will install the CRDs if those are not present already. Use `--skip-crds` with `helm install` if you want to skip CRD creation. | true | | |||
| env | Specify Kong Ingress Controller configuration via environment variables | | | |||
| ingressClass | The ingress-class value for controller | kong | | |||
| args | Map of ingress-controller cli arguments | {} | |
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.
The description is outdated. It should be an array and not a map.
charts/kong/values.yaml
Outdated
@@ -191,6 +191,7 @@ ingressController: | |||
image: | |||
repository: kong-docker-kubernetes-ingress-controller.bintray.io/kong-ingress-controller | |||
tag: 0.7.1 | |||
args: |
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.
Please initialize with an empty array []
to set the user expectation that this is an array.
@wopol Thank you for your contribution. Please fill in the contributor form to claim your Kong swag: https://github.com/Kong/kong/blob/master/CONTRIBUTING.md#contributor-t-shirt. |
Adding support for watch-namespace in chart