-
Notifications
You must be signed in to change notification settings - Fork 780
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
Helm enable to config controller manager & audit port #1438
Helm enable to config controller manager & audit port #1438
Conversation
The current port can be taken when running in hostNetwork mode Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
e3401b0
to
c6d2c89
Compare
Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
5220174
to
e3c1c7f
Compare
Remove the config for healthz port due to using a string instead of int. |
This way we can still easily define the port but not the addr. I think it's a good enough middle way. Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
Re-added the healthz probe again and ignored the address feature. For now just adding port support. |
For some reason that I don't know I can't get the
to work. When I try to run with the default value of 9090 i get: The generated value:
I assume I do some easy stupid error, if someone can point me in the correct direction it will be a quick fix. {"level":"error","ts":1626271697.9305024,"logger":"setup","msg":"unable to start manager","error":"error listening on \":9090\": listen tcp: address tcp/9090\": unknown port","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/github.com/go-logr/zapr/zapr.go:132\nsigs.k8s.io/controller-runtime/pkg/log.(*DelegatingLogger).Error\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/log/deleg.go:144\nmain.main\n\t/go/src/github.com/open-policy-agent/gatekeeper/main.go:171\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225"} |
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.
Thanks for the PR! WRT port numbers, I think the "
quotes may be being included in the string argument, try dropping them?
Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
eeb5cc6
to
077d4e6
Compare
Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
1171bb6
to
02fdf0b
Compare
Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
Also remove some withespace Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
Update the GKE docs since we use the name webhook-server you don't have to update the svc targetPort. Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
e7a9438
to
6a74339
Compare
targetPort: 8443 | ||
targetPort: webhook-server |
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.
Realized I need to change the gatekeeper-webhook-service port.
Instead of changing this using kustomize i changed this in the config file instead and use the name.
Thanks to this it will also simplify the GKE usage since they won't have to update the service since we are using the port name instead of the port number, I have updated the docs accordingly.
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.
Perfect!
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.
LGTM! Thanks for the PR!
targetPort: 8443 | ||
targetPort: webhook-server |
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.
Perfect!
Codecov Report
@@ Coverage Diff @@
## master #1438 +/- ##
==========================================
- Coverage 52.03% 51.95% -0.08%
==========================================
Files 83 83
Lines 7593 7593
==========================================
- Hits 3951 3945 -6
- Misses 3263 3265 +2
- Partials 379 383 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Thanks for all your help @maxsmythe do you want me to squash the commits or is it something that you do when you merge? |
- --port=8443 | ||
- --port=HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_PORT | ||
- --health-addr=:HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_HEALTH_PORT | ||
- --prometheus-port=HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_PROMETHEUS_PORT |
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.
thoughts about calling this metrics-port
? since the exporter can target more than Prometheus
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.
Sounds reasonable, i will update PR when i get to work tomorrow or later tonight.
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.
I guess the main reason why I used prometheusPort is due to that the flag is --prometheus-port
but if you change this flag in the future to make it more generic we won't have to change the helm values at least :)
I will just verify the change locally and then I will update the PR.
@NissesSenap no need to squash manually, we'll squash merge when PR merges |
Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
Anything needed to move this PR forward? Would be great if we can get this merged. |
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.
Sorry for the delay. LGTM
No worries, thank you |
…ent#1438) Co-authored-by: Sertaç Özercan <852750+sozercan@users.noreply.github.com>
What this PR does / why we need it:
The current port can be taken when running in hostNetwork mode.
To work around this I want to be able to configure the controller-manager port in the helm chart.
Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):Fixes #
Special notes for your reviewer: