forked from openstack-k8s-operators/openstack-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanagers.yaml
More file actions
105 lines (105 loc) · 3.2 KB
/
Copy pathmanagers.yaml
File metadata and controls
105 lines (105 loc) · 3.2 KB
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
{{ range .ServiceOperators }}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
control-plane: controller-manager
openstack.org/operator-name: {{ .Name }}
name: {{ .Name }}-operator-controller-manager
namespace: {{ .Namespace }}
spec:
replicas: {{ .Deployment.Replicas }}
selector:
matchLabels:
openstack.org/operator-name: {{ .Name }}
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
openstack.org/operator-name: {{ .Name }}
spec:
containers:
- args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
command:
- /manager
env:
{{- range .Deployment.Manager.Env }}
- name: {{ .Name }}
value: '{{ .Value }}'
{{- end }}
image: {{ .Deployment.Manager.Image }}
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: manager
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: {{ .Deployment.Manager.Resources.Limits.CPU }}
memory: {{ .Deployment.Manager.Resources.Limits.Memory }}
requests:
cpu: {{ .Deployment.Manager.Resources.Requests.CPU }}
memory: {{ .Deployment.Manager.Resources.Requests.Memory }}
securityContext:
allowPrivilegeEscalation: false
{{- if isEnvVarTrue .Deployment.Manager.Env "ENABLE_WEBHOOKS" }}
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
readOnly: true
{{- end }}
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: {{ .Deployment.KubeRbacProxy.Image }}
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
protocol: TCP
resources:
limits:
cpu: {{ .Deployment.KubeRbacProxy.Resources.Limits.CPU }}
memory: {{ .Deployment.KubeRbacProxy.Resources.Limits.Memory }}
requests:
cpu: {{ .Deployment.KubeRbacProxy.Resources.Requests.CPU }}
memory: {{ .Deployment.KubeRbacProxy.Resources.Requests.Memory }}
securityContext:
allowPrivilegeEscalation: false
securityContext:
runAsNonRoot: true
serviceAccountName: {{ .Name }}-operator-controller-manager
terminationGracePeriodSeconds: 10
tolerations:
- key: "node.kubernetes.io/not-ready"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 120
- key: "node.kubernetes.io/unreachable"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 120
{{- if isEnvVarTrue .Deployment.Manager.Env "ENABLE_WEBHOOKS" }}
volumes:
- name: cert
secret:
defaultMode: 420
secretName: {{ .Name }}-operator-webhook-server-cert
{{ end }}
---
{{ end }}