-
Notifications
You must be signed in to change notification settings - Fork 0
/
_kube_rbac_proxy.tpl
21 lines (21 loc) · 873 Bytes
/
_kube_rbac_proxy.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{{- /* Usage: {{ include "helm_lib_kube_rbac_proxy_ca_certificate" (list . "namespace") }} */ -}}
{{- /* Renders configmap with kube-rbac-proxy CA certificate which uses to verify the kube-rbac-proxy clients. */ -}}
{{- define "helm_lib_kube_rbac_proxy_ca_certificate" -}}
{{- /* Template context with .Values, .Chart, etc */ -}}
{{- /* Namespace where CA configmap will be created */ -}}
{{- $context := index . 0 }}
{{- $namespace := index . 1 }}
---
apiVersion: v1
data:
ca.crt: |
{{ $context.Values.global.internal.modules.kubeRBACProxyCA.cert | nindent 4 }}
kind: ConfigMap
metadata:
annotations:
kubernetes.io/description: |
Contains a CA bundle that can be used to verify the kube-rbac-proxy clients.
{{- include "helm_lib_module_labels" (list $context) | nindent 2 }}
name: kube-rbac-proxy-ca.crt
namespace: {{ $namespace }}
{{- end }}