From a6ba94095e63c18b5345297c35a7944390ed65f8 Mon Sep 17 00:00:00 2001 From: jasonBirchall Date: Fri, 4 Jul 2025 15:12:42 +0100 Subject: [PATCH 1/5] =?UTF-8?q?=E2=9C=A8=20Add=20govuk-reports-prototype?= =?UTF-8?q?=20chart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds the [govuk-reports-prototype](https://github.com/alphagov/govuk-reports-prototype) so we can use integration to host the prototype. This means we can start looking at collaborating on differnt ideas and having a prototype url we can showcase. --- .../integration/govuk-reports-prototype | 3 ++ charts/app-config/values-integration.yaml | 37 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 charts/app-config/image-tags/integration/govuk-reports-prototype diff --git a/charts/app-config/image-tags/integration/govuk-reports-prototype b/charts/app-config/image-tags/integration/govuk-reports-prototype new file mode 100644 index 00000000000..9fd683a82ba --- /dev/null +++ b/charts/app-config/image-tags/integration/govuk-reports-prototype @@ -0,0 +1,3 @@ +image_tag: v1 +automatic_deploys_enabled: true +promote_deployment: false diff --git a/charts/app-config/values-integration.yaml b/charts/app-config/values-integration.yaml index ce9f2ecf752..bb938d8c341 100644 --- a/charts/app-config/values-integration.yaml +++ b/charts/app-config/values-integration.yaml @@ -63,6 +63,43 @@ emergency-banner-redis: # Apps for Argo CD to deploy, along with any app-specific Helm values. govukApplications: + - name: govuk-reports-prototype + helmValues: + arch: arm64 + uploadAssets: + enabled: false + appResources: + limits: + cpu: 500m + memory: 512Mi + requests: + cpu: 100m + memory: 128Mi + dbMigrationEnabled: false + workers: + enabled: false + redis: + enabled: false + ingress: + enabled: true + annotations: + <<: [*alb-ingress-group-backend, *alb-ingress-defaults] + alb.ingress.kubernetes.io/group.order: "10" + alb.ingress.kubernetes.io/conditions.{{ .Release.Name }}: > + [{"field": "host-header", "hostHeaderConfig": { "values": [ + "govuk-reports-prototype.{{ .Values.publishingDomainSuffix }}" + ]}}] + hosts: + - name: govuk-reports-prototype.{{ .Values.k8sExternalDomainSuffix }} + service: + port: 8080 + healthcheck: + path: /api/v1/health + extraEnv: + - name: SERVER_PORT + value: "8080" + - name: GOVUK_ENVIRONMENT + value: "{{ .Values.govukEnvironment }}" - name: account-api helmValues: arch: arm64 From 78916687e9bcba31696bb7f5e4199de5701459e2 Mon Sep 17 00:00:00 2001 From: jasonBirchall Date: Fri, 4 Jul 2025 16:21:39 +0100 Subject: [PATCH 2/5] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Add=20a=20serviceaccou?= =?UTF-8?q?nt=20and=20include=20some=20needed=20envvars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- charts/app-config/values-integration.yaml | 26 ++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/charts/app-config/values-integration.yaml b/charts/app-config/values-integration.yaml index bb938d8c341..2f4f005a30a 100644 --- a/charts/app-config/values-integration.yaml +++ b/charts/app-config/values-integration.yaml @@ -93,13 +93,33 @@ govukApplications: - name: govuk-reports-prototype.{{ .Values.k8sExternalDomainSuffix }} service: port: 8080 + serviceAccount: + enabled: true + create: true + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::{{ .values.awsAccountId }:role/content-data-admin-integration healthcheck: - path: /api/v1/health + path: /api/health extraEnv: - - name: SERVER_PORT + - name: PORT value: "8080" - - name: GOVUK_ENVIRONMENT + - name: ENVIRONMENT value: "{{ .Values.govukEnvironment }}" + - name: AWS_REGION + value: "{{ .Values.awsRegion }}" + + # Logging configuration + - name: LOG_LEVEL + value: "info" + - name: LOG_FORMAT + value: "json" + - name: LOG_OUTPUT + value: "stdout" + - name: LOG_TIME_FORMAT + value: "2006-01-02T15:04:05Z07:00" + - name: LOG_COLORIZE + value: false + - name: account-api helmValues: arch: arm64 From 82a3ffaf78b5ff70a9bed84eb996fede5882aa01 Mon Sep 17 00:00:00 2001 From: jasonBirchall Date: Fri, 4 Jul 2025 16:24:30 +0100 Subject: [PATCH 3/5] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Use=20the=20correct=20?= =?UTF-8?q?govuk-reports=20role?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- charts/app-config/values-integration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/app-config/values-integration.yaml b/charts/app-config/values-integration.yaml index 2f4f005a30a..61d52c36b3d 100644 --- a/charts/app-config/values-integration.yaml +++ b/charts/app-config/values-integration.yaml @@ -97,7 +97,7 @@ govukApplications: enabled: true create: true annotations: - eks.amazonaws.com/role-arn: arn:aws:iam::{{ .values.awsAccountId }:role/content-data-admin-integration + eks.amazonaws.com/role-arn: arn:aws:iam::210287912431:role/govuk-reports-govuk healthcheck: path: /api/health extraEnv: From 96acf1352d0717c7e978fea7090108fd39d2c709 Mon Sep 17 00:00:00 2001 From: jasonBirchall Date: Fri, 4 Jul 2025 16:54:56 +0100 Subject: [PATCH 4/5] =?UTF-8?q?=E2=9C=A8=20Add=20kubeconform=20make=20comm?= =?UTF-8?q?and?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While working in this repository, I found that when pushing changes I was failing kubeconform requirements. I wanted to test this locally before pushing, so I've added a make command that lets you either `make lint` and run all the linting locally, or, run `make kubeconform` that performs the kubeconform command for you and outputs the errors locally. This way I was able to quickly identify where the failure was located and fix it. In this instance, it appeared in the rendered deployment.yaml file for reports-prototype. --- .gitignore | 1 + Makefile | 17 ++++++++++++++++- charts/app-config/values-integration.yaml | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 50e549a8a20..64ddda9cd9f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile ~/.gitignore_global helm-dist +output diff --git a/Makefile b/Makefile index 65e0dbd6662..b6218748cf4 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,23 @@ check-yamllint: ## Check if yamllint is installed exit 1; \ fi -lint: check-yamllint ## Run yamllint on all YAML files +yamllint: check-yamllint ## Run yamllint on all YAML files @echo "Running yamllint..." yamllint -f github . +lint: check-yamllint kubeconform ## Run yamllint on all YAML files + check: lint ## Alias for lint target + +kubeconform: ## Run kubeconform validation on rendered charts + @echo "Rendering charts..." + ./govuk-app-render.sh + @echo "Running kubeconform..." + docker run --rm -v "$(PWD)/output:/workspace" ghcr.io/yannh/kubeconform:latest-alpine \ + -kubernetes-version 1.31.6 \ + -schema-location default \ + -schema-location "https://alphagov.github.io/govuk-crd-library/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json" \ + -ignore-filename-pattern ".*/Chart.yaml" \ + -summary \ + -strict \ + /workspace/rendered-charts diff --git a/charts/app-config/values-integration.yaml b/charts/app-config/values-integration.yaml index 61d52c36b3d..ccf2434b046 100644 --- a/charts/app-config/values-integration.yaml +++ b/charts/app-config/values-integration.yaml @@ -118,7 +118,7 @@ govukApplications: - name: LOG_TIME_FORMAT value: "2006-01-02T15:04:05Z07:00" - name: LOG_COLORIZE - value: false + value: "false" - name: account-api helmValues: From 3146864da3fa58de47def1f9c30e30078e855f3e Mon Sep 17 00:00:00 2001 From: jasonBirchall Date: Fri, 4 Jul 2025 16:56:53 +0100 Subject: [PATCH 5/5] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Fix=20missing=20entrie?= =?UTF-8?q?s=20in=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b6218748cf4..385b2a76878 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: check-yamllint lint check help +.PHONY: check-yamllint lint check kubeconform help # Default target help: ## Show this help message @@ -17,7 +17,7 @@ yamllint: check-yamllint ## Run yamllint on all YAML files @echo "Running yamllint..." yamllint -f github . -lint: check-yamllint kubeconform ## Run yamllint on all YAML files +lint: check-yamllint kubeconform ## Run linting commands on all YAML files check: lint ## Alias for lint target