Skip to content

Commit

Permalink
feat: Add support for disabling router (#96)
Browse files Browse the repository at this point in the history
Signed-off-by: 0xThresh.eth <[email protected]>
  • Loading branch information
0xThresh authored Feb 9, 2025
1 parent e16934d commit 1ad41fd
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions helm/templates/deployment-router.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.routerSpec.enableRouter -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -71,3 +72,4 @@ spec:
httpGet:
path: /health
port: {{ .Values.routerSpec.containerPort }}
{{- end }}
2 changes: 1 addition & 1 deletion helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 2 additions & 0 deletions helm/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.routerSpec.enableRouter -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
Expand All @@ -7,3 +8,4 @@ rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["pods"]
verbs: ["get", "watch", "list"]
{{- end }}
2 changes: 2 additions & 0 deletions helm/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.routerSpec.enableRouter -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
Expand All @@ -11,3 +12,4 @@ roleRef:
kind: Role
name: {{ .Release.Name }}-pod-reader
apiGroup: rbac.authorization.k8s.io
{{- end }}
2 changes: 2 additions & 0 deletions helm/templates/service-router.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.routerSpec.enableRouter -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -14,3 +15,4 @@ spec:
protocol: TCP
selector:
{{- include "chart.routerLabels" . | nindent 4 }}
{{- end }}
2 changes: 2 additions & 0 deletions helm/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{- if .Values.routerSpec.enableRouter -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: "{{ .Release.Name }}-router-service-account"
namespace: {{ .Release.Namespace }}
{{- end }}
3 changes: 3 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ servingEngineSpec:
runtimeClassName: "nvidia"

routerSpec:
# -- Whether to enable the router service
enableRouter: true

# -- Number of replicas
replicaCount: 1

Expand Down

0 comments on commit 1ad41fd

Please sign in to comment.