diff --git a/.abs/main.yaml b/.abs/main.yaml new file mode 100644 index 0000000..0c87521 --- /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-test-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..5ba7cb1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,14 +16,13 @@ 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" filters: - # Do not trigger the job on merge to master. branches: - ignore: - - master + only: /.*/ requires: - go-test @@ -32,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 @@ -44,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 @@ -56,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 diff --git a/helm/apptest-app/Chart.yaml b/helm/apptest-app/Chart.yaml index 718443b..1f09e5c 100644 --- a/helm/apptest-app/Chart.yaml +++ b/helm/apptest-app/Chart.yaml @@ -1,6 +1,14 @@ 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 -version: [[ .Version ]] +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 +restrictions: + clusterSingleton: true + fixedNamespace: kube-system + gpuInstances: false 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.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"] +} 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