-
Notifications
You must be signed in to change notification settings - Fork 28
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
Added custom ca chain to deployments #599
Conversation
{{- if .Values.customCAChain.enabled }} | ||
- name: custom-ca-chain | ||
mountPath: /etc/ssl/certs/ | ||
{{- end }} |
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 be good to have this fragment templated so we don't have these lines in all deployments.yml
file but only one with a call here.
suggestion
{{/*
oCIS ca mount
@param .path The path to mount
@param .scope. The current scope
*/}}
{{- define "ocis.caPath" -}}
{{- if .scope.Values.customCAChain.enabled }}
- name: custom-ca-chain
mountPath: {{ .path }}
{{- end }}
{{- end -}}
Usage afterwards with {{- include "ocis.caPath" (dict "scope" . "path" /etc/ssl/certs) }}
I changed all the entries to a template and fixed also the issue that the customCAChain was overwriting the other CA files. Now there are two different directories, one with the default files and one with the custom CA chain. Both are added to the SSL_CERT_DIR variable. |
@b1schumacher I applied some formatting and added enabled this feature in the linting process. So far I didn't get the pattern for which services the custom CA has been configured / skipped. Could you maybe elaborate why it's not on all services? Also what's missing are the CronJobs, some of them only talk to NATS but even for this, we could make use of this feature. |
@wkloucek I added the missing services and the jobs. |
I changed this to point to |
charts/ocis/values.yaml
Outdated
# -- Custom CA enables SSL_CERT_DIR in pods with the additional path /etc/ssl/custom. | ||
enabled: false | ||
# -- If custom CA chain is enabled this attribute mounts the existing secret to /etc/ssl/custom. | ||
existingSecret: "" |
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.
Is there a particular reason for the CA chain to be put in a secret? From what I know, a CA chain is public information and would therefore also be suitable for a ConfigMap.
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 changed it to a ConfigMap in e344382
@d7oc From my side this PR is ready for review / merge now. You can give it a try by running the newly added deployment example. It'll create a CA and trust it on the oCIS side. It also will use the CA for generating a certificate for the Ingress and use this instead of the default dummy certificate (generated by most ingress controllers). Therefore we can actually skip enabling the |
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.
LGTM aside the typo. Also verified locally via k3d.
Co-authored-by: Dennis Sieben <[email protected]>
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.
LGTM
* add configuration for an additional ca chain --------- Co-authored-by: schumacher <[email protected]> Co-authored-by: Willy Kloucek <[email protected]> Co-authored-by: Dennis Sieben <[email protected]>
* add configuration for an additional ca chain --------- Co-authored-by: schumacher <[email protected]> Co-authored-by: Willy Kloucek <[email protected]> Co-authored-by: Dennis Sieben <[email protected]>
* add configuration for an additional ca chain --------- Co-authored-by: schumacher <[email protected]> Co-authored-by: Willy Kloucek <[email protected]> Co-authored-by: Dennis Sieben <[email protected]>
Description
Added the custom CA Chain variables to the values.yaml and added the ca to services and jobs.
Related Issue
Motivation and Context
Custom CA chains are required for multiple services, which require that ocis is trusting these ca's
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: