Skip to content

Commit

Permalink
Revert "helm: ca issuer"
Browse files Browse the repository at this point in the history
This reverts commit 082fa15.

Currently, in the helm chart, if the cert-manager approach is selected
to generate the hubble and clustermesh certificates but no issuer is
specified, a new issuer is created for each of them, along with a secret
containing the CA information. Still, this approach is currently broken,
since the CA secret which is created does not match the format expected
by cert-manager. At the same time, this might also hide misconfigurations
(e.g., if there is a typo in the issuer configuration) and possibly lead
to different CAs for different components. Hence, let's just stick to
the approach documented in the user guide and make it mandatory to specify
the issuer when cert-manager is used. It is a task of the users (as
unrelated from cilium) to create the appropriate issuer in advance,
according to their own preference.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
  • Loading branch information
giorio94 authored and squeed committed Apr 6, 2023
1 parent c2c4b74 commit 62f72cd
Show file tree
Hide file tree
Showing 16 changed files with 14 additions and 78 deletions.
4 changes: 2 additions & 2 deletions Documentation/helm-values.rst

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

4 changes: 2 additions & 2 deletions install/kubernetes/cilium/README.md

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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
issuerRef:
{{- include "clustermesh-apiserver-generate-certs.certmanager.issuer" . | nindent 4 }}
{{- toYaml .Values.clustermesh.apiserver.tls.auto.certManagerIssuerRef | nindent 4 }}
secretName: clustermesh-apiserver-admin-cert
commonName: {{ include "clustermesh-apiserver-generate-certs.admin-common-name" . }}
dnsNames:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
issuerRef:
{{- include "clustermesh-apiserver-generate-certs.certmanager.issuer" . | nindent 4 }}
{{- toYaml .Values.clustermesh.apiserver.tls.auto.certManagerIssuerRef | nindent 4 }}
secretName: clustermesh-apiserver-client-cert
commonName: externalworkload
duration: {{ printf "%dh0m0s" (mul .Values.clustermesh.apiserver.tls.auto.certValidityDuration 24) }}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
issuerRef:
{{- include "clustermesh-apiserver-generate-certs.certmanager.issuer" . | nindent 4 }}
{{- toYaml .Values.clustermesh.apiserver.tls.auto.certManagerIssuerRef | nindent 4 }}
secretName: clustermesh-apiserver-remote-cert
commonName: {{ include "clustermesh-apiserver-generate-certs.remote-common-name" . }}
duration: {{ printf "%dh0m0s" (mul .Values.clustermesh.apiserver.tls.auto.certValidityDuration 24) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
issuerRef:
{{- include "clustermesh-apiserver-generate-certs.certmanager.issuer" . | nindent 4 }}
{{- toYaml .Values.clustermesh.apiserver.tls.auto.certManagerIssuerRef | nindent 4 }}
secretName: clustermesh-apiserver-server-cert
commonName: clustermesh-apiserver.cilium.io
dnsNames:
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
issuerRef:
{{- include "hubble-generate-certs.certmanager.issuer" . | nindent 4 }}
{{- toYaml .Values.hubble.tls.auto.certManagerIssuerRef | nindent 4 }}
secretName: hubble-relay-client-certs
commonName: "*.hubble-relay.cilium.io"
dnsNames:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
issuerRef:
{{- include "hubble-generate-certs.certmanager.issuer" . | nindent 4 }}
{{- toYaml .Values.hubble.tls.auto.certManagerIssuerRef | nindent 4 }}
secretName: hubble-relay-server-certs
commonName: "*.hubble-relay.cilium.io"
dnsNames:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
issuerRef:
{{- include "hubble-generate-certs.certmanager.issuer" . | nindent 4 }}
{{- toYaml .Values.hubble.tls.auto.certManagerIssuerRef | nindent 4 }}
secretName: hubble-server-certs
commonName: {{ $cn | quote }}
dnsNames:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
issuerRef:
{{- include "hubble-generate-certs.certmanager.issuer" . | nindent 4 }}
{{- toYaml .Values.hubble.tls.auto.certManagerIssuerRef | nindent 4 }}
secretName: hubble-ui-client-certs
commonName: "*.hubble-ui.cilium.io"
dnsNames:
Expand Down
4 changes: 1 addition & 3 deletions install/kubernetes/cilium/values.yaml

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

4 changes: 1 addition & 3 deletions install/kubernetes/cilium/values.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,6 @@ hubble:
# kind: ClusterIssuer
# name: ca-issuer
# -- certmanager issuer used when hubble.tls.auto.method=certmanager.
# If not specified, a CA issuer will be created.
certManagerIssuerRef: {}

# -- Deprecated in favor of tls.ca. To be removed in 1.13.
Expand Down Expand Up @@ -2172,7 +2171,7 @@ nodeinit:
# -- bootstrapFile is the location of the file where the bootstrap timestamp is
# written by the node-init DaemonSet
bootstrapFile: "/tmp/cilium-bootstrap.d/cilium-bootstrap-time"

# -- startup offers way to customize startup nodeinit script (pre and post position)
startup:
preScript: ""
Expand Down Expand Up @@ -2538,7 +2537,6 @@ clustermesh:
# kind: ClusterIssuer
# name: ca-issuer
# -- certmanager issuer used when clustermesh.apiserver.tls.auto.method=certmanager.
# If not specified, a CA issuer will be created.
certManagerIssuerRef: {}
# -- base64 encoded PEM values for the ExternalWorkload CA certificate and private key.
ca:
Expand Down

0 comments on commit 62f72cd

Please sign in to comment.