-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add secret generation to main helm chart. #292
Add secret generation to main helm chart. #292
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.
I think @wkloucek wanted to use Job
s instead of lookup
as he was afraid of race conditions with lookup
and lookup
won't work with helm template
.
This is a very cool feature. My intention is to have that somehow documented/mentioned in the admin docs. Any ideas? |
@mmattel In theory, all that needs to be documented is that people don't need to add most secrets by default, only when they want to customise certain things. So it's more moving current docs around, and even removing some unneeded examples because they are for existing users. We can chat about it, but I'll be gone until Tuesday, so if you can wait until then, I'll help. |
Tuesday is fine, I am just blocked with other stuff. |
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.
Taking the ownership of externally-defined Secret
s and ConfigMap
s fails here:
Error: UPGRADE FAILED: rendered manifests contain a resource that already exists. Unable to continue with update: Secret "machine-auth-api-key" in namespace "default" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "owncloud"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "default"
helm.go:84: [debug] Secret "machine-auth-api-key" in namespace "default" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "owncloud"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "default"
Aside this the following places contain secrets which are not handled so far:
name: {{ $.Values.secretRefs.jwtSecretRef }} name: {{ $.Values.secretRefs.jwtSecretRef }} name: {{ .Values.secretRefs.s3CredentialsSecretRef }} name: {{ .Values.secretRefs.s3CredentialsSecretRef }} name: {{ .Values.secretRefs.s3CredentialsSecretRef }} name: {{ .Values.secretRefs.s3CredentialsSecretRef }}
Other comments are inline
These are all fixed, looking for a way around the first problem you mentioned now. |
This creates a generic secret template that can be used to generate secrets for all services. The secret template takes a dict of the scope, the name of the secret, and the data to be stored in the secret. This will be used to prefill any non-predefined secrets that are set in the secretRefs. Fixes #50
This empties the value of adminUserSecretRef, which will signal that the secret should be generated by the chart. I've also started a template to be inserted where we used to use the value of adminUserSecretRef.
Co-authored-by: Dennis Sieben <[email protected]>
516ce46
to
3430acb
Compare
@ainmosni Minor text bug in commit
|
Maybe needs a rebase because merging of 305/306/307/308 yesterday. |
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.
PR is fine for me after discussion. Ownership stuff will be documented.
Pls tell more so docs can address this. |
This creates a generic secret template that can be used to generate
secrets for all services. The secret template takes a dict of the scope,
the name of the secret, and the data to be stored in the secret.
This will be used to prefill any non-predefined secrets that are set in
the secretRefs.
Fixes #50