Skip to content

Commit

Permalink
update vrt to 5.0 (#171)
Browse files Browse the repository at this point in the history
* update vrt to 5.0

Signed-off-by: André Bauer <andre.bauer@staffbase.com>

* change env setup to configmap

Signed-off-by: André Bauer <andre.bauer@staffbase.com>

* remove hardcoding

Signed-off-by: André Bauer <andre.bauer@staffbase.com>

* adjust comment

Signed-off-by: André Bauer <andre.bauer@staffbase.com>

* fix var and add labels

Signed-off-by: André Bauer <andre.bauer@staffbase.com>

* fix volume

Signed-off-by: André Bauer <andre.bauer@staffbase.com>

* fix volumemounts

Signed-off-by: André Bauer <andre.bauer@staffbase.com>

* fix permissions

Signed-off-by: André Bauer <andre.bauer@staffbase.com>

* add tmp mount

Signed-off-by: André Bauer <andre.bauer@staffbase.com>

* test

Signed-off-by: André Bauer <andre.bauer@staffbase.com>

* make tmpdir configurable

Signed-off-by: André Bauer <andre.bauer@staffbase.com>

---------

Signed-off-by: André Bauer <andre.bauer@staffbase.com>
  • Loading branch information
monotek committed Dec 5, 2023
1 parent eeae159 commit 7e615bf
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 8 deletions.
6 changes: 3 additions & 3 deletions charts/visual-regression-tracker/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ sources:
- https://github.com/Visual-Regression-Tracker/Visual-Regression-Tracker
- https://github.com/kokuwaio/helm-charts/tree/main/charts/visual-regression-tracker
type: application
version: 2.0.1
appVersion: "4.20.8"
version: 3.0.0
appVersion: "5.0.3"
maintainers:
- name: monotek
email: monotek23@gmail.com
dependencies:
- name: postgresql
version: 12.2.3
version: 13.2.23
repository: https://charts.bitnami.com/bitnami
condition: vrtConfig.postgresql.enabled
6 changes: 6 additions & 0 deletions charts/visual-regression-tracker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ helm upgrade vrt kokuwa/visual-regression-tracker

_See [`helm upgrade`](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._

### From 2.0.x to 3.0.0

This updates Visual Regression Tracker to 5.0.3. Please follow the [official migration steps](https://github.com/Visual-Regression-Tracker/Visual-Regression-Tracker/releases/tag/5.0.0):

The postgres dependency chart has also been updated to version 13.2.23. This major version changes the default PostgreSQL image from 15.x to 16.x. Follow [the official instructions](https://www.postgresql.org/docs/16/upgrading.html) to upgrade to 16.x.

### From 1.0.x to 2.0.0

Renamed migration securityContext var from `.Values.vrtComponents.migration.initSecurityContext` to `.Values.vrtComponents.migration.securityContext`
Expand Down
17 changes: 17 additions & 0 deletions charts/visual-regression-tracker/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: env-config
labels:
{{- include "visual-regression-tracker.labels" . | nindent 4 }}
data:
env.sh: |
#!/bin/sh
# dummy file which replaces env-config.js creation to be able to use rofs
cat env-config.js
env-config.js: |
window._env_ = {
REACT_APP_API_URL: "{{ .Values.vrtConfig.reactAppApiUrl }}",
PORT: "{{ .Values.vrtComponents.ui.service.port }}",
VRT_VERSION: "{{ .Chart.AppVersion }}",
}
19 changes: 17 additions & 2 deletions charts/visual-regression-tracker/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@ spec:
volumeMounts:
- name: {{ template "visual-regression-tracker.fullname" . }}
mountPath: /usr/share/nginx/html/static/imageUploads
- name: env-config
mountPath: /usr/share/nginx/html/env.sh
subPath: env.sh
- name: env-config
mountPath: /usr/share/nginx/html/env-config.js
subPath: env-config.js
- name: tmp
mountPath: /var/cache/nginx
- name: tmp
mountPath: /var/run
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -159,13 +169,18 @@ spec:
topologySpreadConstraints:
{{- toYaml .Values.topologySpreadConstraints | nindent 8 }}
{{- end }}
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
volumes:
- name: env-config
configMap:
name: env-config
defaultMode: 0777
- name: tmp
{{- toYaml .Values.vrtComponents.ui.tmpDirVolume | nindent 10 }}
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
- name: {{ template "visual-regression-tracker.fullname" . }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (include "visual-regression-tracker.fullname" .) }}
{{- else if not .Values.persistence.enabled }}
volumes:
- name: {{ template "visual-regression-tracker.fullname" . }}
emptyDir: {}
{{- else if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
Expand Down
10 changes: 7 additions & 3 deletions charts/visual-regression-tracker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ vrtComponents:
image:
repository: visualregressiontracker/api
pullPolicy: IfNotPresent
tag: "4.20.4"
tag: "5.0.4"

ingress:
enabled: false
Expand Down Expand Up @@ -79,7 +79,7 @@ vrtComponents:
image:
repository: visualregressiontracker/migration
pullPolicy: IfNotPresent
tag: "4.20.1"
tag: "5.0.1"

imagePullSecrets: []

Expand All @@ -106,7 +106,7 @@ vrtComponents:
image:
repository: visualregressiontracker/ui
pullPolicy: IfNotPresent
tag: "4.20.5"
tag: "5.0.2"

ingress:
enabled: false
Expand Down Expand Up @@ -147,6 +147,10 @@ vrtComponents:
type: ClusterIP
port: 8080

tmpDirVolume:
emptyDir:
sizeLimit: 100Mi

# Configuration for persistence
persistence:
enabled: true
Expand Down

0 comments on commit 7e615bf

Please sign in to comment.