forked from projectsveltos/shard-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclassifier.go
More file actions
91 lines (87 loc) · 2.48 KB
/
Copy pathclassifier.go
File metadata and controls
91 lines (87 loc) · 2.48 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
// Generated by *go generate* - DO NOT EDIT
/*
Copyright 2023. projectsveltos.io. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package sharding
var classifierTemplate = []byte(`apiVersion: apps/v1
kind: Deployment
metadata:
labels:
control-plane: classifier
name: classifier-manager-{{.SHARD}}
namespace: projectsveltos
spec:
replicas: 1
selector:
matchLabels:
control-plane: classifier
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: classifier
spec:
containers:
- args:
- --diagnostics-address=:8443
- --report-mode=0
- --shard-key={{.SHARD}}
- --capi-onboard-annotation=
- --v=5
- --version=v0.55.0
- --registry=
- --agent-in-mgmt-cluster=false
command:
- /manager
image: docker.io/projectsveltos/classifier@sha256:2087ec38185a3b52bdf08805f69b3ce2fbd5da9f85c47bdf7e5db519fe3ce38b
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: healthz
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 20
name: manager
ports:
- containerPort: 8443
name: metrics
protocol: TCP
- containerPort: 9440
name: healthz
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /readyz
port: healthz
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 128Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
securityContext:
runAsNonRoot: true
serviceAccountName: classifier-manager
terminationGracePeriodSeconds: 10
`)