diff --git a/alfa-client/apps/admin/Jenkinsfile b/alfa-client/apps/admin/Jenkinsfile index 8ae0ccfcdb74541493558353c758eb9896742caa..2253bfcdd61fcf724892c3f0efef1b21970e4f80 100644 --- a/alfa-client/apps/admin/Jenkinsfile +++ b/alfa-client/apps/admin/Jenkinsfile @@ -50,7 +50,7 @@ pipeline { steps { script { FAILED_STAGE = env.STAGE_NAME - VERSION = getAdminPackageJsonVersion() + VERSION = getPackageJsonVersion() if(isReleaseBranch()){ if ( !isReleaseVersion([VERSION]) ) { @@ -65,7 +65,7 @@ pipeline { } } - stage('Build admin client and its docker image') { + stage('Build administration client and its docker image') { steps { script { FAILED_STAGE=env.STAGE_NAME @@ -75,9 +75,9 @@ pipeline { sh 'pnpm install --frozen-lockfile' if (isReleaseBranch()) { - sh 'pnpm run ci-prodBuild-admin' + sh 'pnpm run ci-prodBuild-administration' } else { - sh 'pnpm run ci-build-admin' + sh 'pnpm run ci-build-administration' } if (isMainBranch()) { withSonarQubeEnv('sonarqube-ozg-sh'){ @@ -148,7 +148,7 @@ pipeline { stage('Trigger Test rollout') { when { - branch 'release-admin' + branch 'release-administration' } steps { script { @@ -176,7 +176,7 @@ pipeline { Boolean isReleaseBranch() { - return env.BRANCH_NAME == 'release-admin' + return env.BRANCH_NAME == 'release-administration' } def validateBranchName(branchName) { @@ -224,24 +224,24 @@ Void setNewTestVersion() { Void setNewGitopsVersion(String environment) { dir("gitops") { - def envFile = "${environment}/application/values/admin-client-values.yaml" + def envFile = "${environment}/application/values/administration-client-values.yaml" def envVersions = readYaml file: envFile - envVersions.admin_client.image.tag = IMAGE_TAG - envVersions.admin_client.helm.version = HELM_CHART_VERSION + envVersions.administration_client.image.tag = IMAGE_TAG + envVersions.administration_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} administration_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/administration-client-values.yaml'", returnStatus: true) == env.SH_SUCCESS_STATUS_CODE as Integer } @@ -263,11 +263,11 @@ Void tagAndPushDockerImage(String newTag){ withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { sh 'docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}' - sh "docker tag docker.ozg-sh.de/admin-client:build-latest docker.ozg-sh.de/admin-client:${newTag}" - sh "docker push docker.ozg-sh.de/admin-client:${newTag}" + sh "docker tag docker.ozg-sh.de/administration-client:build-latest docker.ozg-sh.de/administration-client:${newTag}" + sh "docker push docker.ozg-sh.de/administration-client:${newTag}" } } -String getAdminPackageJsonVersion() { +String getPackageJsonVersion() { def packageJSON = readJSON file: 'alfa-client/apps/admin/package.json' def packageJSONVersion = packageJSON.version echo packageJSONVersion @@ -277,10 +277,10 @@ String getAdminPackageJsonVersion() { 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=@administration-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=@administration-client-'''+helmChartVersion+'''.tgz''', returnStdout: true } if (result != '') { @@ -296,9 +296,9 @@ Boolean isMainBranch() { Void sendFailureMessage() { def room = '' def data = """{"msgtype":"m.text", \ - "body":"Admin-Client: Build Failed. Stage: ${FAILED_STAGE} Build-ID: ${env.BUILD_NUMBER} Link: ${JENKINS_URL}", \ + "body":"Administration-Client: Build Failed. Stage: ${FAILED_STAGE} Build-ID: ${env.BUILD_NUMBER} Link: ${JENKINS_URL}", \ "format": "org.matrix.custom.html", \ - "formatted_body":"Admin-Client: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <a href='${JENKINS_URL}'>${env.BUILD_NUMBER}</a>"}""" + "formatted_body":"Administration-Client: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <a href='${JENKINS_URL}'>${env.BUILD_NUMBER}</a>"}""" if (isMainBranch()) { room = "!iQPAvQIiRwRpNOszjw:matrix.ozg-sh.de" diff --git a/alfa-client/apps/admin/project.json b/alfa-client/apps/admin/project.json index 9876b834e6f340fb8d71da344f75a75a9386f41b..8bffa965bb8057ebe41383397a5bf311660a5f24 100644 --- a/alfa-client/apps/admin/project.json +++ b/alfa-client/apps/admin/project.json @@ -15,10 +15,7 @@ "main": "apps/admin/src/main.ts", "polyfills": ["zone.js"], "tsConfig": "apps/admin/tsconfig.app.json", - "allowedCommonJsDependencies": [ - "sanitize-filename-ts", - "jsrsasign" - ], + "allowedCommonJsDependencies": ["sanitize-filename-ts", "jsrsasign"], "assets": [ "apps/admin/src/assets", { @@ -112,7 +109,7 @@ "engine": "docker", "push": false, "metadata": { - "images": ["docker.ozg-sh.de/admin-client"], + "images": ["docker.ozg-sh.de/administration-client"], "load": true, "tags": ["build-latest"] } diff --git a/alfa-client/apps/admin/src/main/helm/Chart.yaml b/alfa-client/apps/admin/src/main/helm/Chart.yaml index 7f1c7ec2c239956bf3b275ede276c5520603a2b1..98e2c2f72c110125d1ecf1e333e1b696841e9834 100644 --- a/alfa-client/apps/admin/src/main/helm/Chart.yaml +++ b/alfa-client/apps/admin/src/main/helm/Chart.yaml @@ -24,7 +24,7 @@ apiVersion: v1 appVersion: '1.0' -description: A Helm chart for Admin Client -name: admin-client +description: A Helm chart for Administration Client +name: administration-client version: 0.0.0-MANAGED-BY-JENKINS icon: https://simpleicons.org/icons/helm.svg diff --git a/alfa-client/apps/admin/src/main/helm/templates/_helpers.tpl b/alfa-client/apps/admin/src/main/helm/templates/_helpers.tpl index 3e25f32b0a413172ebebbcd61487f45237d1e420..fd312ca2b186f6b8f711f5af52270e35a6c8905a 100644 --- a/alfa-client/apps/admin/src/main/helm/templates/_helpers.tpl +++ b/alfa-client/apps/admin/src/main/helm/templates/_helpers.tpl @@ -51,7 +51,7 @@ {{/* Default Labels: Helm recommended best-practice labels https://helm.sh/docs/chart_best_practices/labels/ */}} {{- define "app.defaultLabels" }} -app.kubernetes.io/instance: admin-client +app.kubernetes.io/instance: administration-client app.kubernetes.io/managed-by: {{ include "app.managedBy" . }} app.kubernetes.io/name: {{ .Release.Name }} app.kubernetes.io/namespace: {{ include "app.namespace" . }} @@ -80,12 +80,12 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }} {{- define "app.serviceAccountName" -}} -{{ printf "%s" ( (.Values.serviceAccount).name | default "admin-client-service-account" ) }} +{{ printf "%s" ( (.Values.serviceAccount).name | default "administration-client-service-account" ) }} {{- end -}} {{- define "app.baseDomain" -}} -{{- printf "%s-%s.%s" (include "app.ozgcloudBezeichner" . ) (.Values.ozgcloud).adminDomainSuffix (include "app.baseUrl" . ) }} +{{- printf "%s-%s.%s" (include "app.ozgcloudBezeichner" . ) (.Values.ozgcloud).administrationDomainSuffix (include "app.baseUrl" . ) }} {{- end -}} {{- define "app.ozgcloudBezeichner" -}} diff --git a/alfa-client/apps/admin/src/main/helm/templates/deployment.yaml b/alfa-client/apps/admin/src/main/helm/templates/deployment.yaml index 313812a726ff3f48bdab917e1b7ecfe8812cc3c0..d42402bb33022a66ed4f19427f3f9072b0330e2f 100644 --- a/alfa-client/apps/admin/src/main/helm/templates/deployment.yaml +++ b/alfa-client/apps/admin/src/main/helm/templates/deployment.yaml @@ -45,7 +45,7 @@ spec: metadata: labels: {{- include "app.defaultLabels" . | indent 8 }} - component: admin-client + component: administration-client spec: {{- if (.Values.serviceAccount).create }} serviceAccountName: {{ include "app.serviceAccountName" . }} @@ -69,7 +69,7 @@ spec: image: "{{ .Values.image.repo }}/{{ .Values.image.name }}:{{ coalesce (.Values.image).tag "latest" }}" imagePullPolicy: Always - name: admin-client + name: administration-client startupProbe: httpGet: diff --git a/alfa-client/apps/admin/src/main/helm/templates/ingress.yaml b/alfa-client/apps/admin/src/main/helm/templates/ingress.yaml index eb9b7523e636cd573782b12cd4851ef087afa782..3a98e2e4a60e9dab74d960f6b51860dbc22d7fe3 100644 --- a/alfa-client/apps/admin/src/main/helm/templates/ingress.yaml +++ b/alfa-client/apps/admin/src/main/helm/templates/ingress.yaml @@ -49,14 +49,14 @@ spec: backend: service: name: administration - port: + port: number: 8080 - path: / pathType: Prefix backend: service: - name: admin-client - port: + name: administration-client + port: number: 8080 host: {{ include "app.baseDomain" . }} diff --git a/alfa-client/apps/admin/src/main/helm/templates/network_policy.yaml b/alfa-client/apps/admin/src/main/helm/templates/network_policy.yaml index 27b2d9d14a038a1dc5c96d66ca4c464ea4a93679..9a5db61e93b95cb856adc1a337e863d1cf28fc83 100644 --- a/alfa-client/apps/admin/src/main/helm/templates/network_policy.yaml +++ b/alfa-client/apps/admin/src/main/helm/templates/network_policy.yaml @@ -26,7 +26,7 @@ apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: - name: network-policy-admin-client + name: network-policy-administration-client namespace: {{ .Release.Namespace }} spec: podSelector: @@ -46,7 +46,7 @@ spec: {{- end }} egress: - to: - - namespaceSelector: + - namespaceSelector: matchLabels: kubernetes.io/metadata.name: administration - to: diff --git a/alfa-client/apps/admin/src/main/helm/templates/service.yaml b/alfa-client/apps/admin/src/main/helm/templates/service.yaml index 53c0aa703d4563cc7322a8f672fa78c6bda526eb..4c3ba099a334cb01d4bcd07516d8426124e6d5a6 100644 --- a/alfa-client/apps/admin/src/main/helm/templates/service.yaml +++ b/alfa-client/apps/admin/src/main/helm/templates/service.yaml @@ -29,7 +29,7 @@ metadata: namespace: {{ include "app.namespace" . }} labels: {{- include "app.defaultLabels" . | indent 4 }} - component: admin-client-service + component: administration-client-service spec: type: ClusterIP ports: @@ -40,4 +40,4 @@ spec: selector: {{- include "app.matchLabels" . | indent 4 }} - component: admin-client \ No newline at end of file + component: administration-client \ No newline at end of file diff --git a/alfa-client/apps/admin/src/main/helm/values.yaml b/alfa-client/apps/admin/src/main/helm/values.yaml index c1b1df2cdae5978d1c6dbe828a4a36f973f70ede..3bd9e23beaf72777caffab31fcfa85bfc25bf327 100644 --- a/alfa-client/apps/admin/src/main/helm/values.yaml +++ b/alfa-client/apps/admin/src/main/helm/values.yaml @@ -24,9 +24,9 @@ image: repo: docker.ozg-sh.de - name: admin-client + name: administration-client tag: 0.1.0 # [default: latest] replicaCount: 1 ozgcloud: - adminDomainSuffix: admin + administrationDomainSuffix: administration diff --git a/alfa-client/apps/admin/src/test/helm/deployment_63_char_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_63_char_test.yaml index aefd7f81b2c70e7b750b09f5545507345b5bf4ab..db1cc9f92904d10299725421e4c7206b7d2e5798 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_63_char_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_63_char_test.yaml @@ -24,7 +24,7 @@ suite: test deyploment less than 63 chars release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: @@ -49,7 +49,7 @@ tests: version: 1.0-test1234567890123123456789012345678901234567890123456789012345678901234567890123456789012345678904567890 asserts: - failedTemplate: - errorMessage: .Chart.Name-.Chart.Version admin-client-1.0-test1234567890123123456789012345678901234567890123456789012345678901234567890123456789012345678904567890 ist zu lang (max. 63 Zeichen) + errorMessage: .Chart.Name-.Chart.Version administration-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: {} \ No newline at end of file + - notFailedTemplate: {} diff --git a/alfa-client/apps/admin/src/test/helm/deployment_container_basic_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_container_basic_test.yaml index fd783faf0597f003256bfc3b6cdb3a4b48fda537..301b06eb9bd252846c9cc2e908902380ecf6739d 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_container_basic_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_container_basic_test.yaml @@ -24,7 +24,7 @@ suite: test deployment container basics release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/deployment.yaml @@ -38,20 +38,10 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: docker.ozg-sh.de/admin-client:0.1.0 + value: docker.ozg-sh.de/administration-client:0.1.0 - equal: path: spec.template.spec.containers[0].name - value: admin-client - - equal: + value: administration-client + - equal: path: spec.template.spec.containers[0].imagePullPolicy value: Always - #- it: should have correct values for container ports - # asserts: - # - contains: - # path: spec.template.spec.containers[0].ports - # content: - # containerPort: 8081 - # name: metrics - # protocol: TCP - - diff --git a/alfa-client/apps/admin/src/test/helm/deployment_container_other_values_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_container_other_values_test.yaml index e73cabb2634d16f2c3c8cd104ecc0ade2af46d78..32d7a2be8b0340082991856a15d75408a3e86360 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_container_other_values_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_container_other_values_test.yaml @@ -22,8 +22,7 @@ # unter der Lizenz sind dem Lizenztext zu entnehmen. # - - # +# # Copyright (C) 2022 Das Land Schleswig-Holstein vertreten durch den # Ministerpräsidenten des Landes Schleswig-Holstein # Staatskanzlei @@ -49,7 +48,7 @@ suite: test deployment container other values release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/deployment.yaml @@ -57,7 +56,7 @@ set: ozgcloud: environment: dev imagePullSecret: test-image-secret - + tests: - it: should have correct values for container terminationMessagePolicy, terminationMessagePath, stdin, tty asserts: @@ -67,9 +66,9 @@ tests: - equal: path: spec.template.spec.containers[0].terminationMessagePath value: /dev/termination-log - - equal: + - equal: path: spec.template.spec.containers[0].stdin value: true - - equal: + - equal: path: spec.template.spec.containers[0].tty - value: true \ No newline at end of file + value: true diff --git a/alfa-client/apps/admin/src/test/helm/deployment_container_security_context_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_container_security_context_test.yaml index 6acb97512889899878f48eb3f510d1011ca7e0f4..6e42a6a93048f8577650fe57186df2a2db592b0f 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_container_security_context_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_container_security_context_test.yaml @@ -24,7 +24,7 @@ suite: test deployment container security context release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/deployment.yaml @@ -65,4 +65,4 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].securityContext.runAsGroup - value: 1000 \ No newline at end of file + value: 1000 diff --git a/alfa-client/apps/admin/src/test/helm/deployment_defaults_labels_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_defaults_labels_test.yaml index 8a98ecee5e35f378e0bc537dd6fca032198083a4..e616ba28a7f21bc9cb1cdbed81e5b065dc9a290d 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_defaults_labels_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_defaults_labels_test.yaml @@ -24,7 +24,7 @@ suite: test deployment default labels release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/deployment.yaml @@ -39,33 +39,32 @@ tests: - equal: path: metadata.labels value: - app.kubernetes.io/instance: admin-client + app.kubernetes.io/instance: administration-client app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: admin-client + app.kubernetes.io/name: administration-client app.kubernetes.io/namespace: sh-helm-test app.kubernetes.io/part-of: ozgcloud app.kubernetes.io/version: 0.0.0-MANAGED-BY-JENKINS - helm.sh/chart: admin-client-0.0.0-MANAGED-BY-JENKINS - + helm.sh/chart: administration-client-0.0.0-MANAGED-BY-JENKINS + - it: should set spec.selector.matchLabels asserts: - equal: path: spec.selector.matchLabels value: - app.kubernetes.io/name: admin-client + app.kubernetes.io/name: administration-client app.kubernetes.io/namespace: sh-helm-test - - it: should have correct deyploment spec.template.metadata.labels asserts: - equal: path: spec.template.metadata.labels - value: - app.kubernetes.io/instance: admin-client + value: + app.kubernetes.io/instance: administration-client app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: admin-client + app.kubernetes.io/name: administration-client app.kubernetes.io/namespace: sh-helm-test app.kubernetes.io/part-of: ozgcloud app.kubernetes.io/version: 0.0.0-MANAGED-BY-JENKINS - component: admin-client - helm.sh/chart: admin-client-0.0.0-MANAGED-BY-JENKINS \ No newline at end of file + component: administration-client + helm.sh/chart: administration-client-0.0.0-MANAGED-BY-JENKINS diff --git a/alfa-client/apps/admin/src/test/helm/deployment_defaults_topologySpreadConstraints_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_defaults_topologySpreadConstraints_test.yaml index 7f1200536637e1584514d7bc504615702694dc01..dcef5143625d5da53e1333f52826c9ec15348efa 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_defaults_topologySpreadConstraints_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_defaults_topologySpreadConstraints_test.yaml @@ -24,11 +24,11 @@ suite: test deployment topology spread constrains release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/deployment.yaml -set: +set: ozgcloud: environment: test imagePullSecret: test-image-secret @@ -49,4 +49,4 @@ tests: value: ScheduleAnyway - equal: path: spec.template.spec.topologySpreadConstraints[0].labelSelector.matchLabels["app.kubernetes.io/name"] - value: admin-client \ No newline at end of file + value: administration-client diff --git a/alfa-client/apps/admin/src/test/helm/deployment_general_value_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_general_value_test.yaml index 85d1b98c99cefb1080d4db168395c6d764b9a050..114d9e309062cf45213faaeedc9170dc54da3665 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_general_value_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_general_value_test.yaml @@ -24,7 +24,7 @@ suite: test deployment general values release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/deployment.yaml @@ -33,25 +33,23 @@ set: environment: dev imagePullSecret: test-image-secret - tests: - it: should have correct apiVersion asserts: - isKind: of: Deployment - isAPIVersion: - of: "apps/v1" - - - it: should have correct deployment metadata - asserts: + of: 'apps/v1' + + - it: should have correct deployment metadata + asserts: - equal: path: metadata.name - value: admin-client - - equal: + value: administration-client + - equal: path: metadata.namespace value: sh-helm-test - - it: should have correct deyployment general spec values asserts: - equal: @@ -65,12 +63,10 @@ tests: value: 10 - it: should have correct deployment spec strategy values asserts: - - equal: + - equal: path: spec.strategy - value: + value: rollingUpdate: maxSurge: 1 maxUnavailable: 0 type: RollingUpdate - - diff --git a/alfa-client/apps/admin/src/test/helm/deployment_host_aliases_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_host_aliases_test.yaml index 4fe65ff025aa4892f639bd6452bc5e9cea316e09..fda8d70bf7892b11f9f383fae197207b86c499e2 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_host_aliases_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_host_aliases_test.yaml @@ -24,11 +24,11 @@ suite: deployment host aliases release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/deployment.yaml -set: +set: ozgcloud: environment: test imagePullSecret: test-image-secret @@ -40,15 +40,15 @@ tests: - it: should set spec.template.spec.hostAliases set: hostAliases: - - ip: "127.0.0.1" + - ip: '127.0.0.1' hostname: - - "eins" - - "zwei" + - 'eins' + - 'zwei' asserts: - contains: path: spec.template.spec.hostAliases content: - ip: "127.0.0.1" + ip: '127.0.0.1' hostname: - - "eins" - - "zwei" + - 'eins' + - 'zwei' diff --git a/alfa-client/apps/admin/src/test/helm/deployment_imagepull_secret_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_imagepull_secret_test.yaml index 7129ef48705458bca19a741136907126fbe09fa1..1671e8a154517a59520eba65fa4f73ea50d7f9bf 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_imagepull_secret_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_imagepull_secret_test.yaml @@ -24,7 +24,7 @@ suite: test deployment image pull secret release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/deployment.yaml @@ -38,4 +38,4 @@ tests: asserts: - equal: path: spec.template.spec.imagePullSecrets[0].name - value: test-image-secret \ No newline at end of file + value: test-image-secret diff --git a/alfa-client/apps/admin/src/test/helm/deployment_ozgcloud_base_values_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_ozgcloud_base_values_test.yaml index 9195d806882c3e6bc7c841b34169e8de7a2673e8..892f2a185541661a5aaed10337c9eee95c2744fc 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_ozgcloud_base_values_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_ozgcloud_base_values_test.yaml @@ -24,11 +24,11 @@ suite: test ozgcloud base values release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/deployment.yaml -set: +set: imagePullSecret: test-image-secret tests: diff --git a/alfa-client/apps/admin/src/test/helm/deployment_resources_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_resources_test.yaml index 487a6aa04c55c1636d661a7262635e573ab80276..ed640c855a3eb9a0a4c85087cf0275f72bf7b17e 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_resources_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_resources_test.yaml @@ -24,7 +24,7 @@ suite: test deployment container resources release: - name: admin-client + name: administration-client templates: - templates/deployment.yaml set: @@ -59,4 +59,3 @@ tests: asserts: - isEmpty: path: spec.template.spec.containers[0].resources - diff --git a/alfa-client/apps/admin/src/test/helm/deployment_service_account_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_service_account_test.yaml index 98246ba981cba50008edd137c04040383faa5ecc..e8544c9249516ef141e947003588e565bc138929 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_service_account_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_service_account_test.yaml @@ -24,7 +24,7 @@ suite: deployment service account release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/deployment.yaml @@ -41,7 +41,7 @@ tests: asserts: - equal: path: spec.template.spec.serviceAccountName - value: admin-client-service-account + value: administration-client-service-account - it: should use service account with name set: serviceAccount: @@ -54,4 +54,4 @@ tests: - it: should use default service account asserts: - isNull: - path: spec.template.spec.serviceAccountName \ No newline at end of file + path: spec.template.spec.serviceAccountName diff --git a/alfa-client/apps/admin/src/test/helm/deployment_springProfile_test.yaml b/alfa-client/apps/admin/src/test/helm/deployment_springProfile_test.yaml index c42ea85d177c3daf475aa403f636efc4f8594707..483f9ef354b4d5bedeaf9fbbede3b1da763afc92 100644 --- a/alfa-client/apps/admin/src/test/helm/deployment_springProfile_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/deployment_springProfile_test.yaml @@ -24,11 +24,11 @@ suite: test deployment spring profiles release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/deployment.yaml -set: +set: ozgcloud: environment: test imagePullSecret: test-image-secret @@ -53,4 +53,4 @@ tests: path: spec.template.spec.containers[0].env content: name: spring_profiles_active - value: oc, test \ No newline at end of file + value: oc, test diff --git a/alfa-client/apps/admin/src/test/helm/ingress-tests.yaml b/alfa-client/apps/admin/src/test/helm/ingress-tests.yaml index 55974c06a961fefc8b43b985118eaf0eff5cc92a..ffcbcd43dc757d2bc0bc454dc88bcb556afb10f9 100644 --- a/alfa-client/apps/admin/src/test/helm/ingress-tests.yaml +++ b/alfa-client/apps/admin/src/test/helm/ingress-tests.yaml @@ -24,11 +24,11 @@ suite: test ingress.yaml release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/ingress.yaml -set: +set: ozgcloud: bezeichner: helm baseUrl: test.by.ozg-cloud.de @@ -42,7 +42,7 @@ tests: asserts: - equal: path: spec.tls[0].secretName - value: helm-admin-client-tls + value: helm-administration-client-tls - it: should not create ingress tls/ingressClass set: @@ -52,7 +52,7 @@ tests: path: spec.ingressClassName - isNull: path: spec.tls[0].secretName - + - it: should use default letsencrypt-prod cluster-issuer asserts: - equal: @@ -79,35 +79,34 @@ tests: asserts: - equal: path: spec.tls[0].hosts[0] - value: helm-admin.test.by.ozg-cloud.de + value: helm-administration.test.by.ozg-cloud.de - it: should create rules correctly asserts: - equal: path: spec.rules[0].http.paths[0] - value: - path: /api - pathType: Prefix - backend: - service: - name: administration - port: - number: 8080 + value: + path: /api + pathType: Prefix + backend: + service: + name: administration + port: + number: 8080 - equal: path: spec.rules[0].http.paths[1] - value: - path: / - pathType: Prefix - backend: - service: - name: admin-client - port: - number: 8080 - + value: + path: / + pathType: Prefix + backend: + service: + name: administration-client + port: + number: 8080 - it: should set hostname asserts: - equal: path: spec.rules[0].host - value: helm-admin.test.by.ozg-cloud.de + value: helm-administration.test.by.ozg-cloud.de diff --git a/alfa-client/apps/admin/src/test/helm/network_policy_test.yaml b/alfa-client/apps/admin/src/test/helm/network_policy_test.yaml index 2032db88a659c5b7fcf67aa199d6dba893bf5397..b9b5bce398183921d186fd26e480b1b0d6090110 100644 --- a/alfa-client/apps/admin/src/test/helm/network_policy_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/network_policy_test.yaml @@ -22,9 +22,9 @@ # unter der Lizenz sind dem Lizenztext zu entnehmen. # -suite: network policy admin-client test +suite: network policy administration-client test release: - name: admin-client + name: administration-client namespace: by-helm-test templates: - templates/network_policy.yaml @@ -52,7 +52,7 @@ tests: - equal: path: metadata value: - name: network-policy-admin-client + name: network-policy-administration-client namespace: by-helm-test - it: should add egress rule to administration service @@ -63,8 +63,8 @@ tests: - contains: path: spec.egress content: - to: - - namespaceSelector: + to: + - namespaceSelector: matchLabels: kubernetes.io/metadata.name: administration @@ -76,87 +76,86 @@ tests: - contains: path: spec.egress content: - to: + to: - namespaceSelector: matchLabels: kubernetes.io/metadata.name: test-dns-namespace - ports: - - port: 53 - protocol: UDP - - port: 53 - protocol: TCP - - port: 5353 - protocol: UDP - - port: 5353 - protocol: TCP + ports: + - port: 53 + protocol: UDP + - port: 53 + protocol: TCP + - port: 5353 + protocol: UDP + - port: 5353 + protocol: TCP - it: should add additionalIngressConfig local set: networkPolicy: dnsServerNamespace: test-namespace-dns additionalIngressConfigLocal: - - from: - - podSelector: - matchLabels: - component: client2 + - from: + - podSelector: + matchLabels: + component: client2 asserts: - contains: path: spec.ingress content: from: - - podSelector: - matchLabels: - component: client2 + - podSelector: + matchLabels: + component: client2 - it: should add additionalIngressConfig global set: networkPolicy: dnsServerNamespace: test-namespace-dns additionalIngressConfigGlobal: - - from: - - podSelector: - matchLabels: - component: client2 + - from: + - podSelector: + matchLabels: + component: client2 asserts: - contains: path: spec.ingress content: from: - - podSelector: - matchLabels: - component: client2 + - podSelector: + matchLabels: + component: client2 - it: should add additionalEgressConfig local set: networkPolicy: dnsServerNamespace: test-dns-namespace additionalEgressConfigLocal: - - to: - - ipBlock: - cidr: 1.2.3.4/32 + - to: + - ipBlock: + cidr: 1.2.3.4/32 asserts: - - contains: - path: spec.egress - content: - to: - - ipBlock: - cidr: 1.2.3.4/32 + - contains: + path: spec.egress + content: + to: + - ipBlock: + cidr: 1.2.3.4/32 - it: should add additionalEgressConfig global set: networkPolicy: dnsServerNamespace: test-dns-namespace additionalEgressConfigGlobal: - - to: - - ipBlock: - cidr: 1.2.3.4/32 + - to: + - ipBlock: + cidr: 1.2.3.4/32 asserts: - - contains: - path: spec.egress - content: - to: - - ipBlock: - cidr: 1.2.3.4/32 - + - contains: + path: spec.egress + content: + to: + - ipBlock: + cidr: 1.2.3.4/32 - it: test network policy disabled set: @@ -188,4 +187,4 @@ tests: dnsServerNamespace: test-dns-server-namespace asserts: - hasDocuments: - count: 1 \ No newline at end of file + count: 1 diff --git a/alfa-client/apps/admin/src/test/helm/service_account_test.yaml b/alfa-client/apps/admin/src/test/helm/service_account_test.yaml index e80dde85e375a7ba052a403807c460969c9fdc4e..ed45acb09d1975f2cde3e28d2ffa53ca44603e8e 100644 --- a/alfa-client/apps/admin/src/test/helm/service_account_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/service_account_test.yaml @@ -24,7 +24,7 @@ suite: test service account release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/service_account.yaml @@ -40,7 +40,7 @@ tests: of: v1 - equal: path: metadata.name - value: admin-client-service-account + value: administration-client-service-account - equal: path: metadata.namespace value: sh-helm-test @@ -61,4 +61,4 @@ tests: - it: should not create service account asserts: - hasDocuments: - count: 0 \ No newline at end of file + count: 0 diff --git a/alfa-client/apps/admin/src/test/helm/service_test.yaml b/alfa-client/apps/admin/src/test/helm/service_test.yaml index 6496fb494b71c6d91a23ee3979b611ebd06a9fda..02bff8a2fc9e152c2db8f5ec57eb91e6a592ff88 100644 --- a/alfa-client/apps/admin/src/test/helm/service_test.yaml +++ b/alfa-client/apps/admin/src/test/helm/service_test.yaml @@ -24,20 +24,20 @@ suite: test service release: - name: admin-client + name: administration-client namespace: sh-helm-test templates: - templates/service.yaml tests: - - it: should have the label component with correct value + - it: should have the label component with correct value asserts: - isKind: of: Service - isAPIVersion: - of: v1 + of: v1 - equal: path: metadata.labels.component - value: admin-client-service + value: administration-client-service - it: should be of type ClusterIP asserts: - equal: @@ -48,19 +48,19 @@ tests: asserts: - equal: path: spec.selector.component - value: admin-client + value: administration-client - it: selector should contain helm recommended labels name and namespace asserts: - equal: path: spec.selector value: - app.kubernetes.io/name: admin-client + app.kubernetes.io/name: administration-client app.kubernetes.io/namespace: sh-helm-test - component: admin-client + component: administration-client - it: check component label for service asserts: - equal: path: metadata.labels["component"] - value: admin-client-service \ No newline at end of file + value: administration-client-service diff --git a/alfa-client/package.json b/alfa-client/package.json index d6a7bffddc6984305f4bc77149fa653d2083dfd3..d4e51a736a56e6aebfb6e3c8943ca998363833d7 100644 --- a/alfa-client/package.json +++ b/alfa-client/package.json @@ -17,9 +17,9 @@ "test:lib": "nx test ${npm_config_lib}", "test:debug:lib": "nx test ${npm_config_lib} --detectOpenHandles --watchAll", "ci-build": "nx run alfa:build --outputHashing=all", - "ci-build-admin": "nx container admin", + "ci-build-administration": "nx container admin", "ci-prodBuild": "nx run alfa:build --outputHashing=all --configuration production", - "ci-prodBuild-admin": "nx container admin", + "ci-prodBuild-administration": "nx container admin", "ci-test": "nx run-many --target=test --parallel 20 -- --runInBand", "ci-sonar": "nx run-many --target=test --parallel 20 -- --runInBand --codeCoverage --coverageReporters=lcov --testResultsProcessor=jest-sonar-reporter && pnpm exec sonar-scanner", "lint": "nx workspace-lint && nx lint",