-
Notifications
You must be signed in to change notification settings - Fork 1
/
configmap.yaml
46 lines (41 loc) · 1.25 KB
/
configmap.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#@ load("@ytt:data", "data")
#@ load("@ytt:yaml", "yaml")
#@ load("config.lib.yaml", "secretTlsName", "secretCaName", "fullName")
#@ def config_yml():
apiVersion: kapp.k14s.io/v1alpha1
kind: Config
rebaseRules:
- path: [data]
type: copy
sources: [existing]
resourceMatchers:
- kindNamespaceNameMatcher:
kind: Secret
namespace: #@ data.values.release.namespace
name: #@ secretTlsName()
- kindNamespaceNameMatcher:
kind: Secret
namespace: #@ data.values.release.namespace
name: #@ secretCaName()
- path: [webhooks, {allIndexes: true}, clientConfig, caBundle]
type: copy
sources: [existing]
resourceMatchers:
- apiVersionKindMatcher: {apiVersion: admissionregistration.k8s.io/v1, kind: MutatingWebhookConfiguration}
- apiVersionKindMatcher: {apiVersion: admissionregistration.k8s.io/v1, kind: ValidatingWebhookConfiguration}
- path: [spec, conversion, webhook, clientConfig, caBundle]
type: copy
sources: [existing]
resourceMatchers:
- kindNamespaceNameMatcher:
kind: CustomResourceDefinition
name: tenants.capsule.clastix.io
#@ end
apiVersion: v1
kind: ConfigMap
metadata:
name: #@ fullName() + "-kapp-config"
labels:
kapp.k14s.io/config: ""
data:
config.yml: #@ yaml.encode(config_yml())