-
Notifications
You must be signed in to change notification settings - Fork 335
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(helm): helm chart improvements #4220
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.
Thanks for the contrib!
I'm not opposed to any of these changes.
They make sense and provide more flexibility to the chart. I have a few comments which are mostly aesthetic.
deployments/charts/kuma/templates/cp-additional-k8s-secrets.yaml
Outdated
Show resolved
Hide resolved
Thank you @lahabana for the fast review! I will make updates or respond to feedback ASAP. Might take a few days. |
cbc19f1
to
ae34250
Compare
This includes a change to how affinty is defined so it is more flexible and can be removed entirely if desired. Signed-off-by: Michael Younkin <michael@goodrx.com>
Signed-off-by: Michael Younkin <michael@goodrx.com>
Signed-off-by: Michael Younkin <michael@goodrx.com>
Signed-off-by: Michael Younkin <michael@goodrx.com>
Signed-off-by: Michael Younkin <michael@goodrx.com>
Signed-off-by: Michael Younkin <michael@goodrx.com>
a33f77b
to
be71098
Compare
Added sign-off to all commits |
3af00b1
to
7e992dc
Compare
Rendered updated documentation |
Codecov Report
@@ Coverage Diff @@
## master #4220 +/- ##
==========================================
- Coverage 55.65% 55.62% -0.04%
==========================================
Files 933 933
Lines 56251 56251
==========================================
- Hits 31305 31288 -17
- Misses 22460 22479 +19
+ Partials 2486 2484 -2
Continue to review full report at Codecov.
|
7e992dc
to
33ed0db
Compare
Tested again in our dev environment. Everything appears functional. |
/golden_files /format |
Signed-off-by: Michael Younkin <michael@goodrx.com>
Signed-off-by: Michael Younkin <michael@goodrx.com>
Signed-off-by: Michael Younkin <michael@goodrx.com>
Signed-off-by: Michael Younkin <michael@goodrx.com>
Signed-off-by: Michael Younkin <michael@goodrx.com>
Signed-off-by: Michael Younkin <michael@goodrx.com>
This was tricky, because we had to get rid of the enabled flag in order to maintain backwards compatibility. Because in the past, we only turned on the kds cert checking code if a name was set, but now we want to also turn it on if no name is set but create is true. Signed-off-by: Michael Younkin <michael@goodrx.com>
Signed-off-by: Michael Younkin <michael@goodrx.com>
33ed0db
to
50a1709
Compare
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.
Those are great changes, thank you for taking the time to improve the chart!
| controlPlane.tls.kdsGlobalServer.create | bool | `false` | Whether or not to create the TLS secret in helm. | | ||
| controlPlane.tls.kdsGlobalServer.cert | string | `""` | The TLS certificate to offer. | | ||
| controlPlane.tls.kdsGlobalServer.key | string | `""` | The TLS key to use. | | ||
| controlPlane.tls.kdsZoneClient.secretName | string | `""` | Name of the K8s TLS Secret resource. If you set this and don't set create=true, you have to create the secret manually. | |
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.
It's not a standard K8S TLS Secret (type: kubernetes.io/tls
with cert+key). It's a secret that contains ca.crt
with CA cert to validate.
I'd like to keep a comment with an explanation of what is this cert. How about something like this
Name of the K8s Secret resource that contains ca.crt which was used to sign the certificate of KDS Global Server. If you set this and don't set create=true, you have to create the secret manually.
| controlPlane.tls.kdsGlobalServer.key | string | `""` | The TLS key to use. | | ||
| controlPlane.tls.kdsZoneClient.secretName | string | `""` | Name of the K8s TLS Secret resource. If you set this and don't set create=true, you have to create the secret manually. | | ||
| controlPlane.tls.kdsZoneClient.create | bool | `false` | Whether or not to create the TLS secret in helm. | | ||
| controlPlane.tls.kdsZoneClient.cert | string | `""` | The TLS certificate to expect. | |
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.
Can we be a bit more explicit and name it controlPlane.tls.kdsZoneClient.caCert
? With a comment
CA bundle that was used to sign the certificate of KDS Global Server
@@ -38,23 +43,32 @@ A Helm chart for the Kuma Control Plane | |||
| controlPlane.ingress.annotations | object | `{}` | Map of ingress annotations. | | |||
| controlPlane.ingress.path | string | `"/"` | Ingress path. | | |||
| controlPlane.ingress.pathType | string | `"ImplementationSpecific"` | Each path in an Ingress is required to have a corresponding path type. (ImplementationSpecific/Exact/Prefix) | | |||
| controlPlane.globalZoneSyncService | object | `{"annotations":{},"loadBalancerIP":null,"port":5685,"type":"LoadBalancer"}` | URL of Global Kuma CP | | |||
| controlPlane.globalZoneSyncService | object | `{"annotations":{},"enabled":true,"loadBalancerIP":null,"port":5685,"type":"LoadBalancer"}` | URL of Global Kuma CP | |
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.
optional: not caused by this PR, but it's a bit awkward that we have this documented as a potential option to modify, but really all available options are listed below. I'd delete # -- URL of Global Kuma CP
comment in values.yaml
| controlPlane.image.pullPolicy | string | `"IfNotPresent"` | Kuma CP ImagePullPolicy | | ||
| controlPlane.image.repository | string | `"kuma-cp"` | Kuma CP image repository | | ||
| controlPlane.image.tag | string | `nil` | Kuma CP Image tag. When not specified, the value is copied from global.tag | | ||
| controlPlane.additionalK8sSecrets | list | `[]` | list of additional secret resources to create; for each specify the name and stringData name is rendered as a template using (tpl $) | |
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.
So those secrets are not mounted to the CP?
Do they need to have CP labels (I'm thinking about moving it to root)?
Can you describe a practical example of this?
I'm wondering if there is a better pattern to solve this with HELM. Have you considered creating a simple chart that has a dependency on Kuma and includes your additional resources?
@michaelgoodrx the release freeze is in 1 week so please update this soon to make sure we get it in :) |
Hi @michaelgoodrx, as today is a deadline for code freeze before the release, and we want this change in it, I decided to step in and address all @jakubdyszkiewicz's review remarks and fix failing tests. I removed the change related to additional secrets, as we were not sure if it's the best solution for this problem, but we are as always open for discussion if it's a crucial for you (give us more context and maybe we'll have some suggestions, or maybe we'll just decide it's the best solution so it'll be possible to add it in the future release). I hope you don't mind. |
Hey @bartsmykla thanks, I really appreciate that you were able to merge it in my absence. I was on vacation and then caught COVID, it took a long time to recover. RE the additional secrets, we are using them to create a secret for the kong mesh license key. I think some people might want it if they want to use a custom certificate for mutual TLS, or any other features you add in the future. I think, once you do the release, we might be able to manage the kong mesh license key using the kong mesh chart as a subchart instead, if you don't want it in the kuma helm chart. |
Summary
When using the Kuma helm chart at GoodRx, we had to make some tweaks to improve availability and integrate with our deployment and monitoring systems. These changes should all be backwards compatible and useful for the community at large. I realize we didn't discuss any of this with the maintainers beforehand. If you choose not to accept, we will maintain these changes in our own fork.
Full changelog
Issues resolved
Documentation
Testing
I've tested these changes manually but I doubt I have tested every possible configuration.
Backwards compatibility
It should be backwards compatible, but others should verify, because this is very difficult to test. :)