@@ -30,113 +30,35 @@ spec:
3030 heritage : {{ .Release.Service }}
3131 spec :
3232 containers :
33- {{- if not .Values.onMulticlusterHub }}
34- - name : spec-sync
35- image : " {{ .Values.global.imageOverrides.governance_policy_spec_sync }}"
33+ - name : governance-policy-framework-addon
34+ image : " {{ .Values.global.imageOverrides.governance_policy_framework_addon }}"
3635 imagePullPolicy : " {{ .Values.global.imagePullPolicy }}"
37- command : ["governance-policy-spec-sync"]
38- args :
39- - ' --hub-cluster-configfile=/var/run/klusterlet/kubeconfig'
40- - ' --health-probe-bind-address=:8081'
41- {{- if semverCompare "< 1.14.0" .Capabilities.KubeVersion.Version }}
42- - --legacy-leader-elect=true
43- {{- end }}
44- - --log-encoder={{ .Values.args.logEncoder }}
45- - --log-level={{ .Values.args.logLevel }}
46- - --v={{ .Values.args.pkgLogLevel }}
47- {{- if eq .Values.installMode "Hosted" }}
48- - --target-namespace={{ .Release.Namespace }}
49- {{- end }}
50- env :
51- - name : WATCH_NAMESPACE
52- value : {{ .Values.clusterName }}
53- - name : POD_NAME
54- valueFrom :
55- fieldRef :
56- fieldPath : metadata.name
57- - name : OPERATOR_NAME
58- value : " governance-policy-spec-sync"
59- {{- if .Values.global.proxyConfig }}
60- - name : HTTP_PROXY
61- value : {{ .Values.global.proxyConfig.HTTP_PROXY }}
62- - name : HTTPS_PROXY
63- value : {{ .Values.global.proxyConfig.HTTPS_PROXY }}
64- - name : NO_PROXY
65- value : {{ .Values.global.proxyConfig.NO_PROXY }}
66- {{- end }}
67- livenessProbe :
68- httpGet :
69- path : /healthz
70- port : 8081
71- failureThreshold : 3
72- periodSeconds : 10
73- {{- if semverCompare "< 1.20.0" .Capabilities.KubeVersion.Version }}
74- initialDelaySeconds : 300
75- {{- end }}
76- readinessProbe :
77- httpGet :
78- path : /readyz
79- port : 8081
80- failureThreshold : 3
81- periodSeconds : 10
82- {{- if semverCompare "< 1.20.0" .Capabilities.KubeVersion.Version }}
83- initialDelaySeconds : 300
84- {{- end }}
85- {{- if semverCompare ">= 1.20.0" .Capabilities.KubeVersion.Version }}
86- {{- /* startupProbe became stable in k8s 1.20 */}}
87- startupProbe :
88- httpGet :
89- path : /readyz
90- port : 8081
91- failureThreshold : 30
92- periodSeconds : 10
93- {{- end }}
94- resources : {{- toYaml .Values.resources | nindent 10 }}
95- securityContext :
96- allowPrivilegeEscalation : false
97- capabilities :
98- drop :
99- - ALL
100- privileged : false
101- readOnlyRootFilesystem : true
102- volumeMounts :
103- - name : klusterlet-config
104- mountPath : /var/run/klusterlet
105- {{- end }}
106- - name : status-sync
107- image : " {{ .Values.global.imageOverrides.governance_policy_status_sync }}"
108- imagePullPolicy : " {{ .Values.global.imagePullPolicy }}"
109- command : ["governance-policy-status-sync"]
36+ command : ["governance-policy-framework-addon"]
11037 args :
11138 - ' --enable-lease=true'
11239 - ' --hub-cluster-configfile=/var/run/klusterlet/kubeconfig'
113- - ' --health-probe-bind-address=:8082'
11440 {{- if semverCompare "< 1.14.0" .Capabilities.KubeVersion.Version }}
11541 - --legacy-leader-elect=true
11642 {{- end }}
11743 - --log-encoder={{ .Values.args.logEncoder }}
11844 - --log-level={{ .Values.args.logLevel }}
11945 - --v={{ .Values.args.pkgLogLevel }}
46+ {{- if .Values.onMulticlusterHub }}
47+ - --disable-spec-sync=true
48+ {{- end }}
12049 {{- if eq .Values.installMode "Hosted" }}
50+ - --cluster-namespace={{ .Release.Namespace }}
51+ - --cluster-namespace-on-hub={{ .Values.clusterName }}
52+ {{- else }}
12153 - --cluster-namespace={{ .Values.clusterName }}
12254 {{- end }}
12355 env :
124- - name : WATCH_NAMESPACE
125- {{- if eq .Values.installMode "Hosted" }}
126- value : {{ .Release.Namespace }}
127- {{- else }}
128- value : {{ .Values.clusterName }}
129- {{- end }}
13056 - name : POD_NAME
13157 valueFrom :
13258 fieldRef :
13359 fieldPath : metadata.name
13460 - name : OPERATOR_NAME
135- value : " governance-policy-status-sync"
136- {{- if .Values.onMulticlusterHub }}
137- - name : ON_MULTICLUSTERHUB
138- value : " true"
139- {{- end }}
61+ value : " governance-policy-framework-addon"
14062 {{- if .Values.global.proxyConfig }}
14163 - name : HTTP_PROXY
14264 value : {{ .Values.global.proxyConfig.HTTP_PROXY }}
14870 livenessProbe :
14971 httpGet :
15072 path : /healthz
151- port : 8082
73+ port : 8080
15274 failureThreshold : 3
15375 periodSeconds : 10
15476 {{- if semverCompare "< 1.20.0" .Capabilities.KubeVersion.Version }}
15779 readinessProbe :
15880 httpGet :
15981 path : /readyz
160- port : 8082
82+ port : 8080
16183 failureThreshold : 3
16284 periodSeconds : 10
16385 {{- if semverCompare "< 1.20.0" .Capabilities.KubeVersion.Version }}
16890 startupProbe :
16991 httpGet :
17092 path : /readyz
171- port : 8082
93+ port : 8080
17294 failureThreshold : 30
17395 periodSeconds : 10
17496 {{- end }}
@@ -183,74 +105,6 @@ spec:
183105 volumeMounts :
184106 - name : klusterlet-config
185107 mountPath : /var/run/klusterlet
186- - name : template-sync
187- image : " {{ .Values.global.imageOverrides.governance_policy_template_sync }}"
188- imagePullPolicy : " {{ .Values.global.imagePullPolicy }}"
189- command : ["governance-policy-template-sync"]
190- args :
191- {{- if semverCompare "< 1.14.0" .Capabilities.KubeVersion.Version }}
192- - --legacy-leader-elect=true
193- {{- end }}
194- - --log-encoder={{ .Values.args.logEncoder }}
195- - --log-level={{ .Values.args.logLevel }}
196- - --v={{ .Values.args.pkgLogLevel }}
197- - --health-probe-bind-address=:8083
198- env :
199- - name : WATCH_NAMESPACE
200- {{- if eq .Values.installMode "Hosted" }}
201- value : {{ .Release.Namespace }}
202- {{- else }}
203- value : {{ .Values.clusterName }}
204- {{- end }}
205- - name : POD_NAME
206- valueFrom :
207- fieldRef :
208- fieldPath : metadata.name
209- - name : OPERATOR_NAME
210- value : " governance-policy-template-sync"
211- {{- if .Values.global.proxyConfig }}
212- - name : HTTP_PROXY
213- value : {{ .Values.global.proxyConfig.HTTP_PROXY }}
214- - name : HTTPS_PROXY
215- value : {{ .Values.global.proxyConfig.HTTPS_PROXY }}
216- - name : NO_PROXY
217- value : {{ .Values.global.proxyConfig.NO_PROXY }}
218- {{- end }}
219- livenessProbe :
220- httpGet :
221- path : /healthz
222- port : 8083
223- failureThreshold : 3
224- periodSeconds : 10
225- {{- if semverCompare "< 1.20.0" .Capabilities.KubeVersion.Version }}
226- initialDelaySeconds : 300
227- {{- end }}
228- readinessProbe :
229- httpGet :
230- path : /readyz
231- port : 8083
232- failureThreshold : 3
233- periodSeconds : 10
234- {{- if semverCompare "< 1.20.0" .Capabilities.KubeVersion.Version }}
235- initialDelaySeconds : 300
236- {{- end }}
237- {{- if semverCompare ">= 1.20.0" .Capabilities.KubeVersion.Version }}
238- {{- /* startupProbe became stable in k8s 1.20 */}}
239- startupProbe :
240- httpGet :
241- path : /readyz
242- port : 8083
243- failureThreshold : 30
244- periodSeconds : 10
245- {{- end }}
246- resources : {{- toYaml .Values.resources | nindent 10 }}
247- securityContext :
248- allowPrivilegeEscalation : false
249- capabilities :
250- drop :
251- - ALL
252- privileged : false
253- readOnlyRootFilesystem : true
254108 volumes :
255109 - name : klusterlet-config
256110 secret :
0 commit comments