2022-08-12 10:20:19 +02:00
|
|
|
{{- if and .Values.agent .Values.hubble.enabled .Values.hubble.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "helm") }}
|
|
|
|
{{- $_ := include "hubble-generate-certs.helm.setup-ca" . -}}
|
|
|
|
{{- $cn := list "*" (.Values.cluster.name | replace "." "-") "hubble-grpc.cilium.io" | join "." }}
|
|
|
|
{{- $ip := .Values.hubble.tls.server.extraIpAddresses }}
|
|
|
|
{{- $dns := prepend .Values.hubble.tls.server.extraDnsNames $cn }}
|
|
|
|
{{- $cert := genSignedCert $cn $ip $dns (.Values.hubble.tls.auto.certValidityDuration | int) .ca -}}
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: hubble-server-certs
|
|
|
|
namespace: {{ .Release.Namespace }}
|
2023-10-16 19:14:53 +02:00
|
|
|
{{- with .Values.hubble.annotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
2022-08-12 10:20:19 +02:00
|
|
|
type: kubernetes.io/tls
|
|
|
|
data:
|
|
|
|
ca.crt: {{ .ca.Cert | b64enc }}
|
|
|
|
tls.crt: {{ $cert.Cert | b64enc }}
|
|
|
|
tls.key: {{ $cert.Key | b64enc }}
|
|
|
|
{{- end }}
|