diff --git a/charts/sveltos-dashboard/Chart.yaml b/charts/sveltos-dashboard/Chart.yaml index 537d48c..63bfb88 100644 --- a/charts/sveltos-dashboard/Chart.yaml +++ b/charts/sveltos-dashboard/Chart.yaml @@ -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. diff --git a/charts/sveltos-dashboard/templates/deployment.yaml b/charts/sveltos-dashboard/templates/deployment.yaml index b0e59d8..617ebb6 100644 --- a/charts/sveltos-dashboard/templates/deployment.yaml +++ b/charts/sveltos-dashboard/templates/deployment.yaml @@ -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 @@ -100,4 +103,7 @@ spec: name: dashboard ports: - containerPort: 5173 - resources: {} \ No newline at end of file + resources: {} + nodeSelector: {{- toYaml .Values.dashboard.nodeSelector | nindent 8 }} + affinity: {{- toYaml .Values.dashboard.affinity | nindent 8 }} + tolerations: {{- toYaml .Values.dashboard.tolerations | nindent 8 }} diff --git a/charts/sveltos-dashboard/templates/ingress.yaml b/charts/sveltos-dashboard/templates/ingress.yaml new file mode 100644 index 0000000..3258db7 --- /dev/null +++ b/charts/sveltos-dashboard/templates/ingress.yaml @@ -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 }} \ No newline at end of file diff --git a/charts/sveltos-dashboard/values.yaml b/charts/sveltos-dashboard/values.yaml index a3e0dd0..de8ad5b 100644 --- a/charts/sveltos-dashboard/values.yaml +++ b/charts/sveltos-dashboard/values.yaml @@ -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: @@ -36,3 +53,7 @@ uiBackendManager: targetPort: 8080 replicas: 1 type: ClusterIP + tolerations: [] + nodeSelector: + kubernetes.io/os: linux + affinity: {}