-
Notifications
You must be signed in to change notification settings - Fork 826
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
expose Helm chart values for custom certs #2367
Conversation
Build Failed 😱 Build Id: a2526e4b-474c-4dff-8e33-aba4a46ca17d To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
@@ -38,7 +38,7 @@ spec: | |||
{{- if .Values.agones.controller.generateTLS }} | |||
caBundle: {{ b64enc $ca.Cert }} | |||
{{- else }} | |||
caBundle: {{ .Files.Get "certs/server.crt" | b64enc }} | |||
caBundle: {{ default (.Files.Get "certs/server.crt") .Values.agones.controller.tlsCert | b64enc }} |
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.
Would it work to put "certs/server.crt" into values.yaml and just use the new variable here?
From https://helm.sh/docs/chart_template_guide/functions_and_pipelines/:
In an actual chart, all static default values should live in the values.yaml, and should not be repeated using the default command (otherwise they would be redundant).
I'm not particularly familiar with the --set-file
option, but it looks like if the new parameter is a file name and we keep the .Files.Get
here referencing the variable, then it might work (but using the --set
flag instead of --set-file
because you wouldn't pass the file contents into the variable).
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 new parameter expects the file's contents. The --set-file
option will set a value to the contents of the file at the provided path - it's equivalent to --set value="$(cat value.txt)"
.
The idea behind the new parameter is to allow the user to pass the certificate directly as a value. When the value isn't provided, .Files.Get
will be used as a fallback to read the file from the certs
directory. I included this so that the old way of passing in certificates (i.e. modifying the files in certs
) continues to be supported.
That said, I think it could simplify things to remove the fallback and simply expect the value to be passed.
Let me know if that makes sense and if you'd like to see any changes.
Build Succeeded 👏 Build Id: 2b9e695b-57ec-48ad-8385-2385f6cd0ee4 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Build Succeeded 👏 Build Id: b02fc29b-2039-4f29-9177-a364703fa5af The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Build Failed 😱 Build Id: 5db5082a-0652-435b-bdf3-e6611cdb0db4 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: d3c14421-450a-49dc-96b1-1d5b5a871887 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
I pushed a commit that removes reading in defaults from the This is breaking for releases that disable Edit: I updated the Makefile to pass in the chart certificates when generating |
I like these changes, but I'm on the fence about whether this will break too many folks. @markmandel - WDYT? |
🤔 I'm on the fence with the breaking change as well. I feel like not many people use a custom But it's hard to judge impact. Maybe we should have this PR merge with the non-breaking behaviour for now, and file an issue for the breaking change, and see if anyone objects? |
This reverts commit 2a9872c.
I'd guess that workflow is the most common - it would probably look something like this during deployment: helm pull agones/agones --untar
cp -TR my-certs/ agones/certs/
helm install my-release agones --values overrides.yaml I think a new issue is a good call - it could benefit from some more discussion. |
Build Failed 😱 Build Id: ec6d99bc-16ae-410c-ba83-c3e0fd66431a To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Flake in |
@roberthbailey you've been tracking this more closely than I have. If you are happy with this PR, I'm happy to squeeze this in before RC today. |
Build Succeeded 👏 Build Id: bedddd62-418d-4a35-84af-0908b485f07b The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rahil-p, roberthbailey The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does:
This PR provides a convenient alternative for installing Agones with custom certificates. Instead of having to pull and modify the contents of the chart, custom certificates may be passed in as values:
Which issue(s) this PR fixes:
Closes #2364
Special notes for your reviewer: