From 52281f2ceb536d2518b0996e8f1f7b4d732dae25 Mon Sep 17 00:00:00 2001 From: rohit-smartsensesolutions Date: Thu, 29 Aug 2024 10:35:24 +0530 Subject: [PATCH] docs: code changes --- charts/deployChart.yaml | 0 charts/managed-identity-wallet/Chart.yaml | 10 ++- .../templates/NOTES.txt | 1 + .../templates/vcrs-ingress.yaml | 1 - .../tests/custom-values/deployment_test.yaml | 4 +- .../tests/custom-values/ingress_test.yaml | 4 +- .../tests/custom-values/secret_test.yaml | 6 +- .../tests/default/deployment_test.yaml | 10 +-- .../tests/default/ingress_test.yaml | 2 +- .../tests/default/service_test.yaml | 4 +- charts/managed-identity-wallet/values.yaml | 66 +++++++------------ 11 files changed, 41 insertions(+), 67 deletions(-) create mode 100644 charts/deployChart.yaml diff --git a/charts/deployChart.yaml b/charts/deployChart.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/charts/managed-identity-wallet/Chart.yaml b/charts/managed-identity-wallet/Chart.yaml index 809b7a64b..b21055dcd 100644 --- a/charts/managed-identity-wallet/Chart.yaml +++ b/charts/managed-identity-wallet/Chart.yaml @@ -22,20 +22,28 @@ name: managed-identity-wallet description: | Managed Identity Wallet is supposed to supply a secure data source and data sink for Digital Identity Documents (DID), in order to enable Self-Sovereign Identity founding on those DIDs. And at the same it shall support an uninterrupted tracking and tracing and documenting the usage of those DIDs, e.g. within logistical supply chains. + type: application version: 1.0.0-develop.4 appVersion: 1.0.0-develop.4 +home: https://github.com/eclipse-tractusx/managed-identity-wallet keywords: - Managed Identity Wallet - eclipse-tractusx + sources: - https://github.com/eclipse-tractusx/managed-identity-wallet + maintainers: - name: Dominik Pinsel email: dominik.pinsel@mercedes-benz.com url: https://github.com/DominikPinsel + - name: Rohit Solanki + email: rohit.solanki@smartsensesolutions.com + url: https://github.com/rohit-smartsensesolutions + dependencies: - name: keycloak version: 15.1.6 @@ -51,7 +59,7 @@ dependencies: repository: https://charts.bitnami.com/bitnami condition: postgresql.enabled - name: pgadmin4 - repository: file://charts/pgadmin4 # https://helm.runix.net + repository: file://charts/pgadmin4 # https://helm.runix.net # License: https://github.com/rowanruseler/helm-charts/blob/main/LICENSE version: 1.19.0 condition: pgadmin4.enabled diff --git a/charts/managed-identity-wallet/templates/NOTES.txt b/charts/managed-identity-wallet/templates/NOTES.txt index 2c3e36f93..320fef157 100644 --- a/charts/managed-identity-wallet/templates/NOTES.txt +++ b/charts/managed-identity-wallet/templates/NOTES.txt @@ -3,6 +3,7 @@ {{- range $host := .Values.ingress.hosts }} {{- range .paths }} http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + http{{ if $.Values.vcrs.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} {{- end }} {{- end }} {{- else if contains "NodePort" .Values.service.type }} diff --git a/charts/managed-identity-wallet/templates/vcrs-ingress.yaml b/charts/managed-identity-wallet/templates/vcrs-ingress.yaml index 22e490252..b97a5eac2 100644 --- a/charts/managed-identity-wallet/templates/vcrs-ingress.yaml +++ b/charts/managed-identity-wallet/templates/vcrs-ingress.yaml @@ -17,7 +17,6 @@ # SPDX-License-Identifier: Apache-2.0 ############################################################### - {{ if .Values.vcrs.ingress.enabled -}} {{- $fullName := include "verifiable-credential-revocation-service.fullname" . -}} {{- $svcPort := .Values.service.port -}} diff --git a/charts/managed-identity-wallet/tests/custom-values/deployment_test.yaml b/charts/managed-identity-wallet/tests/custom-values/deployment_test.yaml index e7436abc0..1da5d8bcf 100644 --- a/charts/managed-identity-wallet/tests/custom-values/deployment_test.yaml +++ b/charts/managed-identity-wallet/tests/custom-values/deployment_test.yaml @@ -22,7 +22,7 @@ chart: version: 9.9.9+test appVersion: 9.9.9 templates: - - templates/deployment.yaml + - templates/miw-deployment.yaml tests: - it: should have latest image tag values: @@ -31,7 +31,6 @@ tests: - matchRegex: path: spec.template.spec.containers[0].image pattern: .:latest - - it: should have environment variables set (envs and secrets set) values: - values.yml @@ -93,4 +92,3 @@ tests: secretKeyRef: key: encryption-key name: RELEASE-NAME-managed-identity-wallet - diff --git a/charts/managed-identity-wallet/tests/custom-values/ingress_test.yaml b/charts/managed-identity-wallet/tests/custom-values/ingress_test.yaml index ba240c6f4..4513df955 100644 --- a/charts/managed-identity-wallet/tests/custom-values/ingress_test.yaml +++ b/charts/managed-identity-wallet/tests/custom-values/ingress_test.yaml @@ -22,7 +22,7 @@ chart: version: 9.9.9+test appVersion: 9.9.9 templates: - - templates/ingress.yaml + - templates/miw-ingress.yaml values: - values.yml tests: @@ -42,7 +42,6 @@ tests: app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/version: "9.9.9" app.kubernetes.io/managed-by: Helm - - it: must have rules set asserts: - isNotEmpty: @@ -57,7 +56,6 @@ tests: count: 1 - isNotEmpty: path: spec.rules[0].http.paths[0].path - - it: must have tls set asserts: - isNotEmpty: diff --git a/charts/managed-identity-wallet/tests/custom-values/secret_test.yaml b/charts/managed-identity-wallet/tests/custom-values/secret_test.yaml index 4ca3a80b8..671f82f1c 100644 --- a/charts/managed-identity-wallet/tests/custom-values/secret_test.yaml +++ b/charts/managed-identity-wallet/tests/custom-values/secret_test.yaml @@ -22,7 +22,7 @@ chart: version: 9.9.9+test appVersion: 9.9.9 templates: - - templates/secret.yaml + - templates/miw-secret.yaml values: - values.yml tests: @@ -38,20 +38,16 @@ tests: app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/version: "9.9.9" app.kubernetes.io/managed-by: Helm - - it: must have type set to Opaque asserts: - equal: path: type value: Opaque - - it: must have data set asserts: - isNotEmpty: path: data - - it: must have values in data asserts: - exists: path: data.encryption-key - diff --git a/charts/managed-identity-wallet/tests/default/deployment_test.yaml b/charts/managed-identity-wallet/tests/default/deployment_test.yaml index cdc11c2e6..f1dc0f096 100644 --- a/charts/managed-identity-wallet/tests/default/deployment_test.yaml +++ b/charts/managed-identity-wallet/tests/default/deployment_test.yaml @@ -22,7 +22,7 @@ chart: version: 9.9.9+test appVersion: 9.9.9 templates: - - templates/deployment.yaml + - templates/miw-deployment.yaml tests: - it: should have correct metadata asserts: @@ -40,7 +40,6 @@ tests: app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/version: "9.9.9" app.kubernetes.io/managed-by: Helm - - it: should have important values set asserts: - equal: @@ -57,14 +56,12 @@ tests: name: http containerPort: 8080 protocol: TCP - - it: should have probes set asserts: - isNotEmpty: path: spec.template.spec.containers[0].livenessProbe - isNotEmpty: path: spec.template.spec.containers[0].readinessProbe - - it: should have resource limits set asserts: - isNotEmpty: @@ -81,7 +78,6 @@ tests: path: spec.template.spec.containers[0].resources.requests.cpu - isNotEmpty: path: spec.template.spec.containers[0].resources.requests.memory - - it: should have a security context asserts: - isSubset: @@ -92,7 +88,6 @@ tests: runAsGroup: 11111 runAsNonRoot: true runAsUser: 11111 - - it: should have environment variables set asserts: - isNotEmpty: @@ -147,14 +142,12 @@ tests: value: "8080" - name: VC_EXPIRY_DATE value: 31-12-2024 - - it: should have empty values asserts: - notExists: path: spec.template.spec.affinity - notExists: path: spec.template.spec.tolerations - - it: should have nodeSelector value set asserts: - exists: @@ -163,7 +156,6 @@ tests: path: spec.template.spec.nodeSelector content: "kubernetes.io/os": linux - - it: should not have "imagePullSecrets" set asserts: - notExists: diff --git a/charts/managed-identity-wallet/tests/default/ingress_test.yaml b/charts/managed-identity-wallet/tests/default/ingress_test.yaml index 8217e084c..ceb5fac07 100644 --- a/charts/managed-identity-wallet/tests/default/ingress_test.yaml +++ b/charts/managed-identity-wallet/tests/default/ingress_test.yaml @@ -22,7 +22,7 @@ chart: version: 9.9.9+test appVersion: 9.9.9 templates: - - templates/ingress.yaml + - templates/miw-ingress.yaml tests: - it: should not be available asserts: diff --git a/charts/managed-identity-wallet/tests/default/service_test.yaml b/charts/managed-identity-wallet/tests/default/service_test.yaml index a42879748..ba21c8983 100644 --- a/charts/managed-identity-wallet/tests/default/service_test.yaml +++ b/charts/managed-identity-wallet/tests/default/service_test.yaml @@ -22,7 +22,7 @@ chart: version: 9.9.9+test appVersion: 9.9.9 templates: - - templates/service.yaml + - templates/miw-service.yaml tests: - it: should have correct metadata asserts: @@ -40,13 +40,11 @@ tests: app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/version: "9.9.9" app.kubernetes.io/managed-by: Helm - - it: should have type set to ClusterIP asserts: - equal: path: spec.type value: ClusterIP - - it: should have ports set asserts: - contains: diff --git a/charts/managed-identity-wallet/values.yaml b/charts/managed-identity-wallet/values.yaml index c2530500f..806f704c8 100644 --- a/charts/managed-identity-wallet/values.yaml +++ b/charts/managed-identity-wallet/values.yaml @@ -32,7 +32,6 @@ image: pullPolicy: Always # -- Image tag (empty one will use "appVersion" value from chart definition) tag: "" -imagePullSecrets: [] # -- Parameters for the application (will be stored as secrets - so, for passwords, ...) secrets: {} # -- envs Parameters for the application (will be provided as environment variables) @@ -50,21 +49,23 @@ service: # -- Kubernetes Service port port: 8080 # -- Ingress Configuration + ingress: - enabled: true - className: "nginx" - annotations: - kubernetes.io/ingress.class: "nginx" - kubernetes.io/tls-acme: "true" - hosts: - - host: miw.example.org - paths: - - path: / - pathType: Prefix - tls: - - secretName: chart-example-tls - hosts: - - miw.example.org + # -- Enable ingress controller resource + enabled: false + # -- Ingress annotations + annotations: {} + # -- Ingress accepted hostnames + hosts: [] + # - host: chart-example.local + # paths: + # - path: / + # pathType: Prefix + # -- Ingress TLS configuration + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local # -- Pod security configurations podSecurityContext: {} # -- Pod security parameters @@ -142,13 +143,13 @@ miw: # -- Database port port: 5432 # -- Database host - host: "managed-identity-wallet-postgresql" + host: "{{ .Release.Name }}-postgresql" # -- Database user user: "miw" # -- Database name name: "miw_app" # -- Existing secret name for the database password - secret: "managed-identity-wallet-postgresql" + secret: "{{ .Release.Name }}-postgresql" # -- Existing secret key for the database password secretPasswordKey: "password" # -- Password encryption configuratons @@ -192,45 +193,32 @@ miw: successThreshold: 1 # -- Number of seconds after which the probe times out. timeoutSeconds: 5 - # For more information on how to configure the Keycloak chart see https://github.com/bitnami/charts/tree/main/bitnami/keycloak. # ----------------------------------------------- KEYCLOAK ----------------------------------------------- # +# For more information on how to configure the Keycloak chart see https://github.com/bitnami/charts/tree/main/bitnami/keycloak. keycloak: # -- Enable to deploy Keycloak enabled: true # -- Extra environment variables extraEnvVars: [] - # - name: KEYCLOAK_HOSTNAME - # value: "keycloak" + # - name: KEYCLOAK_HOSTNAME + # value: "{{ .Release.Name }}-keycloak" postgresql: # -- Name of the PostgreSQL chart to deploy. Mandatory when the MIW deploys a PostgreSQL chart, too. nameOverride: "keycloak-postgresql" # -- Enable to deploy PostgreSQL enabled: true auth: - # -- Postgresql admin user password + # -- Keycloak PostgreSQL user username: "miw_keycloak" # -- KeycloakPostgresql password to set (if empty one is generated) - password: "adminpass" + password: "" # -- Database name database: "miw_keycloak" - volumePermissions: - enabled: true ingress: - # -- Enable ingress controller resource enabled: false - # -- Ingress annotations annotations: {} - # -- Ingress accepted hostnames hosts: [] - # - host: chart-example.local - # paths: - # - path: / - # pathType: Prefix - # -- Ingress TLS configuration tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local auth: # -- Keycloak admin user adminUser: "admin" @@ -248,10 +236,6 @@ keycloak: postgresql: # -- Enable to deploy Postgresql enabled: true - image: - tag: "16-debian-12" - # -- Debug logs - debug: true auth: # -- Enable postgresql admin user enablePostgresUser: true @@ -375,7 +359,7 @@ vcrs: # -- The application profile APPLICATION_PROFILE: local # -- The Database Host - DATABASE_HOST: managed-identity-wallet-postgresql + DATABASE_HOST: "{{ .Release.Name }}-postgresql" # -- The Database Port DATABASE_PORT: 5432 # -- The Database Name @@ -450,7 +434,7 @@ vcrs: timeoutSeconds: 15 # -- ingress configuration ingress: - enabled: true + enabled: false className: "nginx" annotations: kubernetes.io/ingress.class: "nginx"