Skip to content

Commit

Permalink
fix(charts): error on disabling subcharts
Browse files Browse the repository at this point in the history
- subcharts are now referenced with fullnameOverride
  • Loading branch information
nicoprow committed Oct 18, 2024
1 parent 2a4622c commit 4f3dda4
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 55 deletions.
14 changes: 7 additions & 7 deletions charts/bpdm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ apiVersion: v2
name: bpdm
type: application
description: A Helm chart for Kubernetes that deploys the BPDM applications
version: 5.2.0-rc2
appVersion: "6.2.0-rc2"
version: 5.2.0-rc3
appVersion: "6.2.0-rc3"
home: https://github.com/eclipse-tractusx/bpdm
sources:
- https://github.com/eclipse-tractusx/bpdm
Expand All @@ -33,23 +33,23 @@ maintainers:

dependencies:
- name: bpdm-gate
version: 6.2.0-rc2
version: 6.2.0-rc3
alias: bpdm-gate
condition: bpdm-gate.enabled
- name: bpdm-pool
version: 7.2.0-rc2
version: 7.2.0-rc3
alias: bpdm-pool
condition: bpdm-pool.enabled
- name: bpdm-cleaning-service-dummy
version: 3.2.0-rc2
version: 3.2.0-rc3
alias: bpdm-cleaning-service-dummy
condition: bpdm-cleaning-service-dummy.enabled
- name: bpdm-orchestrator
version: 3.2.0-rc2
version: 3.2.0-rc3
alias: bpdm-orchestrator
condition: bpdm-orchestrator.enabled
- name: bpdm-common
version: 1.0.1
version: 1.0.2
- name: postgresql
version: 12.12.10
repository: https://charts.bitnami.com/bitnami
Expand Down
6 changes: 3 additions & 3 deletions charts/bpdm/charts/bpdm-cleaning-service-dummy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
apiVersion: v2
type: application
name: bpdm-cleaning-service-dummy
appVersion: "6.2.0-rc2"
version: 3.2.0-rc2
appVersion: "6.2.0-rc3"
version: 3.2.0-rc3
description: A Helm chart for deploying the BPDM cleaning service
home: https://eclipse-tractusx.github.io/docs/kits/Business%20Partner%20Kit/Adoption%20View
sources:
- https://github.com/eclipse-tractusx/bpdm
dependencies:
- name: bpdm-common
version: 1.0.1
version: 1.0.2
repository: "file://../bpdm-common"
- name: centralidp
version: 3.0.1
Expand Down
2 changes: 1 addition & 1 deletion charts/bpdm/charts/bpdm-common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
apiVersion: v2
type: library
name: bpdm-common
version: 1.0.1
version: 1.0.2
description: A library Helm Chart for other BPDM Charts
home: https://eclipse-tractusx.github.io/docs/kits/Business%20Partner%20Kit/Adoption%20View
sources:
Expand Down
28 changes: 7 additions & 21 deletions charts/bpdm/charts/bpdm-common/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,35 +89,21 @@ Create name of application secret
Determine postgres service/host name to connect to
*/}}
{{- define "bpdm.postgresDependency" -}}
{{- include "includeWithPostgresContext" (list $ "postgresql.v1.primary.fullname") }}
{{- if .Subcharts.postgres }}
.Values.postgres.nameOverride
{{- include "postgresql.v1.primary.fullname" .Subcharts.postgres }}
{{- end}}
{{- end }}}

{{/*
Invoke include on given definition with postgresql dependency context
Usage: include "includeWithPostgresContext" (list $ "your_include_function_here")
*/}}
{{- define "includeWithPostgresContext" -}}
{{- $ := index . 0 }}
{{- $function := index . 1 }}
{{- include $function (dict "Values" $.Values.postgres "Chart" (dict "Name" "postgres") "Release" $.Release "global" $.global) }}
{{- end }}

{/*
Determine centralidp service/host name to connect to
*/}}
{{- define "bpdm.centralidpDependency" -}}
{{- include "includeWithCentralidpContext" (list $ "centralidp.fullname") }}
{{- if .Subcharts.centralidp }}
{{- include "centralidp.fullname" .Subcharts.centralidp }}
{{- end}}
{{- end }}}

{{/*
Invoke include on given definition with centralidp dependency context
Usage: include "includeWithCentralidpContext" (list $ "your_include_function_here")
*/}}
{{- define "includeWithCentralidpContext" -}}
{{- $ := index . 0 }}
{{- $function := index . 1 }}
{{- include $function (dict "Values" $.Values.centralidp "Chart" (dict "Name" "centralidp") "Release" $.Release "global" $.global) }}
{{- end }}

{{- /*
Merges three templates one after another in the following order:
Expand Down
6 changes: 3 additions & 3 deletions charts/bpdm/charts/bpdm-gate/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
apiVersion: v2
type: application
name: bpdm-gate
appVersion: "6.2.0-rc2"
version: 6.2.0-rc2
appVersion: "6.2.0-rc3"
version: 6.2.0-rc3
description: A Helm chart for deploying the BPDM gate service
home: https://eclipse-tractusx.github.io/docs/kits/Business%20Partner%20Kit/Adoption%20View
sources:
Expand All @@ -34,7 +34,7 @@ dependencies:
alias: postgres
condition: postgres.enabled
- name: bpdm-common
version: 1.0.1
version: 1.0.2
repository: "file://../bpdm-common"
- name: centralidp
version: 3.0.1
Expand Down
6 changes: 3 additions & 3 deletions charts/bpdm/charts/bpdm-orchestrator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
apiVersion: v2
type: application
name: bpdm-orchestrator
appVersion: "6.2.0-rc2"
version: 3.2.0-rc2
appVersion: "6.2.0-rc3"
version: 3.2.0-rc3
description: A Helm chart for deploying the BPDM Orchestrator service
home: https://eclipse-tractusx.github.io/docs/kits/Business%20Partner%20Kit/Adoption%20View
sources:
- https://github.com/eclipse-tractusx/bpdm
dependencies:
- name: bpdm-common
version: 1.0.1
version: 1.0.2
repository: "file://../bpdm-common"
- name: postgresql
version: 12.12.10
Expand Down
6 changes: 3 additions & 3 deletions charts/bpdm/charts/bpdm-pool/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
apiVersion: v2
type: application
name: bpdm-pool
appVersion: "6.2.0-rc2"
version: 7.2.0-rc2
appVersion: "6.2.0-rc3"
version: 7.2.0-rc3
description: A Helm chart for deploying the BPDM pool service
home: https://eclipse-tractusx.github.io/docs/kits/Business%20Partner%20Kit/Adoption%20View
sources:
Expand All @@ -34,7 +34,7 @@ dependencies:
alias: postgres
condition: postgres.enabled
- name: bpdm-common
version: 1.0.1
version: 1.0.2
repository: "file://../bpdm-common"
- name: centralidp
version: 3.0.1
Expand Down
2 changes: 1 addition & 1 deletion charts/bpdm/charts/bpdm-pool/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ applicationSecrets:
password: &postgresPass bpdm

postgres:
enabled: true
enabled: false
auth:
database: bpdm
username: bpdm
Expand Down
37 changes: 25 additions & 12 deletions charts/bpdm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,53 @@

bpdm-gate:
enabled: true
applicationConfig:
bpdm:
datasource:
host: bpdm-postgres
security:
auth-server-url: "http://bpdm-centralidp/auth"
postgres:
enabled: false
fullnameOverride: bpdm-postgres
centralidp:
enabled: false
keycloak:
nameOverride: bpdm-centralidp

bpdm-pool:
enabled: true
applicationConfig:
bpdm:
datasource:
host: bpdm-postgres
security:
auth-server-url: "http://bpdm-centralidp/auth"
postgres:
enabled: false
fullnameOverride: bpdm-postgres
centralidp:
enabled: false
keycloak:
nameOverride: bpdm-centralidp

bpdm-cleaning-service-dummy:
enabled: true
applicationConfig:
bpdm:
client:
orchestrator:
provider:
issuer-uri: "http://bpdm-centralidp/auth/realms/CX-Central"
centralidp:
enabled: false
keycloak:
nameOverride: bpdm-centralidp

bpdm-orchestrator:
enabled: true
applicationConfig:
bpdm:
datasource:
host: bpdm-postgres
security:
auth-server-url: "http://bpdm-centralidp/auth"
postgres:
enabled: false
fullnameOverride: bpdm-postgres
centralidp:
enabled: false
keycloak:
nameOverride: bpdm-centralidp

postgres:
enabled: true
Expand All @@ -67,7 +80,7 @@ postgres:
centralidp:
enabled: true
keycloak:
nameOverride: bpdm-centralidp
fullnameOverride: bpdm-centralidp
initContainers:
- name: import
image: docker.io/tractusx/portal-iam:3018805f77913926061af13bb5b35cbb98835c6e
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</modules>

<properties>
<revision>6.2.0-rc2</revision>
<revision>6.2.0-rc3</revision>
<java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
Expand Down

0 comments on commit 4f3dda4

Please sign in to comment.