diff --git a/Jenkinsfile b/Jenkinsfile index 5ab8526be1210ea2cffece3501ca5167b069c9ef..f2ad4ec0355e4022d7ba6bb4cc388ae48ee01604 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -163,7 +163,8 @@ pipeline { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { sh 'mvn --version' - sh "mvn --no-transfer-progress -s $MAVEN_SETTINGS -pl -alfa-client clean install spring-boot:build-image -Dspring-boot.build-image.imageName=docker.ozg-sh.de/alfa:${IMAGE_TAG} -Dspring-boot.build-image.publish -Dmaven.wagon.http.retryHandler.count=3" + sh "mvn -s $MAVEN_SETTINGS -pl -alfa-client clean install" + sh "mvn --no-transfer-progress -s $MAVEN_SETTINGS -pl -alfa-client spring-boot:build-image -Dspring-boot.build-image.imageName=docker.ozg-sh.de/alfa:${IMAGE_TAG} -Dspring-boot.build-image.publish -Dmaven.wagon.http.retryHandler.count=3" if (isMasterBranch()) { try { diff --git a/alfa-client/apps/admin/src/test/helm/deyploment_general_value_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_general_value_test.yaml similarity index 100% rename from alfa-client/apps/admin/src/test/helm/deyploment_general_value_test.yaml rename to alfa-client/apps/admin/src/test/helm/deployment_general_value_test.yaml diff --git a/alfa-client/apps/alfa/src/app/app.component.html b/alfa-client/apps/alfa/src/app/app.component.html index db1bfcb9fd820d9d2dbacafe0771e0d2f7249619..2235e19749df21c01e02e4bcebda86648edcaa13 100644 --- a/alfa-client/apps/alfa/src/app/app.component.html +++ b/alfa-client/apps/alfa/src/app/app.component.html @@ -27,7 +27,7 @@ <ozgcloud-spinner [stateResource]="apiRoot"> <alfa-header-container [apiRootStateResource]="apiRoot"></alfa-header-container> - <div class="relative ml-4 mt-16 flex flex-grow items-start justify-between"> + <div class="relative ml-4 flex flex-grow items-start justify-between sm:mt-16"> <div class="mat-app-background relative grow"><router-outlet></router-outlet></div> <section class="mat-app-background right-nav"> diff --git a/alfa-client/apps/info/Jenkinsfile b/alfa-client/apps/info/Jenkinsfile index 5c5b0b390191c696686b1bb470fea9a83eadfb28..2b7619392b6b040108a0e5c81d7ba274cd0bd022 100644 --- a/alfa-client/apps/info/Jenkinsfile +++ b/alfa-client/apps/info/Jenkinsfile @@ -35,30 +35,80 @@ pipeline { script { FAILED_STAGE = env.STAGE_NAME dir('alfa-client') { - sh 'echo "registry=https://nexus.ozg-sh.de/repository/npm-proxy" >> ~/.npmrc' - sh 'echo "//nexus.ozg-sh.de/:_auth=amVua2luczprTSFnNVUhMVQzNDZxWQ==" >> ~/.npmrc' - sh 'npm cache verify' - sh 'npm install' - sh 'npx nx run info:test' - sh 'npx nx run info:test -- --runInBand --codeCoverage --coverageReporters=lcov --testResultsProcessor=jest-sonar-reporter && npx sonar-scanner' + withNPM(npmrcConfig: 'npm-nexus-auth') { + sh 'npm cache verify' + sh 'npm install' + sh 'npx nx run info:test' + sh 'npx nx run info:test -- --runInBand --codeCoverage --coverageReporters=lcov --testResultsProcessor=jest-sonar-reporter && npx sonar-scanner' - IMAGE_TAG = generateImageTag() + IMAGE_TAG = generateImageTag() - if (isMasterBranch()) { - IMAGE_TAG = "snapshot-latest" - } - else if (isReleaseBranch()) { - IMAGE_TAG = "latest" + if (isMasterBranch()) { + IMAGE_TAG = "snapshot-latest" + } + else if (isReleaseBranch()) { + IMAGE_TAG = "latest" + } + + loginToDockerRegistry() + + sh "INPUT_TAGS=${IMAGE_TAG} INPUT_IMAGES=docker.ozg-sh.de/info-client-by npx nx container info --configuration=production-by" + sh "INPUT_TAGS=${IMAGE_TAG} INPUT_IMAGES=docker.ozg-sh.de/info-client-sh npx nx container info --configuration=production-sh" } + } + } + } + } - loginToDockerRegistry() + stage('Test, build and deploy info-client HelmChart') { + steps { + script { + FAILED_STAGE = env.STAGE_NAME + HELM_CHART_VERSION = generateHelmChartVersion() + + dir('alfa-client/apps/info') { + sh "./run_helm_test.sh" + + dir('src/main/helm') { + sh "helm package --version=${HELM_CHART_VERSION} ." - sh "INPUT_TAGS=${IMAGE_TAG} INPUT_IMAGES=docker.ozg-sh.de/info-client-by npx nx container info --configuration=production-by" - sh "INPUT_TAGS=${IMAGE_TAG} INPUT_IMAGES=docker.ozg-sh.de/info-client-sh npx nx container info --configuration=production-sh" + deployHelmChart(HELM_CHART_VERSION) + } } } } } + + stage('Trigger Dev Rollout') { + when { + branch 'master' + } + steps { + script { + FAILED_STAGE = env.STAGE_NAME + cloneGitopsRepo() + setNewDevVersion() + pushDevGitopsRepo() + } + } + } + + stage('Trigger Test rollout') { + when { + expression { + isReleaseBranch() + } + } + + steps { + script { + FAILED_STAGE = env.STAGE_NAME + cloneGitopsRepo() + setNewTestVersion() + pushTestGitopsRepo() + } + } + } } post { failure { @@ -71,7 +121,7 @@ pipeline { } } Boolean isReleaseBranch() { - return env.BRANCH_NAME == 'release-admin' + return env.BRANCH_NAME == 'release-info' } String generateImageTag() { @@ -111,24 +161,24 @@ Void setNewTestVersion() { Void setNewGitopsVersion(String environment) { dir("gitops") { - def envFile = "${environment}/application/values/admin-client-values.yaml" + def envFile = "${environment}/application/values/info-client-values.yaml" def envVersions = readYaml file: envFile - envVersions.admin_client.image.tag = IMAGE_TAG - envVersions.admin_client.helm.version = HELM_CHART_VERSION + envVersions.info_client.image.tag = IMAGE_TAG + envVersions.info_client.helm.version = HELM_CHART_VERSION writeYaml file: envFile, data: envVersions, overwrite: true if (hasValuesFileChanged(environment)) { sh "git add ${envFile}" - sh "git commit -m 'jenkins rollout ${environment} admin_client version ${IMAGE_TAG}'" + sh "git commit -m 'jenkins rollout ${environment} info-client version ${IMAGE_TAG}'" } } } Boolean hasValuesFileChanged(String environment) { - return sh (script: "git status | grep '${environment}/application/values/admin-client-values.yaml'", returnStatus: true) == env.SH_SUCCESS_STATUS_CODE as Integer + return sh (script: "git status | grep '${environment}/application/values/info-client-values.yaml'", returnStatus: true) == env.SH_SUCCESS_STATUS_CODE as Integer } @@ -161,10 +211,10 @@ String getPackagejsonVersion() { Void deployHelmChart(String helmChartVersion) { withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]){ if (isReleaseBranch()) { - result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps -F file=@admin-client-'''+helmChartVersion+'''.tgz''', returnStdout: true + result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps -F file=@info-client-'''+helmChartVersion+'''.tgz''', returnStdout: true } else { - result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps-snapshot -F file=@admin-client-'''+helmChartVersion+'''.tgz''', returnStdout: true + result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps-snapshot -F file=@info-client-'''+helmChartVersion+'''.tgz''', returnStdout: true } if (result != '') { @@ -192,9 +242,9 @@ Boolean isMasterBranch() { Void sendFailureMessage() { def room = '' def data = """{"msgtype":"m.text", \ - "body":"Admin-Client: Build Failed. Stage: ${FAILED_STAGE} Build-ID: ${env.BUILD_NUMBER} Link: ${BLUE_OCEAN_URL}", \ + "body":"Info-Client: Build Failed. Stage: ${FAILED_STAGE} Build-ID: ${env.BUILD_NUMBER} Link: ${BLUE_OCEAN_URL}", \ "format": "org.matrix.custom.html", \ - "formatted_body":"Admin-Client: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <a href='${BLUE_OCEAN_URL}'>${env.BUILD_NUMBER}</a>"}""" + "formatted_body":"Info-Client: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <a href='${BLUE_OCEAN_URL}'>${env.BUILD_NUMBER}</a>"}""" if (isMasterBranch()) { room = "!iQPAvQIiRwRpNOszjw:matrix.ozg-sh.de" diff --git a/alfa-client/apps/info/run_helm_test.sh b/alfa-client/apps/info/run_helm_test.sh new file mode 100755 index 0000000000000000000000000000000000000000..30f96ffa008eada74acd1bbe8ddd6be43ff57019 --- /dev/null +++ b/alfa-client/apps/info/run_helm_test.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e +set -x + +helm template ./src/main/helm/ -f src/test/helm-linter-values.yaml +helm lint -f src/test/helm-linter-values.yaml ./src/main/helm/ +cd src/main/helm && helm unittest -f '../../test/helm/**/*test.yaml' . \ No newline at end of file diff --git a/alfa-client/apps/info/src/main/helm/Chart.yaml b/alfa-client/apps/info/src/main/helm/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ba4b0c6fa149e8fee566a2da9de13280bd85d6e7 --- /dev/null +++ b/alfa-client/apps/info/src/main/helm/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +name: info-client +version: 0.0.0-MANAGED-BY-JENKINS +description: A Helm chart for Info Client \ No newline at end of file diff --git a/alfa-client/apps/info/src/main/helm/templates/_helpers.tpl b/alfa-client/apps/info/src/main/helm/templates/_helpers.tpl new file mode 100644 index 0000000000000000000000000000000000000000..c18ade6ab9a8a331e10f4fdd1ea422bba776a564 --- /dev/null +++ b/alfa-client/apps/info/src/main/helm/templates/_helpers.tpl @@ -0,0 +1,75 @@ +{{/* vim: set filetype=mustache: */}} + +{{/* error check 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec) */}} +{{/* Namespace */}} +{{- define "app.namespace" -}} +{{- if gt (len (.Release.Namespace)) 63 -}} +{{- fail (printf ".Release.Namespace %s ist zu lang (max. 63 Zeichen)" .Release.Namespace) -}} +{{- end -}} +{{ printf "%s" .Release.Namespace }} +{{- end -}} + +{{/* Chart: Name + Version */}} +{{- define "app.chart" -}} +{{- if gt (len (printf "%s-%s" .Chart.Name .Chart.Version)) 63 -}} +{{- fail (printf ".Chart.Name-.Chart.Version %s-%s ist zu lang (max. 63 Zeichen)" .Chart.Name .Chart.Version) -}} +{{- end -}} +{{ printf "%s-%s" .Chart.Name .Chart.Version }} +{{- end -}} + +{{/* Managed-by -> On Helm, this value is always Helm */}} +{{- define "app.managedBy" -}} +{{- if gt (len (.Release.Service)) 63 -}} +{{- fail (printf ".Release.Service %s ist zu lang (max. 63 Zeichen)" .Release.Service) -}} +{{- end -}} +{{ printf "%s" .Release.Service }} +{{- end -}} + +{{/* Default Labels: Helm recommended best-practice labels https://helm.sh/docs/chart_best_practices/labels/ */}} +{{- define "app.defaultLabels" }} +app.kubernetes.io/instance: info-client +app.kubernetes.io/managed-by: {{ include "app.managedBy" . }} +app.kubernetes.io/part-of: ozgcloud +app.kubernetes.io/version: {{ .Chart.Version }} +helm.sh/chart: {{ include "app.chart" . }} +{{- include "app.matchLabels" . }} +{{- end -}} + +{{- define "app.matchLabels" }} +app.kubernetes.io/name: {{ .Release.Name }} +app.kubernetes.io/namespace: {{ include "app.namespace" . }} +{{- end -}} + +{{- define "app.getBaseDomain" -}} +{{- required "baseDomain muss angegeben sein" .Values.baseDomain }} +{{- end -}} + +{{- define "app.getCustomList" -}} +{{- with (.Values.env).customList -}} +{{- if kindIs "map" . -}} +{{ include "app.dictToList" . }} +{{- else if kindIs "slice" . -}} +{{ . | toYaml }} +{{- end -}} +{{- end -}} +{{- end -}} + +{{- define "app.dictToList" -}} +{{- $customList := list -}} +{{- range $key, $value := . -}} +{{- $customList = append $customList (dict "name" $key "value" $value) }} +{{- end -}} +{{- $customList | toYaml -}} +{{- end -}} + +{{- define "app.getIngressTlsSecretName" -}} +{{- if (.Values.ingress).tlsSecretName -}} +{{ (.Values.ingress).tlsSecretName }} +{{- else -}} +{{ printf "%s-tls" .Release.Name }} +{{- end -}} +{{- end -}} + +{{- define "app.getImageName" -}} +{{- required "image.name muss angegeben sein" .Values.image.name }} +{{- end -}} \ No newline at end of file diff --git a/alfa-client/apps/info/src/main/helm/templates/deployment.yaml b/alfa-client/apps/info/src/main/helm/templates/deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..252254878d123c76b5d0e91375a0e7735a04a7ed --- /dev/null +++ b/alfa-client/apps/info/src/main/helm/templates/deployment.yaml @@ -0,0 +1,117 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }} + namespace: {{ include "app.namespace" . }} + labels: +{{- include "app.defaultLabels" . | indent 4 }} +spec: + progressDeadlineSeconds: 600 + replicas: {{ .Values.replicaCount }} + revisionHistoryLimit: 10 + selector: + matchLabels: +{{- include "app.matchLabels" . | indent 6 }} + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: +{{- include "app.defaultLabels" . | indent 8 }} + spec: + {{- if (.Values.serviceAccount).create }} + serviceAccountName: {{ (.Values.serviceAccount).name }} + {{- end }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: +{{- include "app.matchLabels" . | indent 12 }} + containers: + - env: + {{- with include "app.getCustomList" . }} +{{ . | indent 8 }} + {{- end }} + image: "{{ .Values.image.repo }}/{{ include "app.getImageName" . }}:{{ .Values.image.tag }}" + imagePullPolicy: Always + name: info-client + ports: + - containerPort: 8080 + name: 8080tcp + protocol: TCP + {{- if not .Values.disableMonitoring }} + - containerPort: 2091 + name: metrics + protocol: TCP + {{- end }} + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 8080 + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 3 + startupProbe: + failureThreshold: 10 + httpGet: + path: / + port: 8080 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 5 + successThreshold: 1 + timeoutSeconds: 5 + {{- if .Values.enableLivenessProbe }} + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 8080 + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 3 + {{- end }} + resources: + {{- with .Values.resources }} +{{ toYaml . | indent 10 }} + {{- end }} + securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: false + runAsNonRoot: true + {{- with (.Values.securityContext).runAsUser }} + runAsUser: {{ . }} + {{- end }} + {{- with (.Values.securityContext).runAsGroup }} + runAsGroup: {{ . }} + {{- end }} + {{- with (.Values.securityContext).capabilities }} + capabilities: +{{ toYaml . | indent 12 }} + {{- end }} + stdin: true + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + tty: true + dnsConfig: {} + dnsPolicy: ClusterFirst + restartPolicy: Always + {{- with .Values.hostAliases }} + hostAliases: +{{ toYaml . | indent 8 }} + {{- end }} + schedulerName: default-scheduler + {{- with .Values.podSecurityContext }} + securityContext: +{{ toYaml . | indent 8 }} + {{- end }} + terminationGracePeriodSeconds: 30 diff --git a/alfa-client/apps/info/src/main/helm/templates/ingress.yaml b/alfa-client/apps/info/src/main/helm/templates/ingress.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9187e9a099202e314d6da3953070112825188ddc --- /dev/null +++ b/alfa-client/apps/info/src/main/helm/templates/ingress.yaml @@ -0,0 +1,37 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + {{- with (.Values.ingress).annotations }} +{{ toYaml . | indent 4 }} + {{- end }} + {{- if not (.Values.ingress).disableDefaultCertManager }} + {{- if (.Values.ingress).useStagingCert }} + cert-manager.io/cluster-issuer: letsencrypt-staging + {{- else }} + cert-manager.io/cluster-issuer: letsencrypt-prod + {{- end }} + {{- end }} + name: {{ .Release.Name }} + namespace: {{ include "app.namespace" . }} +spec: + {{- if (.Values.ingress).className }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + rules: + - http: + paths: + - backend: + service: + port: + number: 8080 + name: {{ .Release.Name }} + path: '/' + pathType: Prefix + host: {{ include "app.getBaseDomain" . }} + {{- if not (.Values.ingress).skipTlsSecret }} + tls: + - hosts: + - {{ include "app.getBaseDomain" . }} + secretName: {{ include "app.getIngressTlsSecretName" . }} + {{- end }} \ No newline at end of file diff --git a/alfa-client/apps/info/src/main/helm/templates/network_policy.yaml b/alfa-client/apps/info/src/main/helm/templates/network_policy.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ffeff6844ca8a292d35b4bddab04c299d1b5897a --- /dev/null +++ b/alfa-client/apps/info/src/main/helm/templates/network_policy.yaml @@ -0,0 +1,32 @@ +{{- if not (.Values.networkPolicy).disabled }} +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: network-policy-info-client + namespace: {{ .Release.Namespace }} +spec: + podSelector: + matchLabels: + {{- include "app.matchLabels" . | indent 6 }} + policyTypes: + - Ingress + ingress: + - ports: + - port: 8080 + {{- if not .Values.disableMonitoring }} + - from: + - namespaceSelector: + matchLabels: + name: {{ (.Values.networkPolicy).monitoringNamespace | default "openshift-user-workload-monitoring" }} + ports: + - protocol: TCP + port: 2019 + {{- end }} +{{- with (.Values.networkPolicy).additionalIngressConfigLocal }} +{{ toYaml . | indent 2 }} +{{- end }} +{{- with (.Values.networkPolicy).additionalIngressConfigGlobal }} +{{ toYaml . | indent 2 }} +{{- end }} + +{{- end }} \ No newline at end of file diff --git a/alfa-client/apps/info/src/main/helm/templates/service.yaml b/alfa-client/apps/info/src/main/helm/templates/service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dece155c89fd323559ce83b95c22f2a0b6021723 --- /dev/null +++ b/alfa-client/apps/info/src/main/helm/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }} + namespace: {{ include "app.namespace" . }} + labels: + {{- include "app.defaultLabels" . | indent 4 }} +spec: + type: ClusterIP + ports: + - name: http + port: 8080 + protocol: TCP + {{- if not .Values.disableMonitoring }} + - name: metrics + port: 2019 + protocol: TCP + {{- end }} + selector: + {{- include "app.matchLabels" . | indent 4 }} \ No newline at end of file diff --git a/alfa-client/apps/info/src/main/helm/templates/service_account.yaml b/alfa-client/apps/info/src/main/helm/templates/service_account.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d6495a1db84896420950c605629c9980a7b50560 --- /dev/null +++ b/alfa-client/apps/info/src/main/helm/templates/service_account.yaml @@ -0,0 +1,7 @@ +{{- if (.Values.serviceAccount).create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ (.Values.serviceAccount).name }} + namespace: {{ include "app.namespace" . }} +{{- end }} \ No newline at end of file diff --git a/alfa-client/apps/info/src/main/helm/templates/service_monitor.yaml b/alfa-client/apps/info/src/main/helm/templates/service_monitor.yaml new file mode 100644 index 0000000000000000000000000000000000000000..59af718dec63cd036b2935da0d2e2da059ee1ac8 --- /dev/null +++ b/alfa-client/apps/info/src/main/helm/templates/service_monitor.yaml @@ -0,0 +1,19 @@ +{{- if not .Values.disableMonitoring }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ .Release.Name }} + namespace: {{ include "app.namespace" . }} + labels: + {{- include "app.defaultLabels" . | indent 4 }} +spec: + endpoints: + - port: metrics + path: /metrics + namespaceSelector: + matchNames: + - {{ include "app.namespace" . }} + selector: + matchLabels: + {{- include "app.matchLabels" . | indent 6 }} +{{- end }} \ No newline at end of file diff --git a/alfa-client/apps/info/src/main/helm/values.yaml b/alfa-client/apps/info/src/main/helm/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f62c7b061da7a5739e214890f76636992f8225c6 --- /dev/null +++ b/alfa-client/apps/info/src/main/helm/values.yaml @@ -0,0 +1,22 @@ +image: + repo: docker.ozg-sh.de + name: + tag: latest + +replicaCount: 1 + +resources: + limits: + cpu: 150m + memory: 150Mi + requests: + cpu: 50m + memory: 50Mi + +baseDomain: + +disableMonitoring: + +serviceAccount: + create: + name: info-client-service-account \ No newline at end of file diff --git a/alfa-client/apps/info/src/test/helm-linter-values.yaml b/alfa-client/apps/info/src/test/helm-linter-values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a4b081509be5d987f15d48438fe1e0e101c627af --- /dev/null +++ b/alfa-client/apps/info/src/test/helm-linter-values.yaml @@ -0,0 +1,4 @@ +image: + name: info-client-test + +baseDomain: static.dev.by.ozg-cloud.de \ No newline at end of file diff --git a/alfa-client/apps/info/src/test/helm/deployment_63_char_test.yaml b/alfa-client/apps/info/src/test/helm/deployment_63_char_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..137c5b6bad2d9600814eba110dbe990cba62f4fc --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/deployment_63_char_test.yaml @@ -0,0 +1,28 @@ +suite: test _helpers functions less then 63 characters +release: + name: info-client + namespace: by-helm-test +templates: + - templates/deployment.yaml +set: + image: + name: info-client-by +tests: + - it: should fail on .Release.Namespace length longer than 63 characters + release: + namespace: test1234567890123123456789012345678901234567890123456789012345678901234567890123456789012345678904567890 + asserts: + - failedTemplate: + errorMessage: .Release.Namespace test1234567890123123456789012345678901234567890123456789012345678901234567890123456789012345678904567890 ist zu lang (max. 63 Zeichen) + - it: should not fail on .Release.Namespace length less than 63 characters + asserts: + - notFailedTemplate: {} + - it: should fail on .Chart.Name-.Chart.Version length longer than 63 characters + chart: + version: 1.0-test1234567890123123456789012345678901234567890123456789012345678901234567890123456789012345678904567890 + asserts: + - failedTemplate: + errorMessage: .Chart.Name-.Chart.Version info-client-1.0-test1234567890123123456789012345678901234567890123456789012345678901234567890123456789012345678904567890 ist zu lang (max. 63 Zeichen) + - it: should not fail on .Chart.Name-.Chart.Version length less than 63 characters + asserts: + - notFailedTemplate: {} diff --git a/alfa-client/apps/info/src/test/helm/deployment_container_env_test.yaml b/alfa-client/apps/info/src/test/helm/deployment_container_env_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a3143aabbc8f0c2dd2ef9aa9f02b7186e29a8814 --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/deployment_container_env_test.yaml @@ -0,0 +1,50 @@ +suite: test deployment container envs +release: + name: info-client + namespace: by-helm-test +templates: + - templates/deployment.yaml +set: + image: + name: info-client-by +tests: + - it: check customList as list + set: + env: + customList: + - name: my_test_environment_name + value: "A test value" + - name: test_environment + value: "B test value" + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: my_test_environment_name + value: "A test value" + - contains: + path: spec.template.spec.containers[0].env + content: + name: test_environment + value: "B test value" + - it: check customList as dict + set: + env: + customList: + my_test_environment_name: "A test value" + test_environment: "B test value" + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: my_test_environment_name + value: "A test value" + - contains: + path: spec.template.spec.containers[0].env + content: + name: test_environment + value: "B test value" + - it: check env is empty by default + asserts: + - isEmpty: + path: spec.template.spec.containers[0].env \ No newline at end of file diff --git a/alfa-client/apps/info/src/test/helm/deployment_container_image_test.yaml b/alfa-client/apps/info/src/test/helm/deployment_container_image_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..73420b223b1096f00e4782a35cb4a30aa6d4fece --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/deployment_container_image_test.yaml @@ -0,0 +1,19 @@ +suite: test deployment image +release: + name: info-client + namespace: by-helm-test +templates: + - templates/deployment.yaml +tests: + - it: should faile if image.name is not set + asserts: + - failedTemplate: + errorMessage: image.name muss angegeben sein + - it: should set image + set: + image: + name: info-client-by + asserts: + - equal: + path: spec.template.spec.containers[0].image + value: docker.ozg-sh.de/info-client-by:latest \ No newline at end of file diff --git a/alfa-client/apps/info/src/test/helm/deployment_container_ports_test.yaml b/alfa-client/apps/info/src/test/helm/deployment_container_ports_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bdbc611fb087ed1866efcebdeeb7c38fd63fce13 --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/deployment_container_ports_test.yaml @@ -0,0 +1,32 @@ +suite: test deployment container ports +release: + name: info-client + namespace: by-helm-test +templates: + - templates/deployment.yaml +set: + image: + name: info-client-by +tests: + - it: should have ports + asserts: + - equal: + path: spec.template.spec.containers[0].ports + value: + - containerPort: 8080 + name: 8080tcp + protocol: TCP + - containerPort: 2091 + name: metrics + protocol: TCP + - it: should not contain metrics ports if monitoring is disabled + set: + disableMonitoring: true + asserts: + - notContains: + path: spec.template.spec.containers[0].ports + content: + containerPort: 2091 + name: metrics + protocol: TCP + any: true \ No newline at end of file diff --git a/alfa-client/apps/info/src/test/helm/deployment_container_probes_test.yaml b/alfa-client/apps/info/src/test/helm/deployment_container_probes_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3be3176f7ecfc6a3e0efcaa26d38b47fa2164298 --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/deployment_container_probes_test.yaml @@ -0,0 +1,56 @@ +suite: test deployment container probes +release: + name: info-client + namespace: by-helm-test +templates: + - templates/deployment.yaml +set: + image: + name: info-client-by +tests: + - it: should have readinessProbe + asserts: + - equal: + path: spec.template.spec.containers[0].readinessProbe + value: + failureThreshold: 3 + httpGet: + path: / + port: 8080 + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 3 + - it: should have startupProbe + asserts: + - equal: + path: spec.template.spec.containers[0].startupProbe + value: + failureThreshold: 10 + httpGet: + path: / + port: 8080 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 5 + successThreshold: 1 + timeoutSeconds: 5 + - it: should not have livenessProbe + asserts: + - notExists: + path: spec.template.spec.containers[0].livenessProbe + - it: should have livenessProbe + set: + enableLivenessProbe: true + asserts: + - equal: + path: spec.template.spec.containers[0].livenessProbe + value: + failureThreshold: 3 + httpGet: + path: / + port: 8080 + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 3 \ No newline at end of file diff --git a/alfa-client/apps/info/src/test/helm/deployment_container_security_context_test.yaml b/alfa-client/apps/info/src/test/helm/deployment_container_security_context_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8987fcd33a583bc621c3547a87006fe793ab0964 --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/deployment_container_security_context_test.yaml @@ -0,0 +1,63 @@ +suite: test deployment container security context +release: + name: info-client + namespace: by-helm-test +templates: + - templates/deployment.yaml +set: + image: + name: info-clinet-by +tests: + - it: check default values + asserts: + - equal: + path: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation + value: false + - equal: + path: spec.template.spec.containers[0].securityContext.privileged + value: false + - equal: + path: spec.template.spec.containers[0].securityContext.readOnlyRootFilesystem + value: false + - equal: + path: spec.template.spec.containers[0].securityContext.runAsNonRoot + value: true + - isNull: + path: spec.template.spec.containers[0].securityContext.runAsUser + - isNull: + path: spec.template.spec.containers[0].securityContext.runAsGroup + - isNull: + path: spec.template.spec.containers[0].securityContext.capabilities + - it: check runAsUser + set: + securityContext.runAsUser: 1000 + asserts: + - equal: + path: spec.template.spec.containers[0].securityContext.runAsUser + value: 1000 + - it: check runAsGroup + set: + securityContext.runAsGroup: 1000 + asserts: + - equal: + path: spec.template.spec.containers[0].securityContext.runAsGroup + value: 1000 + - it: check fsGroup + set: + podSecurityContext.fsGroup: 1000 + asserts: + - equal: + path: spec.template.spec.securityContext.fsGroup + value: 1000 + - it: check capabilities + set: + securityContext: + capabilities: + drop: + - ALL + asserts: + - equal: + path: spec.template.spec.containers[0].securityContext.capabilities + value: + drop: + - ALL \ No newline at end of file diff --git a/alfa-client/apps/info/src/test/helm/deployment_container_test.yaml b/alfa-client/apps/info/src/test/helm/deployment_container_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dde7b56aa83574d0378f6e5712fc8be85f32f310 --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/deployment_container_test.yaml @@ -0,0 +1,164 @@ +suite: test deployment container +release: + name: info-client + namespace: by-helm-test +templates: + - templates/deployment.yaml +tests: + - it: check customList as list + set: + image: + name: info-client-by + env: + customList: + - name: my_test_environment_name + value: "A test value" + - name: test_environment + value: "B test value" + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: my_test_environment_name + value: "A test value" + - contains: + path: spec.template.spec.containers[0].env + content: + name: test_environment + value: "B test value" + - it: check customList as dict + set: + image: + name: info-client-by + env: + customList: + my_test_environment_name: "A test value" + test_environment: "B test value" + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: my_test_environment_name + value: "A test value" + - contains: + path: spec.template.spec.containers[0].env + content: + name: test_environment + value: "B test value" + - it: check env is empty by default + set: + image: + name: info-client-by + asserts: + - isEmpty: + path: spec.template.spec.containers[0].env + - it: should faile if image.name is not set + asserts: + - failedTemplate: + errorMessage: image.name muss angegeben sein + - it: should set image + set: + image: + name: info-client-by + asserts: + - equal: + path: spec.template.spec.containers[0].image + value: docker.ozg-sh.de/info-client-by:latest + - it: should have ports + set: + image: + name: info-client-by + asserts: + - equal: + path: spec.template.spec.containers[0].ports + value: + - containerPort: 8080 + name: 8080tcp + protocol: TCP + - containerPort: 2091 + name: metrics + protocol: TCP + - it: should not contain metrics ports if monitoring is disabled + set: + image: + name: info-client-by + disableMonitoring: true + asserts: + - notContains: + path: spec.template.spec.containers[0].ports + content: + containerPort: 2091 + name: metrics + protocol: TCP + any: true + - it: should have readinessProbe + set: + image: + name: info-client-by + asserts: + - equal: + path: spec.template.spec.containers[0].readinessProbe + value: + failureThreshold: 3 + httpGet: + path: / + port: 8080 + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 3 + - it: should have startupProbe + set: + image: + name: info-client-by + asserts: + - equal: + path: spec.template.spec.containers[0].startupProbe + value: + failureThreshold: 10 + httpGet: + path: / + port: 8080 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 5 + successThreshold: 1 + timeoutSeconds: 5 + - it: should not have livenessProbe + set: + image: + name: info-client-by + asserts: + - notExists: + path: spec.template.spec.containers[0].livenessProbe + - it: should have livenessProbe + set: + image: + name: info-client-by + enableLivenessProbe: true + asserts: + - equal: + path: spec.template.spec.containers[0].livenessProbe + value: + failureThreshold: 3 + httpGet: + path: / + port: 8080 + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 3 + - it: should have defautl resources + set: + image: + name: info-client-by + asserts: + - equal: + path: spec.template.spec.containers[0].resources + value: + limits: + cpu: 150m + memory: 150Mi + requests: + cpu: 50m + memory: 50Mi diff --git a/alfa-client/apps/info/src/test/helm/deployment_pod_test.yaml b/alfa-client/apps/info/src/test/helm/deployment_pod_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ea8769a3bc225a9d995e4ab20f70a134c9f3ef07 --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/deployment_pod_test.yaml @@ -0,0 +1,114 @@ +suite: test pod deployment +release: + name: info-client + namespace: by-helm-test +templates: + - templates/deployment.yaml +set: + image: + name: info-client-by +tests: + - it: validate kind + asserts: + - isKind: + of: Deployment + - it: validate apiVersion + asserts: + - isAPIVersion: + of: "apps/v1" + - it: validate default name + asserts: + - equal: + path: metadata.name + value: info-client + - it: validate default namespace + asserts: + - equal: + path: metadata.namespace + value: by-helm-test + - it: should have default labels + asserts: + - equal: + path: metadata.labels + value: + app.kubernetes.io/instance: info-client + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: ozgcloud + app.kubernetes.io/version: 0.0.0-MANAGED-BY-JENKINS + helm.sh/chart: info-client-0.0.0-MANAGED-BY-JENKINS + app.kubernetes.io/name: info-client + app.kubernetes.io/namespace: by-helm-test + - it: should have default replicaCount + asserts: + - equal: + path: spec.replicas + value: 1 + - it: should set replicaCount + set: + replicaCount: 2 + asserts: + - equal: + path: spec.replicas + value: 2 + - it: should have match labels + asserts: + - equal: + path: spec.selector.matchLabels + value: + app.kubernetes.io/name: info-client + app.kubernetes.io/namespace: by-helm-test + - it: template should have default labels + asserts: + - equal: + path: spec.template.metadata.labels + value: + app.kubernetes.io/instance: info-client + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: ozgcloud + app.kubernetes.io/version: 0.0.0-MANAGED-BY-JENKINS + helm.sh/chart: info-client-0.0.0-MANAGED-BY-JENKINS + app.kubernetes.io/name: info-client + app.kubernetes.io/namespace: by-helm-test + - it: topologySpreadConstraints should have default matchLabels + asserts: + - equal: + path: spec.template.spec.topologySpreadConstraints[0].labelSelector.matchLabels + value: + app.kubernetes.io/name: info-client + app.kubernetes.io/namespace: by-helm-test + + - it: should not set hostAliases + asserts: + - isNull: + path: spec.template.spec.hostAliases + - it: should set hostAliases + set: + hostAliases: + - ip: "127.0.0.1" + hostname: + - "eins" + - "zwei" + asserts: + - contains: + path: spec.template.spec.hostAliases + content: + ip: "127.0.0.1" + hostname: + - "eins" + - "zwei" + - it: should not set pod securityContext + asserts: + - isNull: + path: spec.template.spec.securityContext + - it: should set pod securityContext + set: + podSecurityContext: + capabilities: + drop: + - ALL + asserts: + - equal: + path: spec.template.spec.securityContext.capabilities + value: + drop: + - ALL \ No newline at end of file diff --git a/alfa-client/apps/info/src/test/helm/deployment_service_account_test.yaml b/alfa-client/apps/info/src/test/helm/deployment_service_account_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4d78ecbc5b99c17ff4ad51a8583bda88c77d66ed --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/deployment_service_account_test.yaml @@ -0,0 +1,31 @@ +suite: test deployment service account +release: + name: info-client + namespace: by-helm-test +templates: + - templates/deployment.yaml +set: + image: + name: info-client-by +tests: + - it: should use service account with default name + set: + serviceAccount: + create: true + asserts: + - equal: + path: spec.template.spec.serviceAccountName + value: info-client-service-account + - it: should use service account with name + set: + serviceAccount: + create: true + name: test-service-account + asserts: + - equal: + path: spec.template.spec.serviceAccountName + value: test-service-account + - it: should not use service account + asserts: + - isNull: + path: spec.template.spec.serviceAccountName \ No newline at end of file diff --git a/alfa-client/apps/info/src/test/helm/ingress_test.yaml b/alfa-client/apps/info/src/test/helm/ingress_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bdf028becd7e78d3f660b753bcf4e62ceace1378 --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/ingress_test.yaml @@ -0,0 +1,144 @@ +suite: test ingress +release: + name: info-client + namespace: by-helm-test +templates: + - templates/ingress.yaml +tests: + - it: validate kind + set: + baseDomain: static.test.ozgcloud.de + asserts: + - isKind: + of: Ingress + - it: validate apiVersion + set: + baseDomain: static.test.ozgcloud.de + asserts: + - isAPIVersion: + of: "networking.k8s.io/v1" + - it: validate default name + set: + baseDomain: static.test.ozgcloud.de + asserts: + - equal: + path: metadata.name + value: info-client + - it: validate default namespace + set: + baseDomain: static.test.ozgcloud.de + asserts: + - equal: + path: metadata.namespace + value: by-helm-test + - it: should use default letsencrypt-prod cluster-issuer + set: + baseDomain: static.test.ozgcloud.de + asserts: + - equal: + path: metadata.annotations["cert-manager.io/cluster-issuer"] + value: letsencrypt-prod + - it: should use letsencrypt-staging cluster-issuer + set: + ingress: + useStagingCert: true + baseDomain: static.test.ozgcloud.de + asserts: + - equal: + path: metadata.annotations["cert-manager.io/cluster-issuer"] + value: letsencrypt-staging + - it: should use letsencrypt-prod cluster-issuer + set: + ingress: + useStagingCert: false + baseDomain: static.test.ozgcloud.de + asserts: + - equal: + path: metadata.annotations["cert-manager.io/cluster-issuer"] + value: letsencrypt-prod + - it: should disable default cert-manager + set: + ingress: + disableDefaultCertManager: true + baseDomain: static.test.ozgcloud.de + asserts: + - notExists: + path: metadata.annotations["cert-manager.io/cluster-issuer"] + - it: should set ingress annotation + set: + ingress: + annotations: + test: test-annotation + baseDomain: static.test.ozgcloud.de + asserts: + - equal: + path: metadata.annotations.test + value: test-annotation + - it: should not set ingressClassName + set: + baseDomain: static.test.ozgcloud.de + asserts: + - isNull: + path: spec.ingressClassName + - it: should set ingressClassName + set: + ingress: + className: nginx + baseDomain: static.test.ozgcloud.de + asserts: + - equal: + path: spec.ingressClassName + value: nginx + - it: validate rules + set: + baseDomain: static.test.ozgcloud.de + asserts: + - contains: + path: spec.rules + content: + http: + paths: + - backend: + service: + port: + number: 8080 + name: info-client + path: '/' + pathType: Prefix + host: static.test.ozgcloud.de + - it: should fail if baseDomain is not set + asserts: + - failedTemplate: + errorMessage: baseDomain muss angegeben sein + - it: should generate tls secret name + set: + baseDomain: static.test.ozgcloud.de + asserts: + - equal: + path: spec.tls[0].secretName + value: info-client-tls + - it: should set tls secret name + set: + baseDomain: static.test.ozgcloud.de + ingress: + tlsSecretName: test-secretname-tls + asserts: + - equal: + path: spec.tls[0].secretName + value: test-secretname-tls + - it: should set tls host + set: + baseDomain: static.test.ozgcloud.de + asserts: + - contains: + path: spec.tls[0].hosts + content: + static.test.ozgcloud.de + - it: should not contain tls settings + set: + baseDomain: static.test.ozgcloud.de + ingress: + skipTlsSecret: true + asserts: + - notExists: + path: spec.tls \ No newline at end of file diff --git a/alfa-client/apps/info/src/test/helm/service_account_test.yaml b/alfa-client/apps/info/src/test/helm/service_account_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9cb8e8d902ed1418e0911d658119c80e08f51d20 --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/service_account_test.yaml @@ -0,0 +1,41 @@ +suite: test serviceAccount +release: + name: info-client + namespace: by-helm-test +templates: + - templates/service_account.yaml +tests: + - it: validate kind + set: + serviceAccount: + create: true + asserts: + - isKind: + of: ServiceAccount + - it: validate apiVersion + set: + serviceAccount: + create: true + asserts: + - isAPIVersion: + of: "v1" + - it: validate default name + set: + serviceAccount: + create: true + asserts: + - equal: + path: metadata.name + value: info-client-service-account + - it: validate default namespace + set: + serviceAccount: + create: true + asserts: + - equal: + path: metadata.namespace + value: by-helm-test + - it: should not create ServiceAccount + asserts: + - hasDocuments: + count: 0 \ No newline at end of file diff --git a/alfa-client/apps/info/src/test/helm/service_monitor_test.yaml b/alfa-client/apps/info/src/test/helm/service_monitor_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..78878d5eedd32475e61169653d33b9363c9ca9c5 --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/service_monitor_test.yaml @@ -0,0 +1,63 @@ +suite: test service monitor +release: + name: info-client + namespace: by-helm-test +templates: + - templates/service_monitor.yaml +tests: + - it: validate kind + asserts: + - isKind: + of: ServiceMonitor + - it: validate apiVersion + asserts: + - isAPIVersion: + of: "monitoring.coreos.com/v1" + - it: validate default name + asserts: + - equal: + path: metadata.name + value: info-client + - it: validate default namespace + asserts: + - equal: + path: metadata.namespace + value: by-helm-test + - it: should have default labels + asserts: + - equal: + path: metadata.labels + value: + app.kubernetes.io/instance: info-client + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: ozgcloud + app.kubernetes.io/version: 0.0.0-MANAGED-BY-JENKINS + helm.sh/chart: info-client-0.0.0-MANAGED-BY-JENKINS + app.kubernetes.io/name: info-client + app.kubernetes.io/namespace: by-helm-test + - it: should have endpoint + asserts: + - contains: + path: spec.endpoints + content: + port: metrics + path: /metrics + - it: should have namespaceSelector + asserts: + - contains: + path: spec.namespaceSelector.matchNames + content: + by-helm-test + - it: should have default matchLabels + asserts: + - equal: + path: spec.selector.matchLabels + value: + app.kubernetes.io/name: info-client + app.kubernetes.io/namespace: by-helm-test + - it: should not create ServiceMonitor if monitoring is disabled + set: + disableMonitoring: true + asserts: + - hasDocuments: + count: 0 \ No newline at end of file diff --git a/alfa-client/apps/info/src/test/helm/service_test.yaml b/alfa-client/apps/info/src/test/helm/service_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5e80dc48031d89763cfaeb16751364b7866fb6ac --- /dev/null +++ b/alfa-client/apps/info/src/test/helm/service_test.yaml @@ -0,0 +1,75 @@ +suite: test service +release: + name: info-client + namespace: by-helm-test +templates: + - templates/service.yaml +tests: + - it: validate kind + asserts: + - isKind: + of: Service + - it: validate apiVersion + asserts: + - isAPIVersion: + of: "v1" + - it: validate default name + asserts: + - equal: + path: metadata.name + value: info-client + - it: validate default namespace + asserts: + - equal: + path: metadata.namespace + value: by-helm-test + - it: should have default labels + asserts: + - equal: + path: metadata.labels + value: + app.kubernetes.io/instance: info-client + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: ozgcloud + app.kubernetes.io/version: 0.0.0-MANAGED-BY-JENKINS + helm.sh/chart: info-client-0.0.0-MANAGED-BY-JENKINS + app.kubernetes.io/name: info-client + app.kubernetes.io/namespace: by-helm-test + - it: should have default selector + asserts: + - equal: + path: spec.selector + value: + app.kubernetes.io/name: info-client + app.kubernetes.io/namespace: by-helm-test + - it: validate service type + asserts: + - equal: + path: spec.type + value: ClusterIP + - it: should include http port + asserts: + - contains: + path: spec.ports + content: + name: http + port: 8080 + protocol: TCP + - it: should include metrics port + asserts: + - contains: + path: spec.ports + content: + name: metrics + port: 2019 + protocol: TCP + - it: should not include metrics port if monitoring is disabled + set: + disableMonitoring: true + asserts: + - notContains: + path: spec.ports + content: + name: metrics + port: 2019 + protocol: TCP \ No newline at end of file diff --git a/alfa-client/libs/design-system/src/lib/form/button-toggle/button-toggle.component.ts b/alfa-client/libs/design-system/src/lib/form/button-toggle/button-toggle.component.ts index 9b7fbff3e927e5390264eab7fbcd5441d1d7011d..682b688db34a95c07b3f916f5c465b433bb9e379 100644 --- a/alfa-client/libs/design-system/src/lib/form/button-toggle/button-toggle.component.ts +++ b/alfa-client/libs/design-system/src/lib/form/button-toggle/button-toggle.component.ts @@ -30,7 +30,7 @@ import { CheckIconComponent } from '../../icons/check-icon/check-icon.component' standalone: true, imports: [CommonModule, CheckIconComponent], template: `<button - class="flex cursor-pointer items-center gap-1 px-3 py-1.5 outline-none hover:bg-neutral-300 focus-visible:bg-neutral-300 dark:hover:bg-neutral-600 dark:focus-visible:bg-neutral-600" + class="flex h-full cursor-pointer items-center gap-1 px-3 py-1.5 outline-none hover:bg-neutral-300 focus-visible:bg-neutral-300 dark:hover:bg-neutral-600 dark:focus-visible:bg-neutral-600" [ngClass]="{ 'bg-neutral-200 font-bold hover:bg-neutral-200 focus-visible:bg-neutral-200 dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:focus-visible:bg-neutral-800': isChecked, diff --git a/alfa-client/libs/navigation/src/lib/header-container/header/header.component.html b/alfa-client/libs/navigation/src/lib/header-container/header/header.component.html index d242083a8ace00b985014ed7514aa0b02bcb2172..c8f98e7e33a3f0a9c816674f8ebb1f39b3fcf1ef 100644 --- a/alfa-client/libs/navigation/src/lib/header-container/header/header.component.html +++ b/alfa-client/libs/navigation/src/lib/header-container/header/header.component.html @@ -24,13 +24,13 @@ --> <header data-test-id="header"> - <div class="left"> + <div class="flex self-center sm:ml-3 lg:min-w-60"> <alfa-header-logo></alfa-header-logo> </div> - <div class="middle"> + <div class="grow sm:order-2 sm:mr-4 lg:w-full"> <alfa-vorgang-search-container></alfa-vorgang-search-container> </div> - <div class="flex items-center text-ozggray-800 dark:text-ozggray-300"> + <div class="flex flex-1 items-center justify-end self-end text-ozggray-800 dark:text-ozggray-300 sm:order-3 sm:self-center"> <common-accessibility-button *ngIf="apiRootStateResource?.resource.barrierefreiheitUrl" [url]="apiRootStateResource.resource.barrierefreiheitUrl" diff --git a/alfa-client/libs/navigation/src/lib/header-container/header/header.component.scss b/alfa-client/libs/navigation/src/lib/header-container/header/header.component.scss index 6e2b0ab30e640d060074709372aaa04afeb4874f..af0d57f07af15136ea44ffbac3f6cdb538005530 100644 --- a/alfa-client/libs/navigation/src/lib/header-container/header/header.component.scss +++ b/alfa-client/libs/navigation/src/lib/header-container/header/header.component.scss @@ -26,30 +26,13 @@ @import 'variables'; header { - height: $header-height; + @apply flex flex-row flex-wrap content-between items-center gap-2 pb-2 pl-4 pr-4 pt-2 sm:fixed sm:flex-nowrap sm:content-between sm:gap-0 sm:pr-8; + + min-height: $header-height; box-shadow: $shadow-bottom; - padding: 0.5rem 2rem 0.5rem 1rem; left: 0; top: 0; right: 0; width: 100%; z-index: 3; - display: flex; - align-items: center; - justify-content: space-between; - position: fixed; -} - -.middle { - flex-grow: 1; - margin-right: 1rem; -} - -.left { - display: flex; - align-items: inherit; - margin-left: 0.75rem; - @include media('>desktop') { - min-width: 240px; - } } diff --git a/alfa-client/libs/vorgang/src/lib/vorgang-list-container/vorgang-list/vorgang-list-item/vorgang-list-item.component.html b/alfa-client/libs/vorgang/src/lib/vorgang-list-container/vorgang-list/vorgang-list-item/vorgang-list-item.component.html index c0a54bbede7b5052d1550ea6861d1f3c98833333..b7e362147f00bd68bec7cf1f850f8e37a8eb7c58 100644 --- a/alfa-client/libs/vorgang/src/lib/vorgang-list-container/vorgang-list/vorgang-list-item/vorgang-list-item.component.html +++ b/alfa-client/libs/vorgang/src/lib/vorgang-list-container/vorgang-list/vorgang-list-item/vorgang-list-item.component.html @@ -27,73 +27,75 @@ [attr.aria-label]="ariaLabel" routerLink="/vorgang/{{ vorgang | toResourceUri: vorgangLinkRel.VORGANG_WITH_EINGANG }}" [attr.data-test-id]="'vorgang-list-item-' + vorgang.name | convertForDataTest" - class="flex flex-row gap-4 border-b-2 border-gray-200 p-4 hover:shadow-[inset_1px_-1px_0_0_rgba(0,0,0,0.16)] dark:border-b dark:border-gray-300 dark:hover:shadow-[inset_1px_-1px_0_0_rgba(255,255,255,0.60)]" + class="flex flex-col gap-2 border-b-2 border-gray-200 p-4 hover:shadow-[inset_1px_-1px_0_0_rgba(0,0,0,0.16)] dark:border-b dark:border-gray-300 dark:hover:shadow-[inset_1px_-1px_0_0_rgba(255,255,255,0.60)] lg:flex-row lg:gap-4" > - <div class="flex w-32 flex-none flex-col"> - <div class="flex items-center gap-3"> - <alfa-vorgang-status-dot - [status]="vorgang.status" - diameter="12" - data-test-class="status-dot" - ></alfa-vorgang-status-dot> - <alfa-vorgang-status-text - [status]="vorgang.status" - data-test-class="status-text" - class="status-text" - ></alfa-vorgang-status-text> - </div> - <div class="ml-6 mt-3 flex text-sm"> - <alfa-vorgang-bescheid-status - *ngIf="vorgang.antragBewilligt !== null" - [vorgang]="vorgang" - data-test-id="vorgang-list-item-bescheid-status" - ></alfa-vorgang-bescheid-status> - </div> - </div> - <div class="flex flex-1 flex-col gap-1"> - <div data-test-id="name" class="break-all text-base font-medium"> - {{ vorgang.name }} - </div> - <div class="mt-1"> - <alfa-vorgang-nummer class="vorgang-nummer" [vorgang]="vorgang"></alfa-vorgang-nummer> - </div> - <div> - <div class="flex flex-row gap-1"> - <div class="flex flex-shrink-0"> - <mat-icon svgIcon="az" style="width: 1.5rem; height: 1.5rem"></mat-icon> + <div class="flex grow flex-row gap-4"> + <div class="flex flex-1 flex-col gap-4 lg:flex-row"> + <div class="flex flex-none flex-row lg:w-32 lg:flex-col"> + <div class="flex items-center gap-3"> + <alfa-vorgang-status-dot [status]="vorgang.status" diameter="12" data-test-class="status-dot"></alfa-vorgang-status-dot> + <alfa-vorgang-status-text + [status]="vorgang.status" + data-test-class="status-text" + class="status-text" + ></alfa-vorgang-status-text> + </div> + <div class="ml-6 flex text-sm lg:mt-3"> + <alfa-vorgang-bescheid-status + *ngIf="vorgang.antragBewilligt !== null" + [vorgang]="vorgang" + data-test-id="vorgang-list-item-bescheid-status" + ></alfa-vorgang-bescheid-status> + </div> + </div> + <div class="ml-6 flex flex-1 flex-col gap-1 lg:ml-0"> + <div data-test-id="name" class="break-all text-base font-medium"> + {{ vorgang.name }} + </div> + <div class="mt-1"> + <alfa-vorgang-nummer class="vorgang-nummer" [vorgang]="vorgang"></alfa-vorgang-nummer> + </div> + <div> + <div class="flex flex-row gap-1"> + <div class="flex flex-shrink-0"> + <mat-icon svgIcon="az" style="width: 1.5rem; height: 1.5rem"></mat-icon> + </div> + <div alfa-aktenzeichen [vorgang]="vorgang"></div> + </div> + </div> + </div> + <div class="ml-6 flex w-48 gap-4 lg:ml-0"> + <div class="flex w-36 flex-none flex-col gap-2"> + <div> + <alfa-vorgang-created-at class="eingang" [vorgang]="vorgang"></alfa-vorgang-created-at> + </div> + <div> + <alfa-vorgang-next-frist-button + *ngIf="vorgang | hasLink: vorgangLinkRel.WIEDERVORLAGEN" + [vorgang]="vorgang" + class="wiedervorlagen" + ></alfa-vorgang-next-frist-button> + </div> + + <div> + <ozgcloud-postfach-icon + data-test-class="postfach-icon" + *ngIf="vorgang.hasPostfachNachricht === true" + [showBadge]="vorgang.hasNewPostfachNachricht" + class="postfach-icon" + > + </ozgcloud-postfach-icon> + </div> </div> - <div alfa-aktenzeichen [vorgang]="vorgang"></div> </div> </div> - </div> - <div class="flex w-36 flex-none flex-col gap-2"> - <div> - <alfa-vorgang-created-at class="eingang" [vorgang]="vorgang"></alfa-vorgang-created-at> - </div> - <div> - <alfa-vorgang-next-frist-button - *ngIf="vorgang | hasLink: vorgangLinkRel.WIEDERVORLAGEN" + <div class="flex-none"> + <alfa-user-profile-in-vorgang-list-item-container + *ngIf="vorgang | hasLink: vorgangLinkRel.ASSIGN" + data-test-id="vorgang-user-icon" [vorgang]="vorgang" - class="wiedervorlagen" - ></alfa-vorgang-next-frist-button> - </div> - - <div> - <ozgcloud-postfach-icon - data-test-class="postfach-icon" - *ngIf="vorgang.hasPostfachNachricht === true" - [showBadge]="vorgang.hasNewPostfachNachricht" - class="postfach-icon" - > - </ozgcloud-postfach-icon> + class="user-icon" + ></alfa-user-profile-in-vorgang-list-item-container> </div> </div> - <div class="w-10 flex-none"> - <alfa-user-profile-in-vorgang-list-item-container - *ngIf="vorgang | hasLink: vorgangLinkRel.ASSIGN" - data-test-id="vorgang-user-icon" - [vorgang]="vorgang" - class="user-icon" - ></alfa-user-profile-in-vorgang-list-item-container> - </div> </a> diff --git a/alfa-client/libs/vorgang/src/lib/vorgang-list-page-container/vorgang-list-page/vorgang-filter-menu-container/vorgang-filter-menu-container.component.scss b/alfa-client/libs/vorgang/src/lib/vorgang-list-page-container/vorgang-list-page/vorgang-filter-menu-container/vorgang-filter-menu-container.component.scss index 9f76478c287d26d3f40962d9b4b4d591d0be94cd..ad595c4dd830cb588a5cde1daa79d57a7580fe11 100644 --- a/alfa-client/libs/vorgang/src/lib/vorgang-list-page-container/vorgang-list-page/vorgang-filter-menu-container/vorgang-filter-menu-container.component.scss +++ b/alfa-client/libs/vorgang/src/lib/vorgang-list-page-container/vorgang-list-page/vorgang-filter-menu-container/vorgang-filter-menu-container.component.scss @@ -24,13 +24,10 @@ @import 'variables'; :host { - position: sticky; + @apply flex items-center justify-end sm:sticky; top: $header-height; - height: 3rem; + min-height: 3rem; width: 100%; z-index: 2; - display: flex; - justify-content: flex-end; - align-items: center; padding: 0.25rem 0 0.25rem 1rem; } diff --git a/alfa-client/libs/vorgang/src/lib/vorgang-list-page-container/vorgang-list-page/vorgang-list-page.component.html b/alfa-client/libs/vorgang/src/lib/vorgang-list-page-container/vorgang-list-page/vorgang-list-page.component.html index d17083dc60ab16ecb411155678eba69e8b7f4f1e..698e9bc2fbc0d012efa253f4e8bbad2c7fcab5a8 100644 --- a/alfa-client/libs/vorgang/src/lib/vorgang-list-page-container/vorgang-list-page/vorgang-list-page.component.html +++ b/alfa-client/libs/vorgang/src/lib/vorgang-list-page-container/vorgang-list-page/vorgang-list-page.component.html @@ -26,18 +26,15 @@ <h1 class="sr-only">Vorgangsliste</h1> <alfa-vorgang-filter-menu-container class="mat-app-background"></alfa-vorgang-filter-menu-container> -<div class="flex flex-row"> +<div class="flex flex-col sm:flex-row"> <alfa-vorgang-views-menu-container *ngIf="apiRootStateResource.resource" [apiRootResource]="apiRootStateResource.resource" - class="w-[15.5rem] flex-none" + class="w-full sm:w-[15.5rem] sm:flex-none" ></alfa-vorgang-views-menu-container> <main - *ngIf=" - apiRootStateResource?.resource | hasLink: apiRootLinkRel.ALLE_VORGAENGE; - else showNoRoleMessage - " + *ngIf="apiRootStateResource?.resource | hasLink: apiRootLinkRel.ALLE_VORGAENGE; else showNoRoleMessage" data-test-id="vorgaenge-list" class="flex flex-1 flex-col overflow-hidden border border-gray-200 dark:border-black" > diff --git a/alfa-client/libs/vorgang/src/lib/vorgang-list-page-container/vorgang-list-page/vorgang-views-menu-container/vorgang-views-menu-container.component.scss b/alfa-client/libs/vorgang/src/lib/vorgang-list-page-container/vorgang-list-page/vorgang-views-menu-container/vorgang-views-menu-container.component.scss index 41e59faee7e0685dd6a678ee277e472139e6856e..3c840233872982deff0f3bc90a0a16e34c9a8730 100644 --- a/alfa-client/libs/vorgang/src/lib/vorgang-list-page-container/vorgang-list-page/vorgang-views-menu-container/vorgang-views-menu-container.component.scss +++ b/alfa-client/libs/vorgang/src/lib/vorgang-list-page-container/vorgang-list-page/vorgang-views-menu-container/vorgang-views-menu-container.component.scss @@ -24,10 +24,9 @@ @import 'variables'; :host { + @apply self-start md:sticky; background-color: $background; padding: 0 1rem 0 0; - position: sticky; - align-self: flex-start; top: $header-height + $navigation-height; } diff --git a/src/main/helm/templates/deployment.yaml b/src/main/helm/templates/deployment.yaml index 6a6605eec6fa1436022ef090c6bb235b1b4d7c49..57682225e76d0e7f3d049de49ec1e08d9b66cc4e 100644 --- a/src/main/helm/templates/deployment.yaml +++ b/src/main/helm/templates/deployment.yaml @@ -121,11 +121,8 @@ spec: - name: ozgcloud_feature_collaborationEnabled value: {{ ((.Values.ozgcloud).feature).collaborationEnabled | quote }} {{- end }} - {{- if (.Values.ozgcloud).barrierefreiheitUrl }} - name: ozgcloud_barrierefreiheitUrl - value: {{ (.Values.ozgcloud).barrierefreiheitUrl }} - {{- end }} - + value: {{ required "ozgcloud.barrierefreiheitUrl muss angegeben sein" (.Values.ozgcloud).barrierefreiheitUrl }} image: "{{ .Values.image.repo }}/{{ .Values.image.name }}:{{ coalesce (.Values.image).tag "latest" }}" imagePullPolicy: Always name: alfa diff --git a/src/main/helm/templates/keycloak_crd.yaml b/src/main/helm/templates/keycloak_crd.yaml index 6d717e005aed699bdaf5552f140ec1672f433631..9d55120f30d540c75bb0430a1e24cca8ffb26228 100644 --- a/src/main/helm/templates/keycloak_crd.yaml +++ b/src/main/helm/templates/keycloak_crd.yaml @@ -1,27 +1,3 @@ -# -# Copyright (C) 2024 Das Land Schleswig-Holstein vertreten durch den -# Ministerpräsidenten des Landes Schleswig-Holstein -# Staatskanzlei -# Abteilung Digitalisierung und zentrales IT-Management der Landesregierung -# -# Lizenziert unter der EUPL, Version 1.2 oder - sobald -# diese von der Europäischen Kommission genehmigt wurden - -# Folgeversionen der EUPL ("Lizenz"); -# Sie dürfen dieses Werk ausschließlich gemäß -# dieser Lizenz nutzen. -# Eine Kopie der Lizenz finden Sie hier: -# -# https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 -# -# Sofern nicht durch anwendbare Rechtsvorschriften -# gefordert oder in schriftlicher Form vereinbart, wird -# die unter der Lizenz verbreitete Software "so wie sie -# ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN - -# ausdrücklich oder stillschweigend - verbreitet. -# Die sprachspezifischen Genehmigungen und Beschränkungen -# unter der Lizenz sind dem Lizenztext zu entnehmen. -# - {{- if not (.Values.sso).disableOzgOperator -}} apiVersion: operator.ozgcloud.de/v1 kind: OzgCloudKeycloakRealm diff --git a/src/test/helm-linter-values.yaml b/src/test/helm-linter-values.yaml index 921400e84cc132e5bf51df4e7f60aa275dbbc2da..ef1e815825384e1a8704b3f950d4d753c94bf190 100644 --- a/src/test/helm-linter-values.yaml +++ b/src/test/helm-linter-values.yaml @@ -28,6 +28,7 @@ ozgcloud: bundesland: sh bezeichner: helm environment: test + barrierefreiheitUrl: http://barrierefreiheit.lint.url networkPolicy: ssoPublicIp: 51.89.117.53/32 diff --git a/src/test/helm/deployment_63_char_test.yaml b/src/test/helm/deployment_63_char_test.yaml index a4bde43d1ed6c2c363bcc692aa6b7e499408c5d3..28fa4858c874ef7f6a783a6d5ecadb9666ab797a 100644 --- a/src/test/helm/deployment_63_char_test.yaml +++ b/src/test/helm/deployment_63_char_test.yaml @@ -37,7 +37,7 @@ set: environment: test bundesland: sh bezeichner: helm - + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local baseUrl: test.company.local diff --git a/src/test/helm/deployment_archive_manager_address_env_test.yaml b/src/test/helm/deployment_archive_manager_address_env_test.yaml index 148184f0fae94370660e8f49ba6caa74b9182653..62c21c0178121e18e317b25c107785fe6bc86a74 100644 --- a/src/test/helm/deployment_archive_manager_address_env_test.yaml +++ b/src/test/helm/deployment_archive_manager_address_env_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_bindings_test.yaml b/src/test/helm/deployment_bindings_test.yaml index 5791677f19fd46120462030067519ee947448c74..1a97acbf75dfc76a29657b0e031ff3c72a3e819c 100644 --- a/src/test/helm/deployment_bindings_test.yaml +++ b/src/test/helm/deployment_bindings_test.yaml @@ -33,6 +33,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local baseUrl: test.company.local diff --git a/src/test/helm/deployment_collaboration_env_test.yaml b/src/test/helm/deployment_collaboration_env_test.yaml index aa8eef87179703713d05b570b31285c099510bc0..ba02d181e1dc7319c84f18e0f999eb88b600d265 100644 --- a/src/test/helm/deployment_collaboration_env_test.yaml +++ b/src/test/helm/deployment_collaboration_env_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret @@ -87,14 +88,4 @@ tests: path: spec.template.spec.containers[0].env content: name: grpc_client_zufi-manager_negotiationType - value: TLS - - it: should have barrierefreiheitUrl - set: - ozgcloud: - barrierefreiheitUrl: http://barrierefreiheit.url - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: ozgcloud_barrierefreiheitUrl - value: http://barrierefreiheit.url \ No newline at end of file + value: TLS \ No newline at end of file diff --git a/src/test/helm/deployment_collaboration_manager_address_env_test.yaml b/src/test/helm/deployment_collaboration_manager_address_env_test.yaml index d5b281eb44b0a152bad1bc5c37c693da23959dbe..2d1d4f2ce1668ebca72e9ea166c0e379584d31fd 100644 --- a/src/test/helm/deployment_collaboration_manager_address_env_test.yaml +++ b/src/test/helm/deployment_collaboration_manager_address_env_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_config_client_env_test.yaml b/src/test/helm/deployment_config_client_env_test.yaml index 4576ce30e68b2150a65c958b073b684567846f75..22160f51c47ae09585a6a9ec76895d536d53cd6c 100644 --- a/src/test/helm/deployment_config_client_env_test.yaml +++ b/src/test/helm/deployment_config_client_env_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_customList_env_test.yaml b/src/test/helm/deployment_customList_env_test.yaml index 12d891305470eb196bc7da3d68a09461e883f46b..747718c3086265f3f7fa0279f1be4f3cbd16445e 100644 --- a/src/test/helm/deployment_customList_env_test.yaml +++ b/src/test/helm/deployment_customList_env_test.yaml @@ -31,6 +31,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_defaults_affinity_test.yaml b/src/test/helm/deployment_defaults_affinity_test.yaml index 10518783e34f874d4b9f40270b9795d6ce7f8ce0..f6f74091d43288639d332c800f4076fc857ca4ee 100644 --- a/src/test/helm/deployment_defaults_affinity_test.yaml +++ b/src/test/helm/deployment_defaults_affinity_test.yaml @@ -33,6 +33,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local baseUrl: test.company.local diff --git a/src/test/helm/deployment_defaults_env_test.yaml b/src/test/helm/deployment_defaults_env_test.yaml index 2ae7c0e36565b549e69d1f87d9a467e69d2d5e10..8c1ec32ef046e2ca9b86757199a9957e77eb3bba 100644 --- a/src/test/helm/deployment_defaults_env_test.yaml +++ b/src/test/helm/deployment_defaults_env_test.yaml @@ -41,6 +41,8 @@ tests: - it: check default values set: usermanagerName: user-manager + ozgcloud: + barrierefreiheitUrl: http://barrierefreiheit.test.url asserts: - isKind: of: Deployment @@ -68,6 +70,8 @@ tests: - it: should have service binding root set: usermanagerName: user-manager + ozgcloud: + barrierefreiheitUrl: http://barrierefreiheit.test.url asserts: - contains: path: spec.template.spec.containers[0].env @@ -84,6 +88,7 @@ tests: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url asserts: - contains: path: spec.template.spec.containers[0].env @@ -97,6 +102,7 @@ tests: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url vorgang: bescheid: - formEngineName: AFM @@ -128,6 +134,8 @@ tests: - it: should set user-manager negotiationType plaintext set: userManager.grpcClientNegotiationType: PLAINTEXT + ozgcloud: + barrierefreiheitUrl: http://barrierefreiheit.test.url asserts: - contains: path: spec.template.spec.containers[0].env @@ -136,6 +144,9 @@ tests: value: PLAINTEXT - it: should contain default user-manager negotiationType tls + set: + ozgcloud: + barrierefreiheitUrl: http://barrierefreiheit.test.url asserts: - contains: path: spec.template.spec.containers[0].env @@ -146,6 +157,8 @@ tests: - it: should set vorgang-manager negotiationType plaintext set: vorgangManager.grpcClientNegotiationType: PLAINTEXT + ozgcloud: + barrierefreiheitUrl: http://barrierefreiheit.test.url asserts: - contains: path: spec.template.spec.containers[0].env @@ -154,6 +167,9 @@ tests: value: PLAINTEXT - it: should contain default vorgang-manager negotiationType tls + set: + ozgcloud: + barrierefreiheitUrl: http://barrierefreiheit.test.url asserts: - contains: path: spec.template.spec.containers[0].env @@ -163,6 +179,8 @@ tests: - it: should set collaboration-manager negotiationType plaintext set: collaborationManager.grpcClientNegotiationType: PLAINTEXT + ozgcloud: + barrierefreiheitUrl: http://barrierefreiheit.test.url asserts: - contains: path: spec.template.spec.containers[0].env @@ -171,6 +189,9 @@ tests: value: PLAINTEXT - it: should contain default collaboration-manager negotiationType tls + set: + ozgcloud: + barrierefreiheitUrl: http://barrierefreiheit.test.url asserts: - contains: path: spec.template.spec.containers[0].env @@ -181,6 +202,8 @@ tests: - it: should set archive-manager negotiationType plaintext set: archiveManager.grpcClientNegotiationType: PLAINTEXT + ozgcloud: + barrierefreiheitUrl: http://barrierefreiheit.test.url asserts: - contains: path: spec.template.spec.containers[0].env @@ -189,9 +212,28 @@ tests: value: PLAINTEXT - it: should contain default archive-manager negotiationType tls + set: + ozgcloud: + barrierefreiheitUrl: http://barrierefreiheit.test.url asserts: - contains: path: spec.template.spec.containers[0].env content: name: grpc_client_archive-manager_negotiationType value: TLS + + - it: should set barrierefreiheitUrl + set: + ozgcloud: + barrierefreiheitUrl: http://barrierefreiheit.test.url + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_barrierefreiheitUrl + value: http://barrierefreiheit.test.url + + - it: should fail without barrierefreiheitUrl + asserts: + - failedTemplate: + errorMessage: ozgcloud.barrierefreiheitUrl muss angegeben sein \ No newline at end of file diff --git a/src/test/helm/deployment_defaults_labels_test.yaml b/src/test/helm/deployment_defaults_labels_test.yaml index 2559f70d29f9bb6f397ddbe71d2235022e98e6f4..4a173586663da27ef10943810af89033747cc021 100644 --- a/src/test/helm/deployment_defaults_labels_test.yaml +++ b/src/test/helm/deployment_defaults_labels_test.yaml @@ -35,6 +35,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_defaults_spec_containers_health_test.yaml b/src/test/helm/deployment_defaults_spec_containers_health_test.yaml index 40588247baeae6a9a7e8370277436793e25160b6..b794b72cdcbdca2426a579b5369c4716639d2967 100644 --- a/src/test/helm/deployment_defaults_spec_containers_health_test.yaml +++ b/src/test/helm/deployment_defaults_spec_containers_health_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_defaults_spec_containers_securityContext_test.yaml b/src/test/helm/deployment_defaults_spec_containers_securityContext_test.yaml index b9ef1310d667be4a1061647245b900f0054a9747..76c0fb55c3a19cb36a101657f7d75dd5e8851788 100644 --- a/src/test/helm/deployment_defaults_spec_containers_securityContext_test.yaml +++ b/src/test/helm/deployment_defaults_spec_containers_securityContext_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_defaults_spec_containers_test.yaml b/src/test/helm/deployment_defaults_spec_containers_test.yaml index b427a8127a9122181724d8268ef15b61272887e0..4a09b1cdef7539b6d4fb44a53d0d02bf2df30a9c 100644 --- a/src/test/helm/deployment_defaults_spec_containers_test.yaml +++ b/src/test/helm/deployment_defaults_spec_containers_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_defaults_sso_env_test.yaml b/src/test/helm/deployment_defaults_sso_env_test.yaml index efe4bca4af37ac0bfe89b54d26b89d881f281cc7..e64213f66ec1af7f2bb97626431513ba23c622ca 100644 --- a/src/test/helm/deployment_defaults_sso_env_test.yaml +++ b/src/test/helm/deployment_defaults_sso_env_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_defaults_topologySpreadConstraints_test.yaml b/src/test/helm/deployment_defaults_topologySpreadConstraints_test.yaml index 4b99323e45f0e350827d4301e98f8bb16f15bffb..f89897b0503e14346d0b518166829067209ade5c 100644 --- a/src/test/helm/deployment_defaults_topologySpreadConstraints_test.yaml +++ b/src/test/helm/deployment_defaults_topologySpreadConstraints_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_host_aliases_test.yaml b/src/test/helm/deployment_host_aliases_test.yaml index d4dc00463a9cfbf2e0c6c4b628c49702f53e2f30..42caa76552fc17d74de41b6b9a344180d9005837 100644 --- a/src/test/helm/deployment_host_aliases_test.yaml +++ b/src/test/helm/deployment_host_aliases_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_imageTag_test.yaml b/src/test/helm/deployment_imageTag_test.yaml index 65779921336b3f6f7ae80a69b1b6f7aa46f5e796..883f93ea580f320165c1a655b70fbd5d64fca0a4 100644 --- a/src/test/helm/deployment_imageTag_test.yaml +++ b/src/test/helm/deployment_imageTag_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_imagepull_secret_test.yaml b/src/test/helm/deployment_imagepull_secret_test.yaml index 9fd5ab7461eac571175ba26982b073a8a2e9b870..3a7972b0fc3f59305aabef90e3f359b81f09a0d7 100644 --- a/src/test/helm/deployment_imagepull_secret_test.yaml +++ b/src/test/helm/deployment_imagepull_secret_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local tests: diff --git a/src/test/helm/deployment_liveness_probe_test.yaml b/src/test/helm/deployment_liveness_probe_test.yaml index 1957004a408a64cdfd52da9ce636c3f04fb180e5..78f9912ff33fa920866124af06f5bf35bb00d353 100644 --- a/src/test/helm/deployment_liveness_probe_test.yaml +++ b/src/test/helm/deployment_liveness_probe_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_pod_default_spec_values_test.yaml b/src/test/helm/deployment_pod_default_spec_values_test.yaml index bed9ec81b4b182a610457df9d83760ae65782a3e..32ae31e9d60ae995e8b39526c54876fa063e17fc 100644 --- a/src/test/helm/deployment_pod_default_spec_values_test.yaml +++ b/src/test/helm/deployment_pod_default_spec_values_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_realm_name_length_test.yaml b/src/test/helm/deployment_realm_name_length_test.yaml index 8115f8e5fa107a3073d2def54eef1407a4069082..be7f37f6581fcd1a8f6585b4e5328aec2e28328c 100644 --- a/src/test/helm/deployment_realm_name_length_test.yaml +++ b/src/test/helm/deployment_realm_name_length_test.yaml @@ -36,6 +36,7 @@ tests: bezeichner: test1234567890123123456789012345678901234567890123456789012345678901234567890123456789012345678904567890 environment: test bundesland: by + barrierefreiheitUrl: http://barrierefreiheit.test.url asserts: - failedTemplate: errorMessage: ozgcloud.bezeichner test1234567890123123456789012345678901234567890123456789012345678901234567890123456789012345678904567890 ist zu lang (max. 46 Zeichen) \ No newline at end of file diff --git a/src/test/helm/deployment_resources_test.yaml b/src/test/helm/deployment_resources_test.yaml index 6c19df3b7eb7b3b6e41afaff0d543cb66cc27cb3..ced5244c8602a69e86f9a68a511422c851422ab3 100644 --- a/src/test/helm/deployment_resources_test.yaml +++ b/src/test/helm/deployment_resources_test.yaml @@ -33,6 +33,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_springProfile_env_test.yaml b/src/test/helm/deployment_springProfile_env_test.yaml index 9e66c48cc890a76a4d96011d51427b0085256a2b..075e2d7b3fb0837ee5041da019c973c093dc6732 100644 --- a/src/test/helm/deployment_springProfile_env_test.yaml +++ b/src/test/helm/deployment_springProfile_env_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_usermanager_address_env_test.yaml b/src/test/helm/deployment_usermanager_address_env_test.yaml index 7c4e9b66ace02f0346e9c80a5a55b25e7b4dcbbb..fdcd6d45a6de7deed49c9d1fe25bf909d157ab09 100644 --- a/src/test/helm/deployment_usermanager_address_env_test.yaml +++ b/src/test/helm/deployment_usermanager_address_env_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deployment_vorgang_manager_address_env_test.yaml b/src/test/helm/deployment_vorgang_manager_address_env_test.yaml index 9f6f6aee7a4502e949a8e228beab67705869e8e0..905ae5162abb166d730d410a4813afbf5b155c3f 100644 --- a/src/test/helm/deployment_vorgang_manager_address_env_test.yaml +++ b/src/test/helm/deployment_vorgang_manager_address_env_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret diff --git a/src/test/helm/deyploment_general_value_and_default_spec_test.yaml b/src/test/helm/deyploment_general_value_and_default_spec_test.yaml index cc5d2b373dfb5852c6154e0496d68c8f11283f71..b22a8c5ec095bfb0c7985665f1baab40c492ce91 100644 --- a/src/test/helm/deyploment_general_value_and_default_spec_test.yaml +++ b/src/test/helm/deyploment_general_value_and_default_spec_test.yaml @@ -34,6 +34,7 @@ set: environment: test bundesland: sh bezeichner: helm + barrierefreiheitUrl: http://barrierefreiheit.test.url sso: serverUrl: https://sso.company.local imagePullSecret: image-pull-secret