-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbundle.yaml
102 lines (102 loc) · 2.01 KB
/
bundle.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
apiVersion: v1
kind: ConfigMap
metadata:
name: config-injector-config
namespace: default
data:
config.yaml: |-
container-image: ghcr.io/wandera/scccmd:v2.1.1
default:
label: master
profile: development
source: http://config-manager-controller.default.svc:8080
volume-mount: /config
volume-name: config
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: config-injector-cert
data:
private.key: ''
publickey.cer: ''
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: config-injector
spec:
selector:
matchLabels:
app: config-injector
template:
metadata:
labels:
app: config-injector
spec:
containers:
- name: config-injector-initializer
image: ghcr.io/wandera/scccmd:v2.1.1
args:
- webhook
- --config-file
- /config/config.yaml
- --cert-file
- /keys/publickey.cer
- --key-file
- /keys/private.key
volumeMounts:
- name: config-volume
mountPath: /config
readOnly: true
- name: keys-volume
mountPath: /keys
readOnly: true
volumes:
- name: config-volume
configMap:
name: config-injector-config
- name: keys-volume
secret:
secretName: config-injector-cert
---
apiVersion: v1
kind: Service
metadata:
name: config-injector
spec:
ports:
- port: 443
name: https
selector:
app: config-injector
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: config-injector-webhook
webhooks:
- admissionReviewVersions:
- v1
clientConfig:
service:
name: config-injector
namespace: config
path: /inject
matchPolicy: Exact
name: config.scccmd.github.com
namespaceSelector:
matchLabels:
inject-config: "true"
reinvocationPolicy: Never
rules:
- apiGroups:
- ""
apiVersions:
- v1
operations:
- CREATE
resources:
- pods
sideEffects: None