2020-05-14 10:44:25 +00:00
|
|
|
{{- if .Values.localCA.enabled }}
|
|
|
|
{{- if .Values.localCA.selfsigning }}
|
|
|
|
|
|
|
|
# KubeZero / Local cluster CA
|
2020-07-16 13:09:00 +00:00
|
|
|
# The resources are serialized via waves in Argo
|
2020-11-21 12:24:57 +00:00
|
|
|
apiVersion: cert-manager.io/v1
|
|
|
|
kind: ClusterIssuer
|
2020-05-14 10:44:25 +00:00
|
|
|
metadata:
|
|
|
|
name: kubezero-selfsigning-issuer
|
2020-11-21 12:24:57 +00:00
|
|
|
namespace: {{ .Release.Namespace }}
|
2020-05-19 10:57:24 +00:00
|
|
|
labels:
|
|
|
|
{{ include "kubezero-lib.labels" . | indent 4 }}
|
2020-07-16 13:09:00 +00:00
|
|
|
annotations:
|
|
|
|
argocd.argoproj.io/sync-wave: "10"
|
2020-05-14 10:44:25 +00:00
|
|
|
spec:
|
|
|
|
selfSigned: {}
|
|
|
|
---
|
2020-11-21 12:24:57 +00:00
|
|
|
apiVersion: cert-manager.io/v1
|
2020-05-14 10:44:25 +00:00
|
|
|
kind: Certificate
|
|
|
|
metadata:
|
2020-05-14 10:48:55 +00:00
|
|
|
name: kubezero-local-ca
|
2020-11-21 12:24:57 +00:00
|
|
|
namespace: {{ .Release.Namespace }}
|
2020-05-19 10:57:24 +00:00
|
|
|
labels:
|
|
|
|
{{ include "kubezero-lib.labels" . | indent 4 }}
|
2020-07-16 13:09:00 +00:00
|
|
|
annotations:
|
|
|
|
argocd.argoproj.io/sync-wave: "11"
|
2020-05-14 10:44:25 +00:00
|
|
|
spec:
|
|
|
|
secretName: kubezero-ca-tls
|
2020-05-14 10:48:55 +00:00
|
|
|
commonName: "kubezero-local-ca"
|
2020-05-14 10:44:25 +00:00
|
|
|
isCA: true
|
|
|
|
issuerRef:
|
|
|
|
name: kubezero-selfsigning-issuer
|
2020-11-21 12:24:57 +00:00
|
|
|
kind: ClusterIssuer
|
2020-05-14 10:44:25 +00:00
|
|
|
usages:
|
|
|
|
- "any"
|
|
|
|
---
|
|
|
|
|
|
|
|
{{ else }}
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: kubezero-ca-tls
|
2020-11-21 12:24:57 +00:00
|
|
|
namespace: {{ .Release.Namespace }}
|
2020-05-19 10:57:24 +00:00
|
|
|
labels:
|
|
|
|
{{ include "kubezero-lib.labels" . | indent 4 }}
|
2020-05-14 10:44:25 +00:00
|
|
|
data:
|
|
|
|
tls.crt: {{ .Values.localCA.ca.crt | b64enc }}
|
|
|
|
tls.key: {{ .Values.localCA.ca.key | b64enc }}
|
|
|
|
---
|
|
|
|
{{- end }}
|
|
|
|
|
2020-11-21 12:24:57 +00:00
|
|
|
apiVersion: cert-manager.io/v1
|
|
|
|
kind: ClusterIssuer
|
2020-05-14 10:44:25 +00:00
|
|
|
metadata:
|
2020-05-14 10:48:55 +00:00
|
|
|
name: kubezero-local-ca-issuer
|
2020-11-21 12:24:57 +00:00
|
|
|
namespace: {{ .Release.Namespace }}
|
2020-05-19 10:57:24 +00:00
|
|
|
labels:
|
|
|
|
{{ include "kubezero-lib.labels" . | indent 4 }}
|
2020-07-16 13:09:00 +00:00
|
|
|
annotations:
|
|
|
|
argocd.argoproj.io/sync-wave: "12"
|
2020-05-14 10:44:25 +00:00
|
|
|
spec:
|
|
|
|
ca:
|
|
|
|
secretName: kubezero-ca-tls
|
|
|
|
{{- end }}
|