-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
chart: generate a CA cert with certmanager for hubble tls generation #24505
Closed
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
27 changes: 20 additions & 7 deletions
27
install/kubernetes/cilium/templates/hubble/tls-certmanager/hubble-issuer.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -1,14 +1,27 @@ | ||||
{{- if and (or .Values.agent .Values.hubble.relay.enabled .Values.hubble.ui.enabled) .Values.hubble.enabled .Values.hubble.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "certmanager") (not .Values.hubble.tls.auto.certManagerIssuerRef) }} | ||||
{{- $_ := include "hubble-generate-certs.helm.setup-ca" . -}} | ||||
--- | ||||
apiVersion: v1 | ||||
kind: Secret | ||||
apiVersion: cert-manager.io/v1 | ||||
kind: Issuer | ||||
metadata: | ||||
name: hubble-ca-issuer | ||||
namespace: {{ .Release.Namespace }} | ||||
spec: | ||||
selfSigned: {} | ||||
--- | ||||
apiVersion: cert-manager.io/v1 | ||||
kind: Certificate | ||||
metadata: | ||||
name: hubble-ca-secret | ||||
name: hubble-ca | ||||
namespace: {{ .Release.Namespace }} | ||||
data: | ||||
ca.crt: {{ .ca.Cert | b64enc }} | ||||
ca.key: {{ .ca.Key | b64enc }} | ||||
spec: | ||||
commonName: Cilium CA | ||||
duration: {{ printf "%dh0m0s" (mul .Values.hubble.tls.auto.issuerCertValidityDuration 24) }} | ||||
isCA: true | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will generate an RSA key by default, within Cilium we are already using ECDSA.
We might consider doing the same here |
||||
issuerRef: | ||||
group: cert-manager.io | ||||
kind: Issuer | ||||
name: hubble-ca-issuer | ||||
secretName: hubble-ca-secret | ||||
--- | ||||
apiVersion: cert-manager.io/v1 | ||||
kind: Issuer | ||||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We might want to add Hubble here too as Cilium uses certificates for cluster mesh, service mesh, network policy... if a user sees a certificate signed by this it helps to day that it is Cilium Hubble