From 3b5662a0982c4b2c7da1abc78f3c8a751243b807 Mon Sep 17 00:00:00 2001 From: Maarten de Waard Date: Wed, 6 Oct 2021 14:38:20 +0200 Subject: [PATCH] process feedback --- .env | 2 - .gitignore | 1 + .gitlab-ci.yml | 4 +- deployment/helmchart/templates/_helpers.tpl | 12 ++--- .../helmchart/templates/configmaps.yaml | 2 - .../helmchart/templates/deployment.yaml | 2 - deployment/helmchart/values.yaml | 54 +++++++++---------- 7 files changed, 36 insertions(+), 41 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index 1542add..0000000 --- a/.env +++ /dev/null @@ -1,2 +0,0 @@ -REACT_APP_API_URL=/api/v1 -EXTEND_ESLINT=true diff --git a/.gitignore b/.gitignore index 0498d9c..27f16a3 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ # misc .DS_Store +.env .env.local .env.development.local .env.test.local diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93c1dda..a1ed1b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,8 +13,8 @@ build-project: script: - echo "Building app" - yarn install - # - echo "REACT_APP_API_URL=https://oas-api.initdevelopment.com/api/v1" > .env - # - echo "EXTEND_ESLINT=true" >> .env + - echo "REACT_APP_API_URL=/api/v1" > .env + - echo "EXTEND_ESLINT=true" >> .env - yarn build - mv build web-build - echo "Build successful" diff --git a/deployment/helmchart/templates/_helpers.tpl b/deployment/helmchart/templates/_helpers.tpl index 06461ec..c05dc41 100644 --- a/deployment/helmchart/templates/_helpers.tpl +++ b/deployment/helmchart/templates/_helpers.tpl @@ -18,7 +18,7 @@ Return the proper container image registry secret names {{- end -}} {{/* -Return true if a secret object for Admin-frontend should be created +Return true if a secret object for backend should be created */}} {{- define "backend.createSecret" -}} {{- if or (not .Values.backend.existingSecret) (and (not .Values.backend.smtp.existingSecret) .Values.backend.smtp.password .Values.backend.smtp.enabled) }} @@ -27,7 +27,7 @@ Return true if a secret object for Admin-frontend should be created {{- end -}} {{/* -Return the Admin-backend secret name +Return the backend secret name */}} {{- define "backend.secretName" -}} {{- if .Values.backend.existingSecret }} @@ -38,7 +38,7 @@ Return the Admin-backend secret name {{- end -}} {{/* -Return the Admin-backend SMTP secret name +Return the backend SMTP secret name */}} {{- define "backend.smtp.secretName" -}} {{- if .Values.backend.smtp.existingSecret }} @@ -49,7 +49,7 @@ Return the Admin-backend SMTP secret name {{- end -}} {{/* -Return true if Admin-backend SMTP uses password authentication +Return true if backend SMTP uses password authentication */}} {{- define "backend.smtp.password.enabled" -}} {{- if and (or .Values.backend.smtp.password .Values.backend.smtp.existingSecret) .Values.backend.smtp.enabled }} @@ -114,13 +114,13 @@ If not using ClusterIP, or if a host or LoadBalancerIP is not defined, the value {{- end -}} {{/* -Return the proper Admin-frontend image name +Return the proper frontend image name */}} {{- define "frontend.image" -}} {{ include "common.images.image" (dict "imageRoot" .Values.frontend.image "global" .Values.global) }} {{- end -}} {{/* -Return the proper Admin-backend image name +Return the proper backend image name */}} {{- define "backend.image" -}} {{ include "common.images.image" (dict "imageRoot" .Values.backend.image "global" .Values.global) }} diff --git a/deployment/helmchart/templates/configmaps.yaml b/deployment/helmchart/templates/configmaps.yaml index e056e32..2fa47b0 100644 --- a/deployment/helmchart/templates/configmaps.yaml +++ b/deployment/helmchart/templates/configmaps.yaml @@ -13,8 +13,6 @@ data: SECRET_KEY: {{ .Values.backend.secretKey }} FLASK_APP: app.py FLASK_ENV: {{ .Values.backend.flaskEnv }} - # ADMIN_FRONTEND_HOST: "{{ include "frontend.host" . }}" - # ADMIN_BACKEND_HOST: "{{ include "backend.host" . }}" # Probably needed in the future: # ADMIN_BACKEND_USERNAME: {{ .Values.backend.username | quote }} # ADMIN_BACKEND_EMAIL: {{ .Values.backend.email | quote }} diff --git a/deployment/helmchart/templates/deployment.yaml b/deployment/helmchart/templates/deployment.yaml index bb8ab94..d630bae 100644 --- a/deployment/helmchart/templates/deployment.yaml +++ b/deployment/helmchart/templates/deployment.yaml @@ -1,4 +1,3 @@ -{{- if include "frontend.host" . -}} apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} kind: Deployment metadata: @@ -198,4 +197,3 @@ spec: {{- if .Values.extraVolumes }} {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }} {{- end }} -{{- end }} diff --git a/deployment/helmchart/values.yaml b/deployment/helmchart/values.yaml index ea6828a..a9df735 100644 --- a/deployment/helmchart/values.yaml +++ b/deployment/helmchart/values.yaml @@ -1,10 +1,10 @@ ## @section Global parameters -## Global Docker image parameters +## Global container image parameters ## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass +## Current available global container image parameters: imageRegistry, imagePullSecrets and storageClass -## @param global.imageRegistry Global Docker image registry -## @param global.imagePullSecrets Global Docker registry secret names as an array +## @param global.imageRegistry Global container image registry +## @param global.imagePullSecrets Global container registry secret names as an array ## @param global.storageClass Global StorageClass for Persistent Volume(s) ## global: @@ -36,7 +36,7 @@ commonAnnotations: {} -## @section Discourse parameters +## @section Stackspin parameters ## @param imagePullSecrets Specify docker-registry secret names as an array ## @@ -49,11 +49,11 @@ image: frontend: ## Admin frontend image version ## ref: https://hub.docker.com/r/bitnami/frontend/tags/ - ## @param image.registry Discourse image registry - ## @param image.repository Discourse image repository - ## @param image.tag Discourse image tag - ## @param image.pullPolicy Discourse image pull policy - ## @param image.pullSecrets Discourse image pull secrets + ## @param image.registry Stackspin image registry + ## @param image.repository Stackspin image repository + ## @param image.tag Stackspin image tag + ## @param image.pullPolicy Stackspin image pull policy + ## @param image.pullSecrets Stackspin image pull secrets ## @param image.debug Specify if debug logs should be enabled ## image: @@ -113,7 +113,7 @@ frontend: http: "" ## @param frontend.extendEslint Whether to read .eslint.json rules extendEslint: false - ## @param frontend.host Discourse host to create application URLs (include the port if =/= 80) + ## @param frontend.host Stackspin host to create application URLs (include the port if =/= 80) ## host: "" ## @param frontend.command Custom command to override image cmd @@ -132,7 +132,7 @@ frontend: ## runAsUser: 1000 ## containerSecurityContext: {} - ## Discourse container's resource requests and limits + ## Stackspin container's resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## We usually recommend not to specify default resources and to leave this as a conscious ## choice for the user. This also increases chances charts run on environments with little @@ -152,8 +152,8 @@ frontend: ## cpu: 100m ## memory: 128Mi requests: {} - ## Discourse extra options for liveness probe - ## WARNING: Discourse installation process may take up some time and + ## Stackspin extra options for liveness probe + ## WARNING: Stackspin installation process may take up some time and ## setting inappropriate values here may lead to pods failure. ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes ## @param frontend.livenessProbe.enabled Enable/disable livenessProbe @@ -170,8 +170,8 @@ frontend: timeoutSeconds: 5 failureThreshold: 6 successThreshold: 1 - ## Discourse extra options for readiness probe - ## WARNING: Discourse installation process may take up some time and + ## Stackspin extra options for readiness probe + ## WARNING: Stackspin installation process may take up some time and ## setting inappropriate values here may lead to pods failure. ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes ## @param frontend.readinessProbe.enabled Enable/disable readinessProbe @@ -222,11 +222,11 @@ frontend: backend: ## Admin frontend image version ## ref: https://hub.docker.com/r/bitnami/frontend/tags/ - ## @param image.registry Discourse image registry - ## @param image.repository Discourse image repository - ## @param image.tag Discourse image tag - ## @param image.pullPolicy Discourse image pull policy - ## @param image.pullSecrets Discourse image pull secrets + ## @param image.registry Stackspin image registry + ## @param image.repository Stackspin image repository + ## @param image.tag Stackspin image tag + ## @param image.pullPolicy Stackspin image pull policy + ## @param image.pullSecrets Stackspin image pull secrets ## @param image.debug Specify if debug logs should be enabled ## image: @@ -350,7 +350,7 @@ backend: ## runAsUser: 1000 ## containerSecurityContext: {} - ## Discourse container's resource requests and limits + ## Stackspin container's resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## We usually recommend not to specify default resources and to leave this as a conscious ## choice for the user. This also increases chances charts run on environments with little @@ -370,8 +370,8 @@ backend: ## cpu: 100m ## memory: 128Mi requests: {} - ## Discourse extra options for liveness probe - ## WARNING: Discourse installation process may take up some time and + ## Stackspin extra options for liveness probe + ## WARNING: Stackspin installation process may take up some time and ## setting inappropriate values here may lead to pods failure. ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes ## @param backend.livenessProbe.enabled Enable/disable livenessProbe @@ -388,8 +388,8 @@ backend: timeoutSeconds: 5 failureThreshold: 6 successThreshold: 1 - ## Discourse extra options for readiness probe - ## WARNING: Discourse installation process may take up some time and + ## Stackspin extra options for readiness probe + ## WARNING: Stackspin installation process may take up some time and ## setting inappropriate values here may lead to pods failure. ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes ## @param backend.readinessProbe.enabled Enable/disable readinessProbe @@ -435,7 +435,7 @@ backend: ## extraVolumeMounts: [] -## @param replicaCount Number of Discourse & Sidekiq replicas +## @param replicaCount Number of Stackspin & Sidekiq replicas ## (Note that you will need ReadWriteMany PVCs for this to work properly) ## replicaCount: 1