Skip to content

Commit

Permalink
[sophora-webclient]: extra deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-schoener committed Nov 2, 2023
1 parent c732edb commit 619bb3a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/sophora-webclient/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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: 1.0.1
version: 1.1.0

# 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
Expand Down
14 changes: 14 additions & 0 deletions charts/sophora-webclient/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,17 @@ Binary Configmap Name
{{- define "webclient.binaryConfigName" -}}
{{- printf "%s-binary-config" (include "webclient.fullname" . | trunc 49 | trimSuffix "-" ) -}}
{{- end }}


{{/*
Renders a value that contains template.
Usage:
{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "common.tplvalues.render" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
5 changes: 5 additions & 0 deletions charts/sophora-webclient/templates/extra-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{- range .Values.extraDeploy }}
---
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
{{- end }}

20 changes: 20 additions & 0 deletions charts/sophora-webclient/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,23 @@ webclient:
abc: test
a:
b: test2

extraDeploy:
- |
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: sophora-webclient
spec:
scaleTargetRef:
name: sophora-webclient
maxReplicaCount: 1
minReplicaCount: 0
pollingInterval: 30
triggers:
- type: cron
metadata:
timezone: Europe/Berlin
start: 0 6 * * 1,2,3,4,5
end: 0 23 * * 1,2,3,4,5
desiredReplicas: "1"
2 changes: 2 additions & 0 deletions charts/sophora-webclient/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ ingress:
hosts:
annotations: {}

extraDeploy: []

serviceMonitor:
enabled: false
interval: 10s
Expand Down

0 comments on commit 619bb3a

Please sign in to comment.