forked from kapicorp/kapitan-reference
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tesoro.yml
114 lines (111 loc) · 2.9 KB
/
tesoro.yml
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
103
104
105
106
107
108
109
110
111
112
113
114
classes:
- components.kapicorp.tesoro_monitoring
parameters:
scripts:
- templates/scripts/generate_tesoro_certs.sh
kapicorp:
tesoro:
refs:
certificate: plain:targets/${target_name}/kapicorp-tesoro-cert-pem
private_key: plain:targets/${target_name}/kapicorp-tesoro-cert-key
cacert: plain:targets/${target_name}/kapicorp-tesoro-cacert-pem
ssl:
certificate: ?{${kapicorp:tesoro:refs:certificate}||randomstr}
private_key: ?{${kapicorp:tesoro:refs:private_key}||randomstr}
cacert: ?{${kapicorp:tesoro:refs:cacert}||randomstr}
components:
tesoro:
image: kapicorp/tesoro
service_account:
enabled: true
create: true
security_context:
capabilities:
drop:
- all
add:
- NET_BIND_SERVICE
service:
type: ClusterIP
args:
- --ca-file=/certs/cacert.pem
- --cert-file=/certs/cert.pem
- --key-file=/certs/cert.key
- --port=443
ports:
tesoro-api:
container_port: 443
service_port: 443
tesoro-metrics:
service_port: 9095
container_port: 9095
secrets:
secrets:
mount: /certs
data:
cert.pem:
value: ${kapicorp:tesoro:ssl:certificate}
cert.key:
value: ${kapicorp:tesoro:ssl:private_key}
cacert.pem:
value: ${kapicorp:tesoro:ssl:cacert}
webhooks:
- name: tesoro.kapicorp.com
failurePolicy: Fail
clientConfig:
service:
name: tesoro
namespace: ${namespace}
path: "/mutate"
caBundle: ${kapicorp:tesoro:ssl:cacert}
objectSelector:
matchLabels:
tesoro.kapicorp.com: enabled
rules:
- operations:
- CREATE
- UPDATE
apiGroups:
- ""
resources:
- "*"
apiVersions:
- "*"
- operations:
- CREATE
- UPDATE
apiGroups:
- "apps"
resources:
- "deployments"
apiVersions:
- "*"
cluster_role:
binding:
subjects:
- kind: ServiceAccount
name: tesoro
namespace: ${namespace}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tesoro
rules:
- apiGroups:
- ""
resources:
- pods
- events
- secrets
- configmaps
verbs:
- "*"
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- "*"