Skip to content

feat: add extra env/volumes/volumeMounts to implement the ability to …#513

Open
toyhoshi wants to merge 1 commit into
neuvector:masterfrom
toyhoshi:feature/add-custom-ca
Open

feat: add extra env/volumes/volumeMounts to implement the ability to …#513
toyhoshi wants to merge 1 commit into
neuvector:masterfrom
toyhoshi:feature/add-custom-ca

Conversation

@toyhoshi
Copy link
Copy Markdown

this change resolves #193 by adding extraEnv, extraVolume and extraVolumeMounts.
Signed-off by: Marco Varagnolo marco.varagnolo@gmail.com

@toyhoshi toyhoshi requested a review from a team as a code owner August 28, 2025 14:57
@toyhoshi
Copy link
Copy Markdown
Author

@venkateshjayagopal any feedback on this one?

Comment thread charts/core/values.yaml
projected:
defaultMode: 420
sources:
- configMap:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was really looking forward to this functionality. Nice PR! Should we set it to a secret rather than a configmap since the ca bundle can be potentially sensitive information ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, good idea, I'll do it

Copy link
Copy Markdown

@bushong1 bushong1 Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we set it to a secret rather than a configmap since the ca bundle can be potentially sensitive information ?

CA Bundles cannot contain sensitive information. Certificate data is inherently public (your browser receives this from all TLS sites)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having said that, defaulting the module's values for this feels odd. Might be better to move the core values to an example in a doc? Or comment it out here and leave extraVolumeMounts: []

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as the manager section; shouldn't this be set to the following as the default?

extraEnv: []
extraVolumes: []
extraVolumeMounts: []

Comment thread charts/core/values.yaml
projected:
defaultMode: 420
sources:
- configMap:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same note as above swapping from configMap to secret

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we set it to a secret rather than a configmap since the ca bundle can be potentially sensitive information ?

CA Bundles cannot contain sensitive information. Certificate data is inherently public (your browser receives this from all TLS sites)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be set to the following as the default?

extraEnv: []
extraVolumes: []
extraVolumeMounts: []

Copy link
Copy Markdown

@rodneyxr rodneyxr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the values.yaml should include empty defaults. This is a very common pattern in helm charts and don't feel examples are necessary but if they are, they should probably be commented out.

Comment thread charts/core/values.yaml
projected:
defaultMode: 420
sources:
- configMap:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be set to the following as the default?

extraEnv: []
extraVolumes: []
extraVolumeMounts: []

Comment thread charts/core/values.yaml
projected:
defaultMode: 420
sources:
- configMap:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as the manager section; shouldn't this be set to the following as the default?

extraEnv: []
extraVolumes: []
extraVolumeMounts: []

Comment thread charts/core/values.yaml
Comment on lines +401 to +417

# To add your own CA set a ConfigMap with your CA (i.e. ca-bundle)
extraEnv:
- name: SSL_CERT_FILE
value: /etc/ssl/certs/ca-bundle.pem
extraVolumes:
- name: ca-bundle
projected:
defaultMode: 420
sources:
- configMap:
name: ca-bundle
extraVolumeMounts:
- name: ca-bundle
mountPath: /etc/ssl/certs/ca-bundle.pem
subPath: ca-bundle.pem # remember that subPath field must exactly match the key name in the ConfigMap.
readOnly: true
Copy link
Copy Markdown

@rodneyxr rodneyxr May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# To add your own CA set a ConfigMap with your CA (i.e. ca-bundle)
extraEnv:
- name: SSL_CERT_FILE
value: /etc/ssl/certs/ca-bundle.pem
extraVolumes:
- name: ca-bundle
projected:
defaultMode: 420
sources:
- configMap:
name: ca-bundle
extraVolumeMounts:
- name: ca-bundle
mountPath: /etc/ssl/certs/ca-bundle.pem
subPath: ca-bundle.pem # remember that subPath field must exactly match the key name in the ConfigMap.
readOnly: true
extraEnv: []
# Additional volumes on the manager deployment
extraVolumes: []
# - name: ca-bundle
# configMap:
# defaultMode: 420
# name: ca-bundle
# Additional volumeMounts on the manager deployment
extraVolumeMounts: []
# - mountPath: /etc/ssl/certs/ca-certificates.crt
# name: custom-ca
# subPath: ca-bundle.pem
# readOnly: true

Comment thread charts/core/values.yaml
Comment on lines +95 to +110
# To add your own CA set a ConfigMap with your CA (i.e. ca-bundle)
extraEnv:
- name: SSL_CERT_FILE
value: /etc/ssl/certs/ca-bundle.pem
extraVolumes:
- name: ca-bundle
projected:
defaultMode: 420
sources:
- configMap:
name: ca-bundle
extraVolumeMounts:
- name: ca-bundle
mountPath: /etc/ssl/certs/ca-bundle.pem
subPath: ca-bundle.pem # remember that subPath field must exactly match the key name in the ConfigMap.
readOnly: true
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# To add your own CA set a ConfigMap with your CA (i.e. ca-bundle)
extraEnv:
- name: SSL_CERT_FILE
value: /etc/ssl/certs/ca-bundle.pem
extraVolumes:
- name: ca-bundle
projected:
defaultMode: 420
sources:
- configMap:
name: ca-bundle
extraVolumeMounts:
- name: ca-bundle
mountPath: /etc/ssl/certs/ca-bundle.pem
subPath: ca-bundle.pem # remember that subPath field must exactly match the key name in the ConfigMap.
readOnly: true
extraEnv: []
# Additional volumes on the controller deployment
extraVolumes: []
# - name: ca-bundle
# configMap:
# defaultMode: 420
# name: ca-bundle
# Additional volumeMounts on the controller deployment
extraVolumeMounts: []
# - mountPath: /etc/ssl/certs/ca-certificates.crt
# name: custom-ca
# subPath: ca-bundle.pem
# readOnly: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add custom CA for Keycloak OIDC from Helm chart

4 participants