UpstreamAuthority cert-manager support (#82)

This commit is contained in:
kfox1111
2023-03-03 20:48:35 +01:00
committed by GitHub
parent a82ee694bf
commit d341c5ad58
8 changed files with 95 additions and 0 deletions
@@ -1,3 +1,4 @@
{{ $namespace := .Release.Namespace }}
apiVersion: v1
kind: ConfigMap
metadata:
@@ -71,6 +72,22 @@ data:
}
{{- end }}
{{- end }}
{{- with .Values.upstreamAuthority.certManager }}
{{- if eq (.enabled | toString) "true" }}
UpstreamAuthority "cert-manager" {
plugin_data {
issuer_name = {{ .issuer_name | quote }}
issuer_kind = {{ .issuer_kind | quote }}
issuer_group = {{ .issuer_group | quote }}
namespace = {{ default $namespace .namespace | quote }}
{{- if ne .kube_config_file "" }}
kube_config_file = {{ .kube_config_file | quote }}
{{- end }}
}
}
{{- end }}
{{- end }}
}
health_checks {
@@ -18,6 +18,18 @@ rules:
verbs:
- get
- patch
{{- if and .Values.upstreamAuthority.certManager.enabled .Values.upstreamAuthority.certManager.rbac.create }}
- apiGroups: ["cert-manager.io"]
resources:
- certificaterequests
verbs:
- list
- get
- create
- delete
- patch
- update
{{- end }}
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1