From e6d70eaf95fdd5e7778bb03e9250c61c13e1d32f Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 16:11:17 +0000 Subject: [PATCH 01/10] Migrate to App Build Suite with .abs config Co-Authored-By: jonas@giantswarm.io --- .abs/main.yaml | 6 ++++++ .circleci/config.yml | 1 + helm/apptest-app/Chart.yaml | 5 ++++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .abs/main.yaml diff --git a/.abs/main.yaml b/.abs/main.yaml new file mode 100644 index 0000000..a998641 --- /dev/null +++ b/.abs/main.yaml @@ -0,0 +1,6 @@ +generate-metadata: true +chart-dir: ./helm/apptest-app +destination: ./build +catalog-base-url: https://giantswarm.github.io/control-plane-catalog/ +replace-chart-version-with-git: true +replace-app-version-with-git: true diff --git a/.circleci/config.yml b/.circleci/config.yml index d9e00ef..4037a5b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,6 +16,7 @@ workflows: - architect/push-to-app-catalog: context: "architect" name: push-apptest-app-to-control-plane-test-catalog + executor: app-build-suite app_catalog: "control-plane-test-catalog" app_catalog_test: "control-plane-test-catalog" chart: "apptest-app" diff --git a/helm/apptest-app/Chart.yaml b/helm/apptest-app/Chart.yaml index 718443b..04e85e5 100644 --- a/helm/apptest-app/Chart.yaml +++ b/helm/apptest-app/Chart.yaml @@ -3,4 +3,7 @@ appVersion: v1.8.0 description: A test app for the apptest library home: https://github.com/giantswarm/apptest name: apptest-app -version: [[ .Version ]] +version: 0.0.1-dev +icon: https://s.giantswarm.io/app-icons/giantswarm/1/dark.svg +annotations: + application.giantswarm.io/team: honeybadger From ccec3166f630f2c46dcb07008365d24f4e7d663a Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 16:36:20 +0000 Subject: [PATCH 02/10] Fix catalog base URL to match CircleCI config Co-Authored-By: jonas@giantswarm.io --- .abs/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.abs/main.yaml b/.abs/main.yaml index a998641..0c87521 100644 --- a/.abs/main.yaml +++ b/.abs/main.yaml @@ -1,6 +1,6 @@ generate-metadata: true chart-dir: ./helm/apptest-app destination: ./build -catalog-base-url: https://giantswarm.github.io/control-plane-catalog/ +catalog-base-url: https://giantswarm.github.io/control-plane-test-catalog/ replace-chart-version-with-git: true replace-app-version-with-git: true From abda68f3ac51484fc1f82c30b8da9eee5a723fd0 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 16:59:57 +0000 Subject: [PATCH 03/10] Add _helpers.tpl and update values.yaml with required fields Co-Authored-By: jonas@giantswarm.io --- helm/apptest-app/templates/_helpers.tpl | 28 +++++++++++++++++++++++++ helm/apptest-app/values.yaml | 1 + 2 files changed, 29 insertions(+) create mode 100644 helm/apptest-app/templates/_helpers.tpl diff --git a/helm/apptest-app/templates/_helpers.tpl b/helm/apptest-app/templates/_helpers.tpl new file mode 100644 index 0000000..da83bb9 --- /dev/null +++ b/helm/apptest-app/templates/_helpers.tpl @@ -0,0 +1,28 @@ +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "labels.common" -}} +{{ include "labels.selector" . }} +app.kubernetes.io/managed-by: {{ .Release.Service | quote }} +app.kubernetes.io/name: {{ .Values.name | quote }} +app.kubernetes.io/instance: {{ .Release.Name | quote }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +application.giantswarm.io/team: {{ index .Chart.Annotations "application.giantswarm.io/team" | quote }} +giantswarm.io/service-type: "{{ .Values.serviceType }}" +helm.sh/chart: {{ include "chart" . | quote }} +kubernetes.io/cluster-service: "true" +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "labels.selector" -}} +app: {{ .Values.name | quote }} +{{- end -}} diff --git a/helm/apptest-app/values.yaml b/helm/apptest-app/values.yaml index 0ef90e7..edc4c56 100644 --- a/helm/apptest-app/values.yaml +++ b/helm/apptest-app/values.yaml @@ -1,4 +1,5 @@ name: apptest-app +serviceType: managed namespace: kube-system port: 10301 portName: metrics From 4bab5e64680426f04c0fff9219192a2799e01824 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 17:00:52 +0000 Subject: [PATCH 04/10] Update branch filters to allow PR builds Co-Authored-By: jonas@giantswarm.io --- .circleci/config.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4037a5b..5ba7cb1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,10 +21,8 @@ workflows: app_catalog_test: "control-plane-test-catalog" chart: "apptest-app" filters: - # Do not trigger the job on merge to master. branches: - ignore: - - master + only: /.*/ requires: - go-test @@ -33,10 +31,8 @@ workflows: install-app-platform: true test-dir: "integration/test/basic" filters: - # Do not trigger the job on merge to master. branches: - ignore: - - master + only: /.*/ requires: - push-apptest-app-to-control-plane-test-catalog @@ -45,10 +41,8 @@ workflows: install-app-platform: true test-dir: "integration/test/ensurecrds" filters: - # Do not trigger the job on merge to master. branches: - ignore: - - master + only: /.*/ requires: - push-apptest-app-to-control-plane-test-catalog @@ -57,9 +51,7 @@ workflows: install-app-platform: true test-dir: "integration/test/externalcatalog" filters: - # Do not trigger the job on merge to master. branches: - ignore: - - master + only: /.*/ requires: - push-apptest-app-to-control-plane-test-catalog From bb0f2795ceebe9c1b8011468d1dc79d6f04045a8 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 17:07:41 +0000 Subject: [PATCH 05/10] Add values.schema.json for ABS validation Co-Authored-By: jonas@giantswarm.io --- helm/apptest-app/values.schema.json | 84 +++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 helm/apptest-app/values.schema.json diff --git a/helm/apptest-app/values.schema.json b/helm/apptest-app/values.schema.json new file mode 100644 index 0000000..fd57ad4 --- /dev/null +++ b/helm/apptest-app/values.schema.json @@ -0,0 +1,84 @@ +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the app" + }, + "namespace": { + "type": "string", + "description": "Namespace where the app will be installed" + }, + "port": { + "type": "integer", + "description": "Port number for metrics" + }, + "portName": { + "type": "string", + "description": "Name of the port" + }, + "replicas": { + "type": "integer", + "description": "Number of replicas" + }, + "image": { + "type": "object", + "properties": { + "registry": { + "type": "string", + "description": "Container image registry" + }, + "name": { + "type": "string", + "description": "Container image name" + }, + "tag": { + "type": "string", + "description": "Container image tag" + } + } + }, + "resources": { + "type": "object", + "properties": { + "limits": { + "type": "object", + "properties": { + "cpu": { + "type": "string", + "description": "CPU limit" + }, + "memory": { + "type": "string", + "description": "Memory limit" + } + } + }, + "requests": { + "type": "object", + "properties": { + "cpu": { + "type": "string", + "description": "CPU request" + }, + "memory": { + "type": "string", + "description": "Memory request" + } + } + } + } + }, + "podSecurityStandards": { + "type": "object", + "properties": { + "enforced": { + "type": "boolean", + "description": "Whether pod security standards are enforced" + } + } + } + }, + "required": ["name", "namespace", "port", "portName"] +} From d2224d78998af51f6a385a8bf7d90bf577e1a6a3 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 17:28:17 +0000 Subject: [PATCH 06/10] Update appVersion to 0.0.1-dev Co-Authored-By: jonas@giantswarm.io --- helm/apptest-app/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/apptest-app/Chart.yaml b/helm/apptest-app/Chart.yaml index 04e85e5..3d4be24 100644 --- a/helm/apptest-app/Chart.yaml +++ b/helm/apptest-app/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: v1.8.0 +appVersion: 0.0.1-dev description: A test app for the apptest library home: https://github.com/giantswarm/apptest name: apptest-app From d7471bae29713e97e8c7f6353925d11dbdfecb3e Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 18:06:02 +0000 Subject: [PATCH 07/10] Update Chart.yaml with required fields Co-Authored-By: jonas@giantswarm.io --- helm/apptest-app/Chart.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/helm/apptest-app/Chart.yaml b/helm/apptest-app/Chart.yaml index 3d4be24..13eb821 100644 --- a/helm/apptest-app/Chart.yaml +++ b/helm/apptest-app/Chart.yaml @@ -7,3 +7,4 @@ version: 0.0.1-dev icon: https://s.giantswarm.io/app-icons/giantswarm/1/dark.svg annotations: application.giantswarm.io/team: honeybadger + config.giantswarm.io/version: 1.x.x From 59d237bd275b25d1d304a24a2c6d948d3871a989 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 18:16:37 +0000 Subject: [PATCH 08/10] Add restrictions section to Chart.yaml Co-Authored-By: jonas@giantswarm.io --- helm/apptest-app/Chart.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helm/apptest-app/Chart.yaml b/helm/apptest-app/Chart.yaml index 13eb821..1f09e5c 100644 --- a/helm/apptest-app/Chart.yaml +++ b/helm/apptest-app/Chart.yaml @@ -8,3 +8,7 @@ icon: https://s.giantswarm.io/app-icons/giantswarm/1/dark.svg annotations: application.giantswarm.io/team: honeybadger config.giantswarm.io/version: 1.x.x +restrictions: + clusterSingleton: true + fixedNamespace: kube-system + gpuInstances: false From 6e0f6bdadae806b8b5ae11001d40c1cf6576fe3a Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 18:24:59 +0000 Subject: [PATCH 09/10] Add chart_dir to CircleCI config Co-Authored-By: jonas@giantswarm.io --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5ba7cb1..fc5f6c8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,6 +20,7 @@ workflows: app_catalog: "control-plane-test-catalog" app_catalog_test: "control-plane-test-catalog" chart: "apptest-app" + chart_dir: "helm/apptest-app" filters: branches: only: /.*/ From 571a28d7bce737adbb1c96f0a6c82358a645c3a1 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 18:26:03 +0000 Subject: [PATCH 10/10] Remove chart_dir parameter from CircleCI config Co-Authored-By: jonas@giantswarm.io --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fc5f6c8..5ba7cb1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,6 @@ workflows: app_catalog: "control-plane-test-catalog" app_catalog_test: "control-plane-test-catalog" chart: "apptest-app" - chart_dir: "helm/apptest-app" filters: branches: only: /.*/