|
1 | 1 | {{- define "hubble-generate-certs.job.spec" }}
|
2 |
| -{{- $certValiditySecondsStr := printf "%ds" (mul .Values.hubble.tls.auto.certValidityDuration 24 60 60) -}} |
| 2 | +{{- $certValidityStr := printf "%dh0m0s" (mul .Values.hubble.tls.auto.certValidityDuration 24) -}} |
3 | 3 | spec:
|
4 | 4 | template:
|
5 | 5 | metadata:
|
@@ -28,21 +28,80 @@ spec:
|
28 | 28 | {{- if and .Values.tls.ca.cert .Values.tls.ca.key }}
|
29 | 29 | - "--ca-secret-name=cilium-ca"
|
30 | 30 | {{- end }}
|
31 |
| - - "--hubble-server-cert-generate" |
32 |
| - - "--hubble-server-cert-common-name={{ list "*" (.Values.cluster.name | replace "." "-") "hubble-grpc.cilium.io" | join "." }}" |
33 |
| - - "--hubble-server-cert-validity-duration={{ $certValiditySecondsStr }}" |
34 |
| - {{- if .Values.hubble.relay.enabled }} |
35 |
| - - "--hubble-relay-client-cert-generate" |
36 |
| - - "--hubble-relay-client-cert-validity-duration={{ $certValiditySecondsStr }}" |
37 |
| - {{- end }} |
38 |
| - {{- if and .Values.hubble.relay.enabled .Values.hubble.relay.tls.server.enabled }} |
39 |
| - - "--hubble-relay-server-cert-generate" |
40 |
| - - "--hubble-relay-server-cert-validity-duration={{ $certValiditySecondsStr }}" |
41 |
| - {{- end }} |
42 |
| - {{- if and .Values.hubble.metrics.enabled .Values.hubble.metrics.tls.enabled }} |
43 |
| - - "--hubble-metrics-server-cert-generate" |
44 |
| - - "--hubble-metrics-server-cert-validity-duration={{ $certValiditySecondsStr }}" |
45 |
| - {{- end }} |
| 31 | + env: |
| 32 | + - name: CILIUM_CERTGEN_CONFIG |
| 33 | + value: | |
| 34 | + certs: |
| 35 | + - name: hubble-server-certs |
| 36 | + namespace: {{ .Release.Namespace }} |
| 37 | + commonName: {{ list "*" (.Values.cluster.name | replace "." "-") "hubble-grpc.cilium.io" | join "." | quote }} |
| 38 | + hosts: |
| 39 | + - {{ list "*" (.Values.cluster.name | replace "." "-") "hubble-grpc.cilium.io" | join "." | quote }} |
| 40 | + {{- range $dns := .Values.hubble.tls.server.extraDnsNames }} |
| 41 | + - {{ $dns | quote }} |
| 42 | + {{- end }} |
| 43 | + {{- range $ip := .Values.hubble.tls.server.extraIpAddresses }} |
| 44 | + - {{ $ip | quote }} |
| 45 | + {{- end }} |
| 46 | + usage: |
| 47 | + - signing |
| 48 | + - key encipherment |
| 49 | + - server auth |
| 50 | + validity: {{ $certValidityStr }} |
| 51 | + {{- if .Values.hubble.relay.enabled }} |
| 52 | + - name: hubble-relay-client-certs |
| 53 | + namespace: {{ .Release.Namespace }} |
| 54 | + commonName: "*.hubble-relay.cilium.io" |
| 55 | + hosts: |
| 56 | + - "*.hubble-relay.cilium.io" |
| 57 | + usage: |
| 58 | + - signing |
| 59 | + - key encipherment |
| 60 | + - client auth |
| 61 | + validity: {{ $certValidityStr }} |
| 62 | + {{- end }} |
| 63 | + {{- if and .Values.hubble.relay.enabled .Values.hubble.relay.tls.server.enabled }} |
| 64 | + - name: hubble-relay-server-certs |
| 65 | + namespace: {{ .Release.Namespace }} |
| 66 | + commonName: "*.hubble-relay.cilium.io" |
| 67 | + hosts: |
| 68 | + - "*.hubble-relay.cilium.io" |
| 69 | + usage: |
| 70 | + - signing |
| 71 | + - key encipherment |
| 72 | + - server auth |
| 73 | + validity: {{ $certValidityStr }} |
| 74 | + {{- end }} |
| 75 | + {{- if and .Values.hubble.metrics.enabled .Values.hubble.metrics.tls.enabled }} |
| 76 | + - name: hubble-metrics-server-certs |
| 77 | + namespace: {{ .Release.Namespace }} |
| 78 | + commonName: {{ list (.Values.cluster.name | replace "." "-") "hubble-metrics.cilium.io" | join "." }} | quote }} |
| 79 | + hosts: |
| 80 | + - {{ list (.Values.cluster.name | replace "." "-") "hubble-metrics.cilium.io" | join "." }} | quote }} |
| 81 | + {{- range $dns := .Values.hubble.metrics.tls.server.extraDnsNames }} |
| 82 | + - {{ $dns | quote }} |
| 83 | + {{- end }} |
| 84 | + {{- range $ip := .Values.hubble.metrics.tls.server.extraIpAddresses }} |
| 85 | + - {{ $ip | quote }} |
| 86 | + {{- end }} |
| 87 | + usage: |
| 88 | + - signing |
| 89 | + - key encipherment |
| 90 | + - server auth |
| 91 | + validity: {{ $certValidityStr }} |
| 92 | + {{- end }} |
| 93 | + {{- if and .Values.hubble.ui.enabled .Values.hubble.relay.enabled .Values.hubble.relay.tls.server.enabled }} |
| 94 | + - name: hubble-ui-client-certs |
| 95 | + namespace: {{ .Release.Namespace }} |
| 96 | + commonName: "*.hubble-ui.cilium.io" |
| 97 | + hosts: |
| 98 | + - "*.hubble-ui.cilium.io" |
| 99 | + usage: |
| 100 | + - signing |
| 101 | + - key encipherment |
| 102 | + - client auth |
| 103 | + validity: {{ $certValidityStr }} |
| 104 | + {{- end }} |
46 | 105 | {{- with .Values.certgen.extraVolumeMounts }}
|
47 | 106 | volumeMounts:
|
48 | 107 | {{- toYaml . | nindent 10 }}
|
|
0 commit comments