@@ -183,7 +183,7 @@ rules:
183183 - list
184184 - watch
185185---
186- {{- if .Values.controller.clusterwide -}}
186+ {{- if and (not .Values.controller.skipClusterRoleCreation) (or .Values.controller. clusterwide .Values.controller.watchNamespaces) -}}
187187apiVersion : rbac.authorization.k8s.io/v1
188188kind : ClusterRole
189189metadata :
@@ -351,11 +351,11 @@ subjects:
351351 name : seldon-v2-controller-manager
352352 namespace : ' {{ .Release.Namespace }}'
353353---
354- {{- if .Values.controller.clusterwide -}}
354+ {{- if or .Values.controller.clusterwide .Values.controller.watchNamespaces -}}
355355apiVersion : rbac.authorization.k8s.io/v1
356356kind : ClusterRoleBinding
357357metadata :
358- name : seldon-v2-manager-rolebinding
358+ name : seldon-v2-manager-rolebinding-{{ .Release.Namespace }}
359359roleRef :
360360 apiGroup : rbac.authorization.k8s.io
361361 kind : ClusterRole
@@ -408,6 +408,7 @@ spec:
408408 - args :
409409 - --health-probe-bind-address=:8081
410410 - --leader-elect
411+ - --watch-namespaces=$(WATCH_NAMESPACES)
411412 - --namespace=$(POD_NAMESPACE)
412413 - --clusterwide=$(CLUSTERWIDE)
413414 - --log-level=$(LOG_LEVEL)
@@ -434,6 +435,8 @@ spec:
434435 - name : LOG_LEVEL
435436 value : ' {{ hasKey .Values.controller "logLevel" | ternary .Values.controller.logLevel
436437 .Values.logging.logLevel }}'
438+ - name : WATCH_NAMESPACES
439+ value : ' {{ join "," .Values.controller.watchNamespaces }}'
437440 - name : POD_NAMESPACE
438441 valueFrom :
439442 fieldRef :
@@ -1270,6 +1273,8 @@ spec:
12701273 value : " 9006"
12711274 - name : SELDON_DRAINER_PORT
12721275 value : " 9007"
1276+ - name : SELDON_READINESS_PORT
1277+ value : " 9008"
12731278 - name : AGENT_TLS_SECRET_NAME
12741279 value : " "
12751280 - name : AGENT_TLS_FOLDER_PATH
@@ -1312,12 +1317,26 @@ spec:
13121317 - containerPort : 9006
13131318 name : metrics
13141319 protocol : TCP
1320+ - containerPort : 9008
1321+ name : readiness-port
1322+ readinessProbe :
1323+ failureThreshold : 1
1324+ httpGet :
1325+ path : /ready
1326+ port : 9008
1327+ periodSeconds : 5
13151328 resources :
13161329 limits :
13171330 memory : ' {{ .Values.serverConfig.agent.resources.memory }}'
13181331 requests :
13191332 cpu : ' {{ .Values.serverConfig.agent.resources.cpu }}'
13201333 memory : ' {{ .Values.serverConfig.agent.resources.memory }}'
1334+ startupProbe :
1335+ failureThreshold : 60
1336+ httpGet :
1337+ path : /ready
1338+ port : 9008
1339+ periodSeconds : 15
13211340 volumeMounts :
13221341 - mountPath : /mnt/agent
13231342 name : mlserver-models
@@ -1543,6 +1562,8 @@ spec:
15431562 value : " 9006"
15441563 - name : SELDON_DRAINER_PORT
15451564 value : " 9007"
1565+ - name : SELDON_READINESS_PORT
1566+ value : " 9008"
15461567 - name : SELDON_SERVER_TYPE
15471568 value : triton
15481569 - name : POD_NAME
@@ -1577,12 +1598,26 @@ spec:
15771598 - containerPort : 9006
15781599 name : metrics
15791600 protocol : TCP
1601+ - containerPort : 9008
1602+ name : readiness-port
1603+ readinessProbe :
1604+ failureThreshold : 1
1605+ httpGet :
1606+ path : /ready
1607+ port : 9008
1608+ periodSeconds : 5
15801609 resources :
15811610 limits :
15821611 memory : ' {{ .Values.serverConfig.agent.resources.memory }}'
15831612 requests :
15841613 cpu : ' {{ .Values.serverConfig.agent.resources.cpu }}'
15851614 memory : ' {{ .Values.serverConfig.agent.resources.memory }}'
1615+ startupProbe :
1616+ failureThreshold : 60
1617+ httpGet :
1618+ path : /ready
1619+ port : 9008
1620+ periodSeconds : 15
15861621 volumeMounts :
15871622 - mountPath : /mnt/agent
15881623 name : triton-models
0 commit comments