Skip to content
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
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

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

duration: {{ printf "%dh0m0s" (mul .Values.hubble.tls.auto.issuerCertValidityDuration 24) }}
isCA: true
Copy link
Member

Choose a reason for hiding this comment

The 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
Expand Down
4 changes: 4 additions & 0 deletions install/kubernetes/cilium/values.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.