From adae7ee2e6e0ece1e52bb7a6bc1cb7cea1d588bf Mon Sep 17 00:00:00 2001 From: Phil Schneider Date: Wed, 19 Jun 2024 17:34:48 +0200 Subject: [PATCH] chore: adjust dev env, upgrade package, improve dependabot (#51) * adjust consortia dev setup * add rc environment -------------- Reviewed-By: Evelyn Gurschler --- .github/dependabot.yml | 13 ++- .github/workflows/chart-test.yml | 6 +- .../argocd-app-templates/appsetup-int.yaml | 2 +- .../argocd-app-templates/appsetup-rc.yaml | 41 +++++++ consortia/environments/values-dev.yaml | 4 +- consortia/environments/values-rc.yaml | 104 ++++++++++++++++++ src/database/Dim.Entities/Dim.Entities.csproj | 2 +- 7 files changed, 164 insertions(+), 8 deletions(-) create mode 100644 consortia/argocd-app-templates/appsetup-rc.yaml create mode 100644 consortia/environments/values-rc.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6ac1ec9..e805484 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -31,7 +31,12 @@ updates: interval: "weekly" ignore: - dependency-name: "*" - update-types: ["version-update:semver-major"] + update-types: ["version-update:semver-major"] + groups: + production-dependencies: + dependency-type: "production" + development-dependencies: + dependency-type: "development" # Github Actions - @@ -42,6 +47,9 @@ updates: - "github-actions" schedule: interval: "weekly" + groups: + dependencies: + dependency-type: "production" # Docker - @@ -55,3 +63,6 @@ updates: ignore: - dependency-name: "*" update-types: ["version-update:semver-major"] + groups: + dependencies: + dependency-type: "production" diff --git a/.github/workflows/chart-test.yml b/.github/workflows/chart-test.yml index a9e5c18..84e6c4c 100644 --- a/.github/workflows/chart-test.yml +++ b/.github/workflows/chart-test.yml @@ -38,7 +38,7 @@ on: upgrade_from: description: 'dim chart version to upgrade from' # tbd - default: 'tbd' + default: '0.0.7' required: false type: string @@ -113,9 +113,9 @@ jobs: - name: Run chart-testing (install) run: ct install --charts charts/dim --config charts/chart-testing-config.yaml --helm-extra-set-args "--set dim.image.name=kind-registry:5000/dim-service --set dim.image.tag=testing --set migrations.image.name=kind-registry:5000/dim-migrations --set migrations.image.tag=testing --set processesworker.image.name=kind-registry:5000/dim-processes-worker --set processesworker.image.tag=testing" - if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true' + if: github.event_name != 'pull_request' || steps.list-changed.outputs + # TODO: re-add the step after the first version release .changed == 'true' - # TODO: re-add the step after the first version release # Upgrade the released chart version with the locally available chart # default value for event_name != workflow_dispatch # - name: Run helm upgrade diff --git a/consortia/argocd-app-templates/appsetup-int.yaml b/consortia/argocd-app-templates/appsetup-int.yaml index ba1a624..eac7b7b 100644 --- a/consortia/argocd-app-templates/appsetup-int.yaml +++ b/consortia/argocd-app-templates/appsetup-int.yaml @@ -28,7 +28,7 @@ spec: source: path: charts/dim repoURL: 'https://github.com/phil91/dim-client.git' - targetRevision: dim-0.0.3 + targetRevision: dim-0.0.7 plugin: env: - name: AVP_SECRET diff --git a/consortia/argocd-app-templates/appsetup-rc.yaml b/consortia/argocd-app-templates/appsetup-rc.yaml new file mode 100644 index 0000000..952fbfa --- /dev/null +++ b/consortia/argocd-app-templates/appsetup-rc.yaml @@ -0,0 +1,41 @@ +############################################################### +# Copyright (c) 2024 BMW Group AG +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: dim +spec: + destination: + namespace: product-iam + server: 'https://kubernetes.default.svc' + source: + path: charts/dim + repoURL: 'https://github.com/phil91/dim-client.git' + targetRevision: main + plugin: + env: + - name: AVP_SECRET + value: vault-secret + - name: helm_args + value: '-f values.yaml -f ../../consortia/environments/values-rc.yaml' + project: project-portal + syncPolicy: + automated: + prune: true diff --git a/consortia/environments/values-dev.yaml b/consortia/environments/values-dev.yaml index cef6616..e593417 100644 --- a/consortia/environments/values-dev.yaml +++ b/consortia/environments/values-dev.yaml @@ -42,7 +42,7 @@ dim: tag: "main" imagePullPolicy: "Always" swaggerEnabled: true - rootDirectoryId: "27fee02a-e265-4cfc-af70-4f217a33840b" + rootDirectoryId: "ee464a81-fca4-431d-8315-5db5e49b4c3c" operatorId: "27fee02a-e265-4cfc-af70-4f217a33840b" migrations: @@ -62,7 +62,7 @@ processesworker: adminMail: "phil.schneider@digitalnativesolutions.de" clientIdCisCentral: "" clientSecretCisCentral: "" - authUrl: "https://catena-x-int-dim.authentication.eu10.hana.ondemand.com" + authUrl: "https://catena-x-dev-dim.authentication.eu10.hana.ondemand.com" subaccount: # -- Url to the subaccount service api baseUrl: "https://accounts-service.cfapps.eu10.hana.ondemand.com" diff --git a/consortia/environments/values-rc.yaml b/consortia/environments/values-rc.yaml new file mode 100644 index 0000000..cb09dcc --- /dev/null +++ b/consortia/environments/values-rc.yaml @@ -0,0 +1,104 @@ +############################################################### +# Copyright (c) 2024 BMW Group AG +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +ingress: + enabled: true + className: "nginx" + annotations: + nginx.ingress.kubernetes.io/use-regex: "true" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/proxy-body-size: "8m" + nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000, https://*.dev.demo.catena-x.net" + tls: + - secretName: "tls-secret" + hosts: + - "dim-rc.dev.demo.catena-x.net" + hosts: + - host: "dim-rc.dev.demo.catena-x.net" + paths: + - path: "/api/dim" + pathType: "Prefix" + backend: + port: 8080 + +dim: + image: + tag: "main" + imagePullPolicy: "Always" + swaggerEnabled: true + rootDirectoryId: "ee464a81-fca4-431d-8315-5db5e49b4c3c" + operatorId: "27fee02a-e265-4cfc-af70-4f217a33840b" + +migrations: + image: + tag: "main" + imagePullPolicy: "Always" + logging: + default: "Debug" + +processesworker: + image: + tag: "main" + imagePullPolicy: "Always" + logging: + default: "Debug" + dim: + adminMail: "phil.schneider@digitalnativesolutions.de" + clientIdCisCentral: "" + clientSecretCisCentral: "" + authUrl: "https://catena-x-dev-dim.authentication.eu10.hana.ondemand.com" + subaccount: + # -- Url to the subaccount service api + baseUrl: "https://accounts-service.cfapps.eu10.hana.ondemand.com" + entitlement: + # -- Url to the entitlement service api + baseUrl: "https://entitlements-service.cfapps.eu10.hana.ondemand.com" + cf: + clientId: "" + clientSecret: "" + tokenAddress: "https://login.cf.eu10.hana.ondemand.com/oauth/token" + # -- Url to the cf service api + baseUrl: "https://api.cf.eu10.hana.ondemand.com" + grantType: "client_credentials" + callback: + scope: "openid" + grantType: "client_credentials" + # -- Provide client-id for callback. + clientId: "" + # -- Client-secret for callback client-id. Secret-key 'callback-client-secret'. + clientSecret: "" + tokenAddress: "http://centralidp-rc.dev.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/token" + # -- Url to the cf service api + baseAddress: "https://portal-backend-rc.dev.demo.catena-x.net" + technicalUserCreation: + encryptionConfigs: + index0: + encryptionKey: "<" + +idp: + address: "https://centralidp-rc.dev.demo.catena-x.net" + jwtBearerOptions: + tokenValidationParameters: + validAudience: "DIM-Middle-Layer" + +postgresql: + auth: + postgrespassword: "" + password: "" + replicationPassword: "" diff --git a/src/database/Dim.Entities/Dim.Entities.csproj b/src/database/Dim.Entities/Dim.Entities.csproj index a7f595b..4dd4d38 100644 --- a/src/database/Dim.Entities/Dim.Entities.csproj +++ b/src/database/Dim.Entities/Dim.Entities.csproj @@ -32,7 +32,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - +