From 7f86cd453e7e8797df588fbc82f490ccbd9c15cb Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Thu, 1 Feb 2024 17:32:28 +0100 Subject: [PATCH 1/7] chore: update notice for catena-x logo, as it's not used in this repo yet --- NOTICE.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/NOTICE.md b/NOTICE.md index 5ae2bf2..7b1ebb8 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -30,11 +30,6 @@ This project leverages the following third party content. See DEPENDENCIES file. -This project uses the following image content: - -* Image: Catena-X Logo -* Source URL: https://catena-x.net - ## Cryptography Content may contain encryption software. The country in which you are currently From b55c6a803f18e85f91b275e1e390ef7ca0f0b193 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Thu, 1 Feb 2024 17:33:41 +0100 Subject: [PATCH 2/7] chore: add and update file header templates --- scripts/add_notice_footer.sh | 2 +- scripts/license.sh | 2 +- src/.vscode/settings.json | 86 ++++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 src/.vscode/settings.json diff --git a/scripts/add_notice_footer.sh b/scripts/add_notice_footer.sh index c7b8cc7..083c2f4 100644 --- a/scripts/add_notice_footer.sh +++ b/scripts/add_notice_footer.sh @@ -38,7 +38,7 @@ add-notice() { This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2024 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub''' # Find all .md files in the directory and its subdirectories, excluding directories from the search diff --git a/scripts/license.sh b/scripts/license.sh index 98b9401..31d5e88 100644 --- a/scripts/license.sh +++ b/scripts/license.sh @@ -40,7 +40,7 @@ license-images() { This work is licensed under the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode). - SPDX-License-Identifier: CC-BY-4.0 -- SPDX-FileCopyrightText: Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: Copyright (c) 2024 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub EOF diff --git a/src/.vscode/settings.json b/src/.vscode/settings.json new file mode 100644 index 0000000..f7eb077 --- /dev/null +++ b/src/.vscode/settings.json @@ -0,0 +1,86 @@ +{ + "fileHeaderComment.parameter": { + "*": { + "commentbegin": "/********************************************************************************", + "commentend": " ********************************************************************************/", + "commentprefix": "", + "commentbegin#": "###############################################################", + "commentend#": "###############################################################", + "commentprefix#": "#", + "commentbegin": "", + "commentprefix": "-", + "cx_header_default":[ + "* Copyright (c) 2024 Contributors to the Eclipse Foundation", + " *", + " * 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" + ], + "cx_header_with_#":[ + "Copyright (c) 2024 Contributors to the Eclipse Foundation", + "", + " 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" + ], + "cx_header_with_":[ + "Copyright (c) 2024 Contributors to the Eclipse Foundation", + "-", + "- 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" + ] + } + }, + "fileHeaderComment.template": { + "cx_header_default":[ + "${commentbegin}", + "${commentprefix} ${cx_header_default}", + "${commentend}" + ], + "cx_header_with_":[ + "${commentbegin}", + "${commentprefix} ${cx_header_with_}", + "${commentend}" + ], + "cx_header_with_#":[ + "${commentbegin#}", + "${commentprefix#} ${cx_header_with_#}", + "${commentend#}" + ] + } +} \ No newline at end of file From 2d718b9a8d94ac10b9454ce36dda2acd10059d9b Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Thu, 1 Feb 2024 17:46:36 +0100 Subject: [PATCH 3/7] feat(trg-4.07): enable readOnlyRootFilesystem for containers --- charts/policy-hub/templates/deployment-hub.yaml | 1 + charts/policy-hub/templates/job-policy-hub-migrations.yaml | 1 + docker/Dockerfile-policy-hub-migrations | 1 + docker/Dockerfile-policy-hub-service | 1 + 4 files changed, 4 insertions(+) diff --git a/charts/policy-hub/templates/deployment-hub.yaml b/charts/policy-hub/templates/deployment-hub.yaml index b93a337..2e74403 100644 --- a/charts/policy-hub/templates/deployment-hub.yaml +++ b/charts/policy-hub/templates/deployment-hub.yaml @@ -43,6 +43,7 @@ spec: capabilities: drop: - ALL + readOnlyRootFilesystem: true runAsNonRoot: true image: "{{ .Values.policyhub.image }}" imagePullPolicy: "Always" diff --git a/charts/policy-hub/templates/job-policy-hub-migrations.yaml b/charts/policy-hub/templates/job-policy-hub-migrations.yaml index 241148e..d59e4d4 100644 --- a/charts/policy-hub/templates/job-policy-hub-migrations.yaml +++ b/charts/policy-hub/templates/job-policy-hub-migrations.yaml @@ -39,6 +39,7 @@ spec: capabilities: drop: - ALL + readOnlyRootFilesystem: true runAsNonRoot: true image: "{{ .Values.policyhubmigrations.image }}" imagePullPolicy: "Always" diff --git a/docker/Dockerfile-policy-hub-migrations b/docker/Dockerfile-policy-hub-migrations index 8f33d5a..17514e3 100644 --- a/docker/Dockerfile-policy-hub-migrations +++ b/docker/Dockerfile-policy-hub-migrations @@ -27,6 +27,7 @@ WORKDIR /src/database/PolicyHub.Migrations RUN dotnet publish "PolicyHub.Migrations.csproj" -c Release -o /migrations/publish FROM base AS final +ENV COMPlus_EnableDiagnostics=0 WORKDIR /migrations COPY --from=publish /migrations/publish . RUN chown -R 1000:3000 /migrations diff --git a/docker/Dockerfile-policy-hub-service b/docker/Dockerfile-policy-hub-service index c3df318..3e31033 100644 --- a/docker/Dockerfile-policy-hub-service +++ b/docker/Dockerfile-policy-hub-service @@ -27,6 +27,7 @@ WORKDIR /src/hub/PolicyHub.Service RUN dotnet publish "PolicyHub.Service.csproj" -c Release -o /app/publish FROM base AS final +ENV COMPlus_EnableDiagnostics=0 WORKDIR /app COPY --from=publish /app/publish . ENV ASPNETCORE_URLS http://+:8080 From d12f39202d2c671910f4efa852f69873dd2bccf6 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Thu, 1 Feb 2024 18:10:51 +0100 Subject: [PATCH 4/7] feat: make imagePullPolicy configurable, default set to IfNotPresent --- charts/policy-hub/templates/deployment-hub.yaml | 2 +- charts/policy-hub/templates/job-policy-hub-migrations.yaml | 2 +- charts/policy-hub/values.yaml | 2 ++ consortia/environments/values-dev.yaml | 2 ++ consortia/environments/values-rc.yaml | 4 ++++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/policy-hub/templates/deployment-hub.yaml b/charts/policy-hub/templates/deployment-hub.yaml index 2e74403..d151440 100644 --- a/charts/policy-hub/templates/deployment-hub.yaml +++ b/charts/policy-hub/templates/deployment-hub.yaml @@ -46,7 +46,7 @@ spec: readOnlyRootFilesystem: true runAsNonRoot: true image: "{{ .Values.policyhub.image }}" - imagePullPolicy: "Always" + imagePullPolicy: "{{ .Values.policyhub.imagePullPolicy }}" env: - name: DOTNET_ENVIRONMENT value: "{{ .Values.dotnetEnvironment }}" diff --git a/charts/policy-hub/templates/job-policy-hub-migrations.yaml b/charts/policy-hub/templates/job-policy-hub-migrations.yaml index d59e4d4..0e3ef8b 100644 --- a/charts/policy-hub/templates/job-policy-hub-migrations.yaml +++ b/charts/policy-hub/templates/job-policy-hub-migrations.yaml @@ -42,7 +42,7 @@ spec: readOnlyRootFilesystem: true runAsNonRoot: true image: "{{ .Values.policyhubmigrations.image }}" - imagePullPolicy: "Always" + imagePullPolicy: "{{ .Values.policyhubmigrations.imagePullPolicy }}" env: - name: DOTNET_ENVIRONMENT value: "{{ .Values.dotnetEnvironment }}" diff --git a/charts/policy-hub/values.yaml b/charts/policy-hub/values.yaml index a7857a1..6244866 100644 --- a/charts/policy-hub/values.yaml +++ b/charts/policy-hub/values.yaml @@ -74,6 +74,7 @@ healthChecks: policyhub: image: "tractusx/policy-hub-service:0.1.0-rc.1" + imagePullPolicy: "IfNotPresent" # -- We recommend not to specify default resource limits and to leave this as a conscious choice for the user. # If you do want to specify resource limits, uncomment the following lines and adjust them as necessary. resources: @@ -95,6 +96,7 @@ policyhub: policyhubmigrations: image: "tractusx/policy-hub-migrations:0.1.0-rc.1" + imagePullPolicy: "IfNotPresent" # -- We recommend not to specify default resource limits and to leave this as a conscious choice for the user. # If you do want to specify resource limits, uncomment the following lines and adjust them as necessary. resources: diff --git a/consortia/environments/values-dev.yaml b/consortia/environments/values-dev.yaml index 860b213..f917634 100644 --- a/consortia/environments/values-dev.yaml +++ b/consortia/environments/values-dev.yaml @@ -48,10 +48,12 @@ keycloak: policyhub: image: "tractusx/policy-hub-service:dev" + imagePullPolicy: "Always" swaggerEnabled: true policyhubmigrations: image: "tractusx/policy-hub-migrations:dev" + imagePullPolicy: "Always" logging: default: "Debug" diff --git a/consortia/environments/values-rc.yaml b/consortia/environments/values-rc.yaml index d76032b..ce8398a 100644 --- a/consortia/environments/values-rc.yaml +++ b/consortia/environments/values-rc.yaml @@ -41,9 +41,13 @@ ingress: port: 8080 policyhub: + image: "tractusx/policy-hub-service:rc" + imagePullPolicy: "Always" swaggerEnabled: true policyhubmigrations: + image: "tractusx/policy-hub-migrations:rc" + imagePullPolicy: "Always" logging: default: "Debug" From 7b408deeea73d37e0119197a576e73c958120dc9 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Thu, 1 Feb 2024 19:58:10 +0100 Subject: [PATCH 5/7] chore: add registry to image --- charts/policy-hub/values.yaml | 4 ++-- consortia/environments/values-dev.yaml | 4 ++-- consortia/environments/values-rc.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/policy-hub/values.yaml b/charts/policy-hub/values.yaml index 6244866..d392aa1 100644 --- a/charts/policy-hub/values.yaml +++ b/charts/policy-hub/values.yaml @@ -73,7 +73,7 @@ healthChecks: path: "/ready" policyhub: - image: "tractusx/policy-hub-service:0.1.0-rc.1" + image: "docker.io/tractusx/policy-hub-service:0.1.0-rc.1" imagePullPolicy: "IfNotPresent" # -- We recommend not to specify default resource limits and to leave this as a conscious choice for the user. # If you do want to specify resource limits, uncomment the following lines and adjust them as necessary. @@ -95,7 +95,7 @@ policyhub: swaggerEnabled: false policyhubmigrations: - image: "tractusx/policy-hub-migrations:0.1.0-rc.1" + image: "docker.io/tractusx/policy-hub-migrations:0.1.0-rc.1" imagePullPolicy: "IfNotPresent" # -- We recommend not to specify default resource limits and to leave this as a conscious choice for the user. # If you do want to specify resource limits, uncomment the following lines and adjust them as necessary. diff --git a/consortia/environments/values-dev.yaml b/consortia/environments/values-dev.yaml index f917634..8981a74 100644 --- a/consortia/environments/values-dev.yaml +++ b/consortia/environments/values-dev.yaml @@ -47,12 +47,12 @@ keycloak: validAudience: "Cl23-CX-Policy-Hub" policyhub: - image: "tractusx/policy-hub-service:dev" + image: "docker.io/tractusx/policy-hub-service:dev" imagePullPolicy: "Always" swaggerEnabled: true policyhubmigrations: - image: "tractusx/policy-hub-migrations:dev" + image: "docker.io/tractusx/policy-hub-migrations:dev" imagePullPolicy: "Always" logging: default: "Debug" diff --git a/consortia/environments/values-rc.yaml b/consortia/environments/values-rc.yaml index ce8398a..e167976 100644 --- a/consortia/environments/values-rc.yaml +++ b/consortia/environments/values-rc.yaml @@ -41,12 +41,12 @@ ingress: port: 8080 policyhub: - image: "tractusx/policy-hub-service:rc" + image: "docker.io/tractusx/policy-hub-service:rc" imagePullPolicy: "Always" swaggerEnabled: true policyhubmigrations: - image: "tractusx/policy-hub-migrations:rc" + image: "docker.io/tractusx/policy-hub-migrations:rc" imagePullPolicy: "Always" logging: default: "Debug" From d234aff400eda23988ec5c40c9c93317a6087fab Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Thu, 1 Feb 2024 20:16:17 +0100 Subject: [PATCH 6/7] chore: fix broken links in docs --- .github/pull_request_template.md | 2 +- .../technical-documentation/architecture/Development Concept.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4c562a4..d24a08d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -14,7 +14,7 @@ Link to Github issue. Please delete options that are not relevant. -- [ ] I have followed the [contributing guidelines](https://github.com/eclipse-tractusx/policy-hub/blob/main/docs/developer/Technical-Documentation/Dev-Process/How-to-contribute.md#commit-and-pr-guidelines) +- [ ] I have followed the [contributing guidelines](https://github.com/eclipse-tractusx/policy-hub/blob/main/docs/technical-documentation/dev-process/How%20to%20contribute.md) - [ ] I have performed [IP checks](https://eclipse-tractusx.github.io/docs/release/trg-7/trg-7-04#checking-libraries-using-the-eclipse-dash-license-tool) for added or updated 3rd party libraries - [ ] I have created and linked IP issues or requested their creation by a committer - [ ] I have performed a self-review of my own code diff --git a/docs/technical-documentation/architecture/Development Concept.md b/docs/technical-documentation/architecture/Development Concept.md index e30eed4..d15bfb4 100644 --- a/docs/technical-documentation/architecture/Development Concept.md +++ b/docs/technical-documentation/architecture/Development Concept.md @@ -2,7 +2,7 @@ ## Build, test, deploy -Details to the build, test and deploy process can get found under the following md file: [Release Process](/docs/Release%20Process.md) +Details to the build, test and deploy process can get found under the following md file: [Release Process](/docs/technical-documentation/release-process/Release%20Process.md) ## Development Guidelines From a0381c2623be14af0ef6d04d5defd47d3c177a60 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Thu, 1 Feb 2024 20:17:07 +0100 Subject: [PATCH 7/7] build: bump chart version --- charts/policy-hub/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/policy-hub/Chart.yaml b/charts/policy-hub/Chart.yaml index 369ba26..cbd7da5 100644 --- a/charts/policy-hub/Chart.yaml +++ b/charts/policy-hub/Chart.yaml @@ -20,8 +20,8 @@ apiVersion: v2 name: policy-hub type: application -version: 0.1.0-rc.1 -appVersion: 0.1.0-rc.1 +version: 0.1.0-rc.2 +appVersion: 0.1.0-rc.2 description: Helm chart for Catena-X Policy Hub home: https://github.com/eclipse-tractusx/policy-hub dependencies: