diff --git a/helm/templates/deployment-router.yaml b/helm/templates/deployment-router.yaml index b7636a2..5349bf0 100644 --- a/helm/templates/deployment-router.yaml +++ b/helm/templates/deployment-router.yaml @@ -1,3 +1,4 @@ +{{- if .Values.routerSpec.enableRouter -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -71,3 +72,4 @@ spec: httpGet: path: /health port: {{ .Values.routerSpec.containerPort }} +{{- end }} diff --git a/helm/templates/ingress.yaml b/helm/templates/ingress.yaml index da8a0d4..5008260 100644 --- a/helm/templates/ingress.yaml +++ b/helm/templates/ingress.yaml @@ -1,4 +1,4 @@ -{{- if .Values.routerSpec.ingress.enabled -}} +{{- if and (.Values.routerSpec.enableRouter) (.Values.routerSpec.ingress.enabled) -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: diff --git a/helm/templates/role.yaml b/helm/templates/role.yaml index a138fb5..3e45c9e 100644 --- a/helm/templates/role.yaml +++ b/helm/templates/role.yaml @@ -1,3 +1,4 @@ +{{- if .Values.routerSpec.enableRouter -}} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -7,3 +8,4 @@ rules: - apiGroups: [""] # "" indicates the core API group resources: ["pods"] verbs: ["get", "watch", "list"] +{{- end }} diff --git a/helm/templates/rolebinding.yaml b/helm/templates/rolebinding.yaml index 04f2dfc..a04218e 100644 --- a/helm/templates/rolebinding.yaml +++ b/helm/templates/rolebinding.yaml @@ -1,3 +1,4 @@ +{{- if .Values.routerSpec.enableRouter -}} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: @@ -11,3 +12,4 @@ roleRef: kind: Role name: {{ .Release.Name }}-pod-reader apiGroup: rbac.authorization.k8s.io +{{- end }} diff --git a/helm/templates/service-router.yaml b/helm/templates/service-router.yaml index 847f44d..e90529a 100644 --- a/helm/templates/service-router.yaml +++ b/helm/templates/service-router.yaml @@ -1,3 +1,4 @@ +{{- if .Values.routerSpec.enableRouter -}} apiVersion: v1 kind: Service metadata: @@ -14,3 +15,4 @@ spec: protocol: TCP selector: {{- include "chart.routerLabels" . | nindent 4 }} +{{- end }} diff --git a/helm/templates/serviceaccount.yaml b/helm/templates/serviceaccount.yaml index 93face5..ad99564 100644 --- a/helm/templates/serviceaccount.yaml +++ b/helm/templates/serviceaccount.yaml @@ -1,5 +1,7 @@ +{{- if .Values.routerSpec.enableRouter -}} apiVersion: v1 kind: ServiceAccount metadata: name: "{{ .Release.Name }}-router-service-account" namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/helm/values.yaml b/helm/values.yaml index 4f6f154..daa8018 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -131,6 +131,9 @@ servingEngineSpec: runtimeClassName: "nvidia" routerSpec: + # -- Whether to enable the router service + enableRouter: true + # -- Number of replicas replicaCount: 1