Skip to content

Commit

Permalink
Added namespacedScope value to the helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
qurname2 authored and koct9i committed Oct 30, 2024
1 parent cf3231e commit f826622
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ytop-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ spec:
env:
- name: YT_LOG_LEVEL
value: {{ quote .Values.controllerManager.manager.env.ytLogLevel }}
{{- if .Values.controllerManager.manager.namespacedScope }}
- name: WATCH_NAMESPACE
value: {{ quote .Values.controllerManager.manager.env.watchNamespace }}
value: {{ tpl (.Release.Namespace) $ }}
{{- end }}
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ quote .Values.kubernetesClusterDomain }}
image: {{ .Values.controllerManager.manager.image.repository }}:{{ .Values.controllerManager.manager.image.tag
Expand Down
15 changes: 15 additions & 0 deletions ytop-chart/templates/validating-webhook-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ webhooks:
path: /validate-cluster-ytsaurus-tech-v1-chyt
failurePolicy: Fail
name: vchyt.kb.io
{{- if .Values.controllerManager.manager.namespacedScope }}
namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ .Release.Namespace }}
{{- end }}
rules:
- apiGroups:
- cluster.ytsaurus.tech
Expand All @@ -36,6 +41,11 @@ webhooks:
path: /validate-cluster-ytsaurus-tech-v1-spyt
failurePolicy: Fail
name: vspyt.kb.io
{{- if .Values.controllerManager.manager.namespacedScope }}
namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ .Release.Namespace }}
{{- end }}
rules:
- apiGroups:
- cluster.ytsaurus.tech
Expand All @@ -56,6 +66,11 @@ webhooks:
path: /validate-cluster-ytsaurus-tech-v1-ytsaurus
failurePolicy: Fail
name: vytsaurus.kb.io
{{- if .Values.controllerManager.manager.namespacedScope }}
namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ .Release.Namespace }}
{{- end }}
rules:
- apiGroups:
- cluster.ytsaurus.tech
Expand Down
1 change: 1 addition & 0 deletions ytop-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ controllerManager:
cpu: 5m
memory: 64Mi
manager:
namespacedScope: false
args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
Expand Down

0 comments on commit f826622

Please sign in to comment.