forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create CA issuer when certManagerIssuerRef is not specify Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
- Loading branch information
1 parent
ce82ab9
commit 082fa15
Showing
14 changed files
with
74 additions
and
12 deletions.
There are no files selected for viewing
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
9 changes: 9 additions & 0 deletions
9
install/kubernetes/cilium/templates/clustermesh-apiserver/tls-certmanager/_helpers.tpl
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{- define "clustermesh-apiserver-generate-certs.certmanager.issuer" }} | ||
{{- if .Values.clustermesh.apiserver.tls.auto.certManagerIssuerRef }} | ||
{{- toYaml .Values.clustermesh.apiserver.tls.auto.certManagerIssuerRef }} | ||
{{- else }} | ||
group: cert-manager.io | ||
kind: Issuer | ||
name: clustermesh-apiserver-issuer | ||
{{- end }} | ||
{{- end }} |
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
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
21 changes: 21 additions & 0 deletions
21
.../cilium/templates/clustermesh-apiserver/tls-certmanager/clustermesh-apiserver-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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "certmanager") (not .Values.clustermesh.apiserver.tls.auto.certManagerIssuerRef) }} | ||
{{- $_ := include "clustermesh-apiserver-generate-certs.helm.setup-ca" . -}} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: clustermesh-apiserver-ca-cert | ||
namespace: {{ .Release.Namespace }} | ||
data: | ||
ca.crt: {{ .cmca.Cert | b64enc }} | ||
ca.key: {{ .cmca.Key | b64enc }} | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: clustermesh-apiserver-issuer | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
ca: | ||
secretName: clustermesh-apiserver-ca-cert | ||
{{- end }} |
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
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
9 changes: 9 additions & 0 deletions
9
install/kubernetes/cilium/templates/hubble/tls-certmanager/_helpers.tpl
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{- define "hubble-generate-certs.certmanager.issuer" }} | ||
{{- if .Values.hubble.tls.auto.certManagerIssuerRef }} | ||
{{- toYaml .Values.hubble.tls.auto.certManagerIssuerRef }} | ||
{{- else }} | ||
group: cert-manager.io | ||
kind: Issuer | ||
name: hubble-issuer | ||
{{- end }} | ||
{{- end }} |
21 changes: 21 additions & 0 deletions
21
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- 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 | ||
metadata: | ||
name: hubble-ca-secret | ||
namespace: {{ .Release.Namespace }} | ||
data: | ||
ca.crt: {{ .ca.Cert | b64enc }} | ||
ca.key: {{ .ca.Key | b64enc }} | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: hubble-issuer | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
ca: | ||
secretName: hubble-ca-secret | ||
{{- end }} |
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
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
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
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
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