-
Notifications
You must be signed in to change notification settings - Fork 44
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
Replace full folder mount to per file mount of extra CA certificates #613
Conversation
Signed-off-by: Ben <ben@armosec.io>
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 you add a few such secrets in one of the unit tests?
name: extra-certificates | ||
namespace: kubescape | ||
data: | ||
cert1: Zm9v |
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.
@slashben it doesn't seem to work...
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.
See this
{{- range $key, $value := (lookup "v1" "Secret" .Release.Namespace .Values.global.extraCaCertificates.secretName).data }} |
it looks like lookup
is not easily testable. I don't see a way to mock it, on the other hand I don't know how to accommodate the requirement.
This might not be covered by the unittest, but it works on a real cluster
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
5013f68
to
f00e155
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.
looks good
This pull request includes changes to the
kubescape-operator
Helm chart templates to improve the handling of extra CA certificates. The main modification involves iterating over the keys in the specified secret and mounting each key as a separate file instead of overriding the whole directoryChanges to improve handling of extra CA certificates:
charts/kubescape-operator/templates/kubescape/deployment.yaml
: Added iteration over secret keys to mount each key as a separate file.charts/kubescape-operator/templates/kubevuln/deployment.yaml
: Modified to iterate over secret keys for mounting each key as a separate file.charts/kubescape-operator/templates/node-agent/daemonset.yaml
: Updated to iterate over secret keys and mount each key individually.charts/kubescape-operator/templates/operator/deployment.yaml
: Changed to iterate over secret keys to mount each key as a separate file.charts/kubescape-operator/templates/synchronizer/deployment.yaml
: Revised to iterate over secret keys for mounting each key separately.