forked from projectsveltos/classifier
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsveltos-applier.go
More file actions
167 lines (163 loc) · 4.12 KB
/
Copy pathsveltos-applier.go
File metadata and controls
167 lines (163 loc) · 4.12 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
// Generated by *go generate* - DO NOT EDIT
/*
Copyright 2022-25. 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 agent
var sveltosApplierYAML = []byte(`apiVersion: v1
kind: Namespace
metadata:
labels:
app.kubernetes.io/name: sveltos-applier
name: projectsveltos
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/name: sveltos-applier
name: sveltos-applier-manager
namespace: projectsveltos
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: sveltos-applier-manager-role
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/name: sveltos-applier
name: sveltos-applier-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: sveltos-applier-manager-role
subjects:
- kind: ServiceAccount
name: sveltos-applier-manager
namespace: projectsveltos
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: sveltos-applier
name: sveltos-applier-metrics-service
namespace: projectsveltos
spec:
ports:
- name: https
port: 8443
protocol: TCP
targetPort: 8443
selector:
app.kubernetes.io/name: sveltos-applier
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: sveltos-applier
name: sveltos-applier-manager
namespace: projectsveltos
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: sveltos-applier
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: controller
labels:
app.kubernetes.io/name: sveltos-applier
spec:
containers:
- args:
- --diagnostics-address=:8443
- --cluster-namespace=
- --cluster-name=
- --cluster-type=
- --secret-with-kubeconfig=
- --v=5
- --version=main
command:
- /manager
env:
- name: TOTAL_MEMORY_LIMIT
valueFrom:
resourceFieldRef:
resource: limits.memory
- name: GOMAXPROCS
valueFrom:
resourceFieldRef:
resource: limits.cpu
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: docker.io/projectsveltos/sveltos-applier@sha256:46c46c8c4617a7a20c96cec5bce66d3ee1cf494123a07bf86574782e66d1c80e
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: healthz
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 20
name: controller
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: 200m
memory: 512Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumeMounts: []
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: sveltos-applier-manager
terminationGracePeriodSeconds: 10
volumes: []
`)