Skip to content

Commit

Permalink
chore: add documentation for policy hub
Browse files Browse the repository at this point in the history
Refs: CPLP-3362
  • Loading branch information
Phil91 committed Nov 27, 2023
1 parent 7ee1e76 commit 77cac97
Show file tree
Hide file tree
Showing 55 changed files with 1,147 additions and 1,553 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ dotnet_diagnostic.RS2008.severity = none

# IDE0073: File header
dotnet_diagnostic.IDE0073.severity = warning
#file_header_template = /********************************************************************************\n * Copyright (c) 2021,2022 BMW Group AG\n * Copyright (c) 2021,2022 Contributors to the CatenaX (ng) GitHub Organisation.\n *\n * \nSee the NOTICE file(s) distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This program and the accompanying materials are made available under the\n * terms of the \nApache License, Version 2.0 which is available at\n * https://www.apache.org/licenses/LICENSE-2.0.\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License \nis distributed on an "AS IS" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations\n * under the \nLicense. *\n * SPDX-License-Identifier: Apache-2.0\n ********************************************************************************/\n
#file_header_template = /********************************************************************************\n * Copyright (c) 2021,2022 Contributors to the CatenaX (ng) GitHub Organisation.\n *\n * \nSee the NOTICE file(s) distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This program and the accompanying materials are made available under the\n * terms of the \nApache License, Version 2.0 which is available at\n * https://www.apache.org/licenses/LICENSE-2.0.\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License \nis distributed on an "AS IS" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations\n * under the \nLicense. *\n * SPDX-License-Identifier: Apache-2.0\n ********************************************************************************/\n

# IDE0035: Remove unreachable code
dotnet_diagnostic.IDE0035.severity = warning
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/policy-hub-migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
# paths:
# # service and transitive paths
# - 'src/database/PolicyHub.Migrations/**'
# - 'src/database/PolicyHub.PortalEntities/**'
# - 'src/database/PolicyHub.Entities/**'
# # workflow file
# - '.github/workflows/policy-hub-migrations.yml'
# # dockerfile
Expand Down
14 changes: 7 additions & 7 deletions charts/policyhub/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Helm chart for Catena-X Policy Hub

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)

This helm chart installs the Catena-X Policy Hub application v1.0.0.

For information on how to upgrade from previous versions please refer to [Version Upgrade](https://github.com/eclipse-tractusx/policy-hub/tree/v1.0.0/docs/developer/Technical%20Documentation/Version%20Upgrade/portal-upgrade-details.md).
For information on how to upgrade from previous versions please refer to [Version Upgrade](https://github.com/eclipse-tractusx/policy-hub/tree/v1.0.0/docs/developer/Technical%20Documentation/Version%20Upgrade/policy-hub-upgrade-details.md).

For further information please refer to [Technical Documentation](https://github.com/eclipse-tractusx/policy-hub/tree/v1.0.0/docs/developer/Technical%20Documentation).

Expand Down Expand Up @@ -65,13 +65,13 @@ dependencies:
| backend.keycloak.central.jwtBearerOptions.metadataPath | string | `"/auth/realms/CX-Central/.well-known/openid-configuration"` | |
| backend.keycloak.central.jwtBearerOptions.refreshInterval | string | `"00:00:30"` | |
| backend.keycloak.central.jwtBearerOptions.requireHttpsMetadata | string | `"true"` | |
| backend.keycloak.central.jwtBearerOptions.tokenValidationParameters.validAudience | string | `"Cl2-CX-Portal"` | |
| backend.keycloak.central.jwtBearerOptions.tokenValidationParameters.validAudience | string | `"ClXX-CX-Policy-Hub"` | |
| backend.keycloak.central.jwtBearerOptions.tokenValidationParameters.validIssuerPath | string | `"/auth/realms/CX-Central"` | |
| backend.keycloak.central.tokenPath | string | `"/auth/realms/CX-Central/protocol/openid-connect/token"` | |
| backend.keycloak.central.useAuthTrail | bool | `true` | Flag if the api should be used with an leading /auth path |
| backend.policyhub.image.name | string | `"tractusx/portal-hub-service"` | |
| backend.policyhub.image.name | string | `"tractusx/policy-hub-service"` | |
| backend.policyhub.image.policyhubservicetag | string | `"29dbdeb9a8b3e809fdab2406140a226bc55de844"` | |
| backend.policyhub.keycloakClientId | string | `"Cl2-CX-Portal"` | |
| backend.policyhub.keycloakClientId | string | `"ClXX-CX-Policy-Hub"` | |
| backend.policyhub.logging.businessLogic | string | `"Information"` | |
| backend.policyhub.logging.default | string | `"Information"` | |
| backend.policyhub.name | string | `"policy-hub-service"` | |
Expand All @@ -89,7 +89,7 @@ dependencies:
| externalDatabase.policyHubPassword | string | `""` | Password for the non-root username 'hub'. Secret-key 'policy-hub-password'. |
| externalDatabase.policyHubUser | string | `"hub"` | Non-root username for hub. |
| externalDatabase.port | int | `5432` | Database port number |
| externalDatabase.secret | string | `"secret-postgres-external-db"` | Secret containing the passwords non-root usernames portal and provisioning. |
| externalDatabase.secret | string | `"secret-postgres-external-db"` | Secret containing the passwords non-root username hub. |
| livenessProbe.failureThreshold | int | `3` | |
| livenessProbe.initialDelaySeconds | int | `10` | |
| livenessProbe.periodSeconds | int | `10` | |
Expand All @@ -103,7 +103,7 @@ dependencies:
| postgresql.audit.logLinePrefix | string | `"%m %u %d "` | |
| postgresql.audit.pgAuditLog | string | `"write, ddl"` | |
| postgresql.auth.database | string | `"postgres"` | Database name |
| postgresql.auth.existingSecret | string | `"secret-postgres-init"` | Secret containing the passwords for root usernames postgres and non-root usernames repl_user, portal and provisioning. |
| postgresql.auth.existingSecret | string | `"secret-postgres-init"` | Secret containing the passwords for root usernames postgres and non-root usernames repl_user and hub. |
| postgresql.auth.password | string | `""` | Password for the root username 'postgres'. Secret-key 'postgres-password'. |
| postgresql.auth.policyHubPassword | string | `""` | Password for the non-root username 'hub'. Secret-key 'policy-hub-password'. |
| postgresql.auth.policyHubUser | string | `"hub"` | Non-root username for hub. |
Expand Down
2 changes: 1 addition & 1 deletion charts/policyhub/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This helm chart installs the Catena-X Policy Hub application v1.0.0.

For information on how to upgrade from previous versions please refer to [Version Upgrade](https://github.com/eclipse-tractusx/policy-hub/tree/v1.0.0/docs/developer/Technical%20Documentation/Version%20Upgrade/portal-upgrade-details.md).
For information on how to upgrade from previous versions please refer to [Version Upgrade](https://github.com/eclipse-tractusx/policy-hub/tree/v1.0.0/docs/developer/Technical%20Documentation/Version%20Upgrade/policy-hub-upgrade-details.md).

For further information please refer to [Technical Documentation](https://github.com/eclipse-tractusx/policy-hub/tree/v1.0.0/docs/developer/Technical%20Documentation).

Expand Down
2 changes: 1 addition & 1 deletion charts/policyhub/templates/deployment-backend-hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
valueFrom:
secretKeyRef:
name: "{{ .Values.externalDatabase.secret }}"
key: "portal-password"
key: "policy-hub-password"
- name: "CONNECTIONSTRINGS__POLICYHUBDB"
value: "Server={{ .Values.externalDatabase.host }};Database={{ .Values.externalDatabase.database }};Port={{ .Values.externalDatabase.port }};User Id={{ .Values.externalDatabase.policyHubUser }};Password=$(POLICY_HUB_PASSWORD);Ssl Mode={{ .Values.backend.dbConnection.sslMode }};"
- name: "HEALTHCHECKS__0__PATH"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
valueFrom:
secretKeyRef:
name: "{{ .Values.postgresql.auth.existingSecret }}"
key: "portal-password"
key: "policy-hub-password"
- name: "CONNECTIONSTRINGS__POLICYHUBDB"
value: "Server={{ .Values.postgresql.fullnameOverride }}-primary;Database={{ .Values.postgresql.auth.database }};Port={{ .Values.postgresql.auth.port }};User Id={{ .Values.postgresql.auth.policyHubUser }};Password=$(POLICY_HUB_PASSWORD);Ssl Mode={{ .Values.backend.dbConnection.sslMode }};"
{{- end }}
Expand All @@ -58,7 +58,7 @@ spec:
valueFrom:
secretKeyRef:
name: "{{ .Values.externalDatabase.secret }}"
key: "portal-password"
key: "policy-hub-password"
- name: "CONNECTIONSTRINGS__POLICYHUBDB"
value: "Server={{ .Values.externalDatabase.host }};Database={{ .Values.externalDatabase.database }};Port={{ .Values.externalDatabase.port }};User Id={{ .Values.externalDatabase.policyHubUser }};Password=$(POLICY_HUB_PASSWORD);Ssl Mode={{ .Values.backend.dbConnection.sslMode }};"
{{- end }}
Expand Down
10 changes: 5 additions & 5 deletions charts/policyhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ backend:
metadataPath: "/auth/realms/CX-Central/.well-known/openid-configuration"
tokenValidationParameters:
validIssuerPath: "/auth/realms/CX-Central"
validAudience: "Cl2-CX-Portal"
validAudience: "ClXX-CX-Policy-Hub"
refreshInterval: "00:00:30"
tokenPath: "/auth/realms/CX-Central/protocol/openid-connect/token"
# -- Flag if the api should be used with an leading /auth path
Expand All @@ -77,7 +77,7 @@ backend:
policyhub:
name: "policy-hub-service"
image:
name: "tractusx/portal-hub-service"
name: "tractusx/policy-hub-service"
policyhubservicetag: 29dbdeb9a8b3e809fdab2406140a226bc55de844
# -- We recommend not to specify default resources and to leave this as a conscious choice for the user.
# If you do want to specify resources, uncomment the following lines,
Expand All @@ -92,7 +92,7 @@ backend:
logging:
businessLogic: "Information"
default: "Information"
keycloakClientId: "Cl2-CX-Portal"
keycloakClientId: "ClXX-CX-Policy-Hub"
policyhubmigrations:
name: "policy-hub-migrations"
image:
Expand Down Expand Up @@ -127,7 +127,7 @@ postgresql:
database: "postgres"
# -- Database port number
port: 5432
# -- Secret containing the passwords for root usernames postgres and non-root usernames repl_user, portal and provisioning.
# -- Secret containing the passwords for root usernames postgres and non-root usernames repl_user and hub.
existingSecret: "secret-postgres-init"
# -- Password for the root username 'postgres'. Secret-key 'postgres-password'.
password: ""
Expand Down Expand Up @@ -164,7 +164,7 @@ externalDatabase:
database: "postgres"
# -- Database port number
port: 5432
# -- Secret containing the passwords non-root usernames portal and provisioning.
# -- Secret containing the passwords non-root username hub.
secret: "secret-postgres-external-db"
# -- Non-root username for hub.
policyHubUser: "hub"
Expand Down
12 changes: 6 additions & 6 deletions consortia/argocd-app-templates/appsetup-beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: portal
name: policy-hub
spec:
destination:
namespace: product-portal
namespace: product-policy-hub
server: 'https://kubernetes.default.svc'
source:
path: charts/portal
repoURL: 'https://github.com/eclipse-tractusx/portal-cd.git'
targetRevision: portal-1.7.0-RC1
path: charts/policy-hub
repoURL: 'https://github.com/eclipse-tractusx/policy-hub.git'
targetRevision: policy-hub-1.0.0
plugin:
env:
- name: AVP_SECRET
value: vault-secret
- name: helm_args
value: '-f values.yaml -f ../../consortia/environments/values-beta.yaml'
project: project-portal
project: project-policy-hub
10 changes: 5 additions & 5 deletions consortia/argocd-app-templates/appsetup-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: portal-upgrade
name: policy-hub-upgrade
spec:
destination:
namespace: product-iam
namespace: policy-hub
server: 'https://kubernetes.default.svc'
source:
path: charts/portal
repoURL: 'https://github.com/eclipse-tractusx/portal-cd.git'
path: charts/policy-hub
repoURL: 'https://github.com/eclipse-tractusx/policy-hub-cd.git'
targetRevision: dev
plugin:
env:
- name: AVP_SECRET
value: vault-secret
- name: helm_args
value: '-f values.yaml -f ../../consortia/environments/values-dev.yaml'
project: project-portal
project: project-policy-hub
syncPolicy:
automated:
prune: true
12 changes: 6 additions & 6 deletions consortia/argocd-app-templates/appsetup-int.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: portal-upgrade
name: policy-hub-upgrade
spec:
destination:
namespace: product-portal
namespace: product-policy-hub
server: 'https://kubernetes.default.svc'
source:
path: charts/portal
repoURL: 'https://github.com/eclipse-tractusx/portal-cd.git'
targetRevision: portal-1.7.0-RC1
path: charts/policy-hub
repoURL: 'https://github.com/eclipse-tractusx/policy-hub.git'
targetRevision: policy-hub-1.0.0
plugin:
env:
- name: AVP_SECRET
value: vault-secret
- name: helm_args
value: '-f values.yaml -f ../../consortia/environments/values-int.yaml'
project: project-portal
project: project-policy-hub
12 changes: 6 additions & 6 deletions consortia/argocd-app-templates/appsetup-pen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: portal-pen
name: policy-hub-pen
spec:
destination:
namespace: product-portal-pen
namespace: product-policy-hub-pen
server: 'https://kubernetes.default.svc'
source:
path: charts/portal
repoURL: 'https://github.com/eclipse-tractusx/portal-cd.git'
targetRevision: portal-1.7.0-RC1
path: charts/policy-hub
repoURL: 'https://github.com/eclipse-tractusx/policy-hub.git'
targetRevision: policy-hub-1.0.0
plugin:
env:
- name: AVP_SECRET
value: vault-secret
- name: helm_args
value: '-f values.yaml -f ../../consortia/environments/values-pen.yaml'
project: project-portal
project: project-policy-hub
8 changes: 4 additions & 4 deletions consortia/argocd-app-templates/appsetup-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: portal-rc
name: policy-hub-rc
spec:
destination:
namespace: product-iam
server: 'https://kubernetes.default.svc'
source:
path: charts/portal
repoURL: 'https://github.com/eclipse-tractusx/portal-cd.git'
path: charts/policy-hub
repoURL: 'https://github.com/eclipse-tractusx/policy-hub.git'
targetRevision: release-candidate
plugin:
env:
- name: AVP_SECRET
value: vault-secret
- name: helm_args
value: '-f values.yaml -f ../../consortia/environments/values-rc.yaml'
project: project-portal
project: project-policy-hub
Loading

0 comments on commit 77cac97

Please sign in to comment.