-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
release(localdev): : merge in main
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,10 +60,12 @@ jobs: | |
run: | | ||
cd charts/localdev | ||
helm repo add tractusx-dev https://eclipse-tractusx.github.io/charts/dev | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo add pgadmin4 https://helm.runix.net | ||
helm dependency update | ||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
Check warning on line 68 in .github/workflows/chart-release.yaml GitHub Actions / Analyze[MEDIUM] Unpinned Actions Full Length Commit SHA
Check warning on line 68 in .github/workflows/chart-release.yaml GitHub Actions / Analyze[MEDIUM] Unpinned Actions Full Length Commit SHA
Check warning on line 68 in .github/workflows/chart-release.yaml GitHub Actions / Analyze[MEDIUM] Unpinned Actions Full Length Commit SHA
Check warning on line 68 in .github/workflows/chart-release.yaml GitHub Actions / Analyze[MEDIUM] Unpinned Actions Full Length Commit SHA
|
||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
CR_SKIP_EXISTING: "true" |
Large diffs are not rendered by default.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{{- /* | ||
* Copyright (c) 2021, 2023 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 | ||
*/}} | ||
|
||
{{- if .Values.postgresportal.enabled -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Values.postgresportal.primary.initdb.scriptsConfigMap }} | ||
namespace: {{ .Release.Namespace }} | ||
data: | ||
01-init-db-user.sh: | | ||
postgresql_create_portal_user() { | ||
local -r escaped_password="${PORTAL_PASSWORD//\'/\'\'}" | ||
info "Creating user portal" | ||
export PGPASSWORD="$POSTGRES_PASSWORD" | ||
echo "CREATE USER portal WITH PASSWORD '${escaped_password}';" | psql -U postgres | ||
} | ||
postgresql_create_portal_user | ||
postgresql_create_provisioning_user() { | ||
local -r escaped_password="${PROVISIONING_PASSWORD//\'/\'\'}" | ||
info "Creating user provisioning" | ||
export PGPASSWORD="$POSTGRES_PASSWORD" | ||
echo "CREATE USER provisioning WITH PASSWORD '${escaped_password}';" | psql -U postgres | ||
} | ||
postgresql_create_provisioning_user | ||
02-init-db.sql: | | ||
CREATE SCHEMA portal; | ||
ALTER SCHEMA portal OWNER TO portal; | ||
CREATE SCHEMA provisioning; | ||
ALTER SCHEMA provisioning OWNER TO provisioning; | ||
CREATE TABLE public.__efmigrations_history_portal ( | ||
migration_id character varying(150) NOT NULL, | ||
product_version character varying(32) NOT NULL | ||
); | ||
ALTER TABLE public.__efmigrations_history_portal OWNER TO portal; | ||
CREATE TABLE public.__efmigrations_history_provisioning ( | ||
migration_id character varying(150) NOT NULL, | ||
product_version character varying(32) NOT NULL | ||
); | ||
ALTER TABLE public.__efmigrations_history_provisioning OWNER TO provisioning; | ||
{{- end -}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{{- /* | ||
* Copyright (c) 2021, 2023 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 | ||
*/}} | ||
|
||
{{- if .Values.postgresportal.enabled -}} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ .Values.postgresportal.auth.existingSecret }} | ||
namespace: {{ .Release.Namespace }} | ||
type: Opaque | ||
# use lookup function to check if secret exists | ||
{{- $secret := (lookup "v1" "Secret" .Release.Namespace .Values.postgresportal.auth.existingSecret) }} | ||
{{ if $secret -}} | ||
data: | ||
# if secret exists, use value provided from values file (to cover update scenario) or existing value from secret | ||
# use data map instead of stringData to prevent base64 encoding of already base64-encoded existing value from secret | ||
# use index function for secret keys with hyphen otherwise '$secret.data.secretKey' works too | ||
postgres-password: {{ ( .Values.postgresportal.auth.password | b64enc ) | default ( index $secret.data "postgres-password" ) | quote }} | ||
replication-password: {{ ( .Values.postgresportal.auth.replicationPassword | b64enc ) | default ( index $secret.data "replication-password" ) | quote }} | ||
portal-password: {{ ( .Values.postgresportal.auth.portalPassword | b64enc ) | default ( index $secret.data "portal-password" ) | quote }} | ||
provisioning-password: {{ ( .Values.postgresportal.auth.provisioningPassword | b64enc ) | default ( index $secret.data "provisioning-password" ) | quote }} | ||
{{ else -}} | ||
stringData: | ||
# if secret doesn't exist, use provided value from values file or generate a random one | ||
postgres-password: {{ .Values.postgresportal.auth.password | default ( randAlphaNum 32 ) | quote }} | ||
replication-password: {{ .Values.postgresportal.auth.replicationPassword | default ( randAlphaNum 32 ) | quote }} | ||
portal-password: {{ .Values.postgresportal.auth.portalPassword | default ( randAlphaNum 32 ) | quote }} | ||
provisioning-password: {{ .Values.postgresportal.auth.provisioningPassword | default ( randAlphaNum 32 ) | quote }} | ||
{{ end }} | ||
{{- end -}} |