Skip to content

Commit

Permalink
Merge pull request #6 from bsctl/main
Browse files Browse the repository at this point in the history
adding back ingress and node selectors
  • Loading branch information
gianlucam76 authored Nov 28, 2024
2 parents 45668c7 + 649618a commit 9de4665
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/sveltos-dashboard/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.2
version: 0.1.3
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
Expand Down
8 changes: 7 additions & 1 deletion charts/sveltos-dashboard/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ spec:
runAsNonRoot: true
serviceAccountName: ui-backend-manager
terminationGracePeriodSeconds: 10
nodeSelector: {{- toYaml .Values.uiBackendManager.nodeSelector | nindent 8 }}
affinity: {{- toYaml .Values.uiBackendManager.affinity | nindent 8 }}
tolerations: {{- toYaml .Values.uiBackendManager.tolerations | nindent 8 }}
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -100,4 +103,7 @@ spec:
name: dashboard
ports:
- containerPort: 5173
resources: {}
resources: {}
nodeSelector: {{- toYaml .Values.dashboard.nodeSelector | nindent 8 }}
affinity: {{- toYaml .Values.dashboard.affinity | nindent 8 }}
tolerations: {{- toYaml .Values.dashboard.tolerations | nindent 8 }}
43 changes: 43 additions & 0 deletions charts/sveltos-dashboard/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{{- if .Values.dashboard.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: dashboard
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: ui-backend
app.kubernetes.io/part-of: ui-backend
{{- include "projectsveltos.labels" . | nindent 4 }}
annotations:
{{- range $key, $value := .Values.dashboard.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
ingressClassName: {{ .Values.dashboard.ingress.className }}
rules:
{{- range .Values.dashboard.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: dashboard
port:
number: {{ (index $.Values.dashboard.ports 0).port }}
{{- end }}
{{- end }}
{{- if .Values.dashboard.ingress.tls }}
tls:
{{- range .Values.dashboard.dashboard.ingress.tls }}
- secretName: {{ .secretName }}
hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
21 changes: 21 additions & 0 deletions charts/sveltos-dashboard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ dashboard:
targetPort: 5173
replicas: 1
type: ClusterIP
ingress:
enabled: false
className: ""
annotations: {}
hosts:
- host: dashboard.cluster.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - dashboard.cluster.local
tolerations: []
nodeSelector:
kubernetes.io/os: linux
affinity: {}
kubernetesClusterDomain: cluster.local
uiBackendManager:
manager:
Expand Down Expand Up @@ -36,3 +53,7 @@ uiBackendManager:
targetPort: 8080
replicas: 1
type: ClusterIP
tolerations: []
nodeSelector:
kubernetes.io/os: linux
affinity: {}

0 comments on commit 9de4665

Please sign in to comment.