diff --git a/.prettierignore b/.prettierignore index 4d66f089cd..d0a0b33903 100644 --- a/.prettierignore +++ b/.prettierignore @@ -6,6 +6,7 @@ cfgov/retirement_api/data/ cfgov/static_built/ **/fixtures/ collectstatic/ +helm/ # Ignore all HTML files: *.html diff --git a/Dockerfile b/Dockerfile index 19471a494f..c6ae0fb373 100644 --- a/Dockerfile +++ b/Dockerfile @@ -151,7 +151,8 @@ ENV ALLOWED_HOSTS '["*"]' COPY cfgov ./cfgov/ COPY static.in ./static.in/ COPY refresh-data.sh . -COPY index.sh . +COPY initial-data.sh . +COPY index.sh . COPY test.sql.gz . # Copy our static build over from node-builder diff --git a/helm-init.sh b/helm-init.sh index f308a56911..c9c771cc6f 100755 --- a/helm-init.sh +++ b/helm-init.sh @@ -25,7 +25,7 @@ fi if ! docker images -q --filter=reference='cfgov' | grep -q .; then echo -e "${RED}Docker image 'cfgov' could not be found." - docker build . -t cfgo + docker build . -t cfgov fi if ! docker images -q --filter=reference='cfgov-apache' | grep -q .; then diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 7057db6852..249e43bf49 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -4,6 +4,7 @@ metadata: name: {{ include "cfgov.fullname" . }} labels: {{- include "cfgov.labels" . | nindent 4 }} + spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} @@ -40,7 +41,7 @@ spec: - name: {{ .name }} value: {{ .value | quote }} {{- end }} - command: + command: {{- range .command }} - {{ . }} {{- end }} @@ -55,7 +56,7 @@ spec: containerPort: {{ .port }} protocol: TCP {{- if .env }} - env: + env: {{- range .env }} - name: {{ .name }} value: {{ .value | quote }} diff --git a/helm/values.local.yaml b/helm/values.local.yaml index dbd8a60c47..555e798b01 100644 --- a/helm/values.local.yaml +++ b/helm/values.local.yaml @@ -90,7 +90,11 @@ serviceAccount: # This is for setting Kubernetes Annotations to a Pod. # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -podAnnotations: {} +podAnnotations: + # Always restart containers, even if the image tag hasn't changed. + # This is currently needed because the crawler image tag is always "main". + # https://v3.helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments + rollme: {{ randAlphaNum 5 | quote }} # This is for setting Kubernetes Labels to a Pod. # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ podLabels: { 'app.kubernetes.io/name': 'cfgov' }