Skip to content

Commit

Permalink
Add helm chart for workflows dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
daurer committed Nov 25, 2024
1 parent 5aee0f6 commit c84fb44
Show file tree
Hide file tree
Showing 13 changed files with 261 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/argocd-apps/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: argocd-apps
description: An argocd app to deploy apps inside the virtual cluster
type: application

version: 0.3.2
version: 0.4.0
3 changes: 3 additions & 0 deletions charts/argocd-apps/dev-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ workflows:

graphProxy:
enabled: true

dashboard:
enabled: true
34 changes: 34 additions & 0 deletions charts/argocd-apps/templates/dashboard-application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{- if .Values.dashboard.enabled }}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: dashboard
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "2"
spec:
destination:
namespace: dashboard
server: {{ .Values.destination.server }}
project: default
source:
repoURL: https://github.com/DiamondLightSource/workflows.git
path: charts/dashboard
targetRevision: {{ .Values.dashboard.targetRevision }}
helm:
valueFiles:
- values.yaml
{{- if .Values.dashboard.extraValueFiles }}
{{- .Values.dashboard.extraValueFiles | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.dashboard.valuesObject }}
valuesObject:
{{- .Values.dashboard.valuesObject | toYaml | nindent 8 }}
{{- end }}
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
{{- end }}
6 changes: 6 additions & 0 deletions charts/argocd-apps/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,9 @@ graphProxy:
targetRevision: HEAD
extraValuesFiles: []
valuesObject: {}

dashboard:
enabled: true
targetRevision: HEAD
extraValuesFiles: []
valuesObject: {}
1 change: 1 addition & 0 deletions charts/dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts/*.tgz
6 changes: 6 additions & 0 deletions charts/dashboard/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: oci://docker.io/bitnamicharts
version: 2.23.0
digest: sha256:c6a6a1cd877a7776095f62977d2fe441ee8b1145d624b6a57bc08dd52aa2611b
generated: "2024-11-22T15:02:10.155233161Z"
12 changes: 12 additions & 0 deletions charts/dashboard/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: dashboard
description: A dashboard for Diamond workflows
type: application

version: 0.1.0
appVersion: 0.1.0-rc23

dependencies:
- name: common
version: 2.23.0
repository: oci://docker.io/bitnamicharts
59 changes: 59 additions & 0 deletions charts/dashboard/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "common.names.fullname" $ }}
namespace: {{ .Release.Namespace }}
{{- with $.Values.deployment.annotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
spec:
replicas: {{ $.Values.deployment.replicas }}
selector:
matchLabels:
{{- include "common.labels.matchLabels" $ | nindent 6 }}
template:
metadata:
{{- with $.Values.deployment.podAnnotations }}
annotations:
{{- . | toYaml | nindent 8 }}
{{- end }}
labels:
{{- include "common.labels.matchLabels" $ | nindent 8 }}
spec:
{{- if $.Values.serviceAccount.create }}
serviceAccountName: {{ default (include "common.names.fullname" $) $.Values.serviceAccount.name }}
{{- else }}
serviceAccountName: {{ default "default" $.Values.serviceAccount.name }}
{{- end }}
imagePullSecrets: {{ include "common.images.renderPullSecrets" (dict "images" (list $.Values.image) "context" $ ) }}
containers:
- name: dashboard
image: {{ include "common.images.image" ( dict "imageRoot" $.Values.image "global" $.Values.global "chart" $.Chart ) }}
imagePullPolicy: {{ $.Values.image.pullPolicy }}
ports:
- name: dashboard
containerPort: 80
protocol: TCP
resources:
{{- $.Values.deployment.resources | toYaml | nindent 12 }}
{{- with $.Values.deployment.nodeSelector }}
nodeSelector:
{{- . | toYaml | nindent 8 }}
{{- end }}
{{- with $.Values.deployment.affinity }}
affinity:
{{- . | toYaml | nindent 8 }}
{{- end }}
{{- with $.Values.deployment.tolerations }}
tolerations:
{{- . | toYaml | nindent 8 }}
{{- end }}
livenessProbe:
{{- $.Values.deployment.livenessProbe | toYaml | nindent 12 }}
readinessProbe:
{{- $.Values.deployment.readinessProbe | toYaml | nindent 12 }}
startupProbe:
{{- $.Values.deployment.startupProbe | toYaml | nindent 12 }}
43 changes: 43 additions & 0 deletions charts/dashboard/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{{- if $.Values.ingress.create }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "common.names.fullname" $ }}
namespace: {{ .Release.Namespace }}
{{- with $.Values.ingress.annotations }}
annotations:
{{ . | toYaml | nindent 4 }}
{{- end }}
labels:
{{ include "common.labels.standard" $ | nindent 4 }}
spec:
{{- with $.Values.ingress.className }}
ingressClassName: {{ . }}
{{- end }}
{{- with $.Values.ingress.tls }}
tls:
{{- range . }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}
rules:
{{- range $.Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- with .pathType }}
pathType: {{ . }}
{{- end }}
backend:
service:
name: {{ include "common.names.fullname" $ }}
port:
number: {{ $.Values.service.port }}
{{- end }}
{{- end }}
{{- end }}
22 changes: 22 additions & 0 deletions charts/dashboard/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if $.Values.service.create }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.names.fullname" $ }}
namespace: {{ .Release.Namespace }}
{{- with $.Values.service.annotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
spec:
type: {{ $.Values.service.type }}
selector:
{{- include "common.labels.matchLabels" $ | nindent 4 }}
ports:
- name: dashboard
port: {{ $.Values.service.port }}
targetPort: dashboard
protocol: TCP
{{- end }}
13 changes: 13 additions & 0 deletions charts/dashboard/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if $.Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "common.names.fullname" $ }}
namespace: {{ .Release.Namespace }}
{{- with $.Values.serviceAccount.annotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- end }}
61 changes: 61 additions & 0 deletions charts/dashboard/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
image:
registry: ghcr.io
repository: diamondlightsource/workflows-dashboard
tag: ""
digest: ""
pullPolicy: IfNotPresent
pullSecrets: []

deployment:
replicas: 1
annotations: []
podAnnotations: []
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 1000m
memory: 1Gi
nodeSelector: {}
affinity: {}
tolerations: []
livenessProbe:
httpGet:
path: /healthcheck
port: 80
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /healthcheck
port: 80
initialDelaySeconds: 5
periodSeconds: 5
startupProbe:
httpGet:
path: /healthcheck
port: 80
failureThreshold: 30
periodSeconds: 10

service:
create: true
annotations: []
type: ClusterIP
port: 80

ingress:
create: true
className: nginx
tls: []
hosts:
- host: workflows.diamond.ac.uk
paths:
- path: /
pathType: Prefix

serviceAccount:
create: true
name: ""
annotations: []
1 change: 0 additions & 1 deletion charts/workflows/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ oauth2-proxy:
enabled: true
pathType: Prefix
hosts:
- workflows.diamond.ac.uk
- argo-workflows.workflows.diamond.ac.uk
path: /
tls:
Expand Down

0 comments on commit c84fb44

Please sign in to comment.