From 2057327dd63f07e7a0eabb831f3cfdd49d0d363b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Thu, 14 Jul 2022 13:57:30 +0200 Subject: [PATCH] [vrt] remove es dependency (#115) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * remove es dependency Signed-off-by: André Bauer * readonlyroot api Signed-off-by: André Bauer * fix jwt Signed-off-by: André Bauer * use ol value Signed-off-by: André Bauer * fix sort Signed-off-by: André Bauer * adjust resources Signed-off-by: André Bauer --- charts/visual-regression-tracker/Chart.yaml | 6 +- .../templates/statefulset.yaml | 2 + charts/visual-regression-tracker/values.yaml | 76 ++++++------------- 3 files changed, 25 insertions(+), 59 deletions(-) diff --git a/charts/visual-regression-tracker/Chart.yaml b/charts/visual-regression-tracker/Chart.yaml index 27b20f3..592c12f 100644 --- a/charts/visual-regression-tracker/Chart.yaml +++ b/charts/visual-regression-tracker/Chart.yaml @@ -5,16 +5,12 @@ home: https://visual-regression-tracker.com sources: - https://github.com/Visual-Regression-Tracker/Visual-Regression-Tracker type: application -version: 0.2.1 +version: 0.3.0 appVersion: "4.20.4" maintainers: - name: monotek email: monotek23@gmail.com dependencies: - - name: elasticsearch - version: "7.17.3" - repository: https://helm.elastic.co - condition: vrtConfig.elasticsearch.enabled - name: postgresql version: "11.6.15" repository: https://charts.bitnami.com/bitnami diff --git a/charts/visual-regression-tracker/templates/statefulset.yaml b/charts/visual-regression-tracker/templates/statefulset.yaml index f84f871..ff50200 100644 --- a/charts/visual-regression-tracker/templates/statefulset.yaml +++ b/charts/visual-regression-tracker/templates/statefulset.yaml @@ -64,8 +64,10 @@ spec: name: {{ template "visual-regression-tracker.elasticsearchSecretName" . }} key: {{ .Values.secrets.elasticsearch.secretKey }} {{- end }} + {{- if or .Values.vrtConfig.elasticsearch.host }} - name: ELASTIC_URL value: "{{ .Values.vrtConfig.elasticsearch.schema }}://{{ if .Values.vrtConfig.elasticsearch.user }}{{ .Values.vrtConfig.elasticsearch.user }}{{ end }}{{- if or .Values.vrtConfig.elasticsearch.pass .Values.secrets.elasticsearch.useExisting }}:$(ELASTICSEARCH_PASSWORD)@{{ end }}{{ .Values.vrtConfig.elasticsearch.host }}:{{ .Values.vrtConfig.elasticsearch.port }}" + {{- end }} - name: JWT_LIFE_TIME value: "{{ .Values.vrtConfig.jwt.lifeTime }}" - name: JWT_SECRET diff --git a/charts/visual-regression-tracker/values.yaml b/charts/visual-regression-tracker/values.yaml index 0cbaaf8..dcbf626 100644 --- a/charts/visual-regression-tracker/values.yaml +++ b/charts/visual-regression-tracker/values.yaml @@ -7,10 +7,7 @@ vrtConfig: appFrontendUrl: "http://localhost:8080" bodyParserJsonLimit: "5mb" elasticsearch: - # enable/disable elasticsearch chart dependency - enabled: true - # host env var is only used when zammadConfig.elasticsearch.enabled is false - host: vrt-master + host: "" pass: "" port: 9200 schema: http @@ -21,14 +18,14 @@ vrtConfig: postgresql: # enable/disable postgresql chart dependency enabled: true - # needs to be the same as the postgresql.postgresqlPassword + # needs to be the same as the postgresql.auth.password db: vrt - # host env var is only used when postgresql.enabled is false + # host env var is only used when vrtConfig.postgresql.enabled is false host: vrt-postgresql pass: "vrt-db-password" - # needs to be the same as the postgresql.postgresqlDatabase + # needs to be the same as the postgresql.auth.database port: 5432 - # needs to be the same as the postgresql.postgresqlUsername + # needs to be the same as the postgresql.auth.username user: vrt reactAppApiUrl: "http://localhost:4200" @@ -71,6 +68,7 @@ podAnnotations: {} podSecurityContext: {} # fsGroup: 2000 +# if used > 1 you need a ReadWriteMany storageclass replicaCount: 1 serviceAccount: @@ -123,10 +121,10 @@ api: # lines, adjust them as necessary, and remove the curly braces after 'resources:'. # limits: # cpu: 100m - # memory: 128Mi + # memory: 512Mi # requests: # cpu: 100m - # memory: 128Mi + # memory: 512Mi migration: image: @@ -136,11 +134,11 @@ migration: imagePullSecrets: [] - securityContext: {} + securityContext: # capabilities: # drop: # - ALL - # readOnlyRootFilesystem: true + readOnlyRootFilesystem: true # runAsNonRoot: true # runAsUser: 1000 @@ -162,13 +160,13 @@ ui: pullPolicy: IfNotPresent tag: "4.20.3" - securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 + securityContext: + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 service: type: ClusterIP @@ -202,37 +200,7 @@ ui: # cpu: 100m # memory: 128Mi -# dependency charts config -elasticsearch: - clusterName: vrt - replicas: 1 - # Workaround to get helm test to work in GitHub action CI - # the [ES chart](https://github.com/elastic/helm-charts/tree/master/elasticsearch) - # default would be: "wait_for_status=green&timeout=1s" - # see: - clusterHealthCheckParams: "wait_for_status=yellow&timeout=1s" - resources: {} - # requests: - # cpu: "100m" - # memory: "2Gi" - # limits: - # cpu: "1000m" - # memory: "2Gi" - initResources: {} - # limits: - # cpu: "25m" - # # memory: "128Mi" - # requests: - # cpu: "25m" - # memory: "128Mi" - sidecarResources: {} - # limits: - # cpu: "25m" - # # memory: "128Mi" - # requests: - # cpu: "25m" - # memory: "128Mi" - +# dependency chart config postgresql: auth: database: vrt @@ -241,8 +209,8 @@ postgresql: fullnameOverride: vrt-postgresql resources: {} # limits: - # cpu: 100m - # memory: 128Mi + # cpu: 50m + # memory: 64Mi # requests: - # cpu: 100m - # memory: 128Mi + # cpu: 50m + # memory: 64Mi