feat(helmfile): Remove environments and replace with generic one

This commit is contained in:
Dominik Kaminski
2023-07-24 20:13:20 +02:00
parent 841bfb62fe
commit ef7d75ff1f
4 changed files with 16 additions and 30 deletions

View File

@@ -1,6 +1,10 @@
# SPDX-FileCopyrightText: 2023 Bundesministerium des Innern und für Heimat, PG ZenDiS "Projektgruppe für Aufbau ZenDiS"
# SPDX-License-Identifier: Apache-2.0
---
include:
- project: "souvap/devops/sovereign-workplace-env"
file: "gitlab/environments.yaml"
stages:
- "env-cleanup"
- "env"
@@ -118,6 +122,7 @@ variables:
.deploy-common:
cache: {}
dependencies: []
extends: ".environments"
image: "registry.souvap-univention.de/souvap/tooling/images/helm:latest"
secrets:
SMTP_PASSWORD:
@@ -138,23 +143,8 @@ variables:
file: false
script:
- cd "${CI_PROJECT_DIR}/helmfile/apps/${COMPONENT}"
- |
# Match Cluster to helmfile environments
if [ "${CLUSTER}" = "develop" ]; then
export HELMFILE_ENVIRONMENT=uv-develop
elif [ "${CLUSTER}" = "prototype" ]; then
export HELMFILE_ENVIRONMENT=uv-develop
elif [ "${CLUSTER}" = "hubble" ]; then
export HELMFILE_ENVIRONMENT=default
elif [ "${CLUSTER}" = "dev" ]; then
export HELMFILE_ENVIRONMENT=ionos
elif [ "${CLUSTER}" = "qa" ]; then
export HELMFILE_ENVIRONMENT=ionos
else
echo "Unsupported cluster chosen: ${CLUSTER}"
exit 1
fi;
# MASTER_PASSWORD_WEB_VAR as precedence for MASTER_PASSWORD
- |
if ! [ -z "${MASTER_PASSWORD_WEB_VAR}" ]; then
export MASTER_PASSWORD="${MASTER_PASSWORD_WEB_VAR}"
fi;
@@ -164,6 +154,8 @@ variables:
- "docker"
- "kubernetes"
- "${CLUSTER}"
variables:
HELMFILE_ENVIRONMENT: "dev"
env-cleanup:
extends: ".deploy-common"

View File

@@ -5,12 +5,12 @@ environments:
default:
values:
- "../../environments/default/*.gotmpl"
ionos:
dev:
values:
- "../../environments/default/*.gotmpl"
- "../../environments/ionos/values.yaml"
uv-develop:
- "../../environments/dev/values.yaml"
prod:
values:
- "../../environments/default/*.gotmpl"
- "../../environments/uv-develop/values.yaml"
- "../../environments/prod/values.yaml"
...

View File

@@ -1,7 +1,6 @@
# SPDX-FileCopyrightText: 2023 Bundesministerium des Innern und für Heimat, PG ZenDiS "Projektgruppe für Aufbau ZenDiS"
# SPDX-License-Identifier: Apache-2.0
---
ingress:
ingressClassName: "nginx"
# This a sample file and could be filled with proper variable overload.
sample: true
...

View File

@@ -1,11 +1,6 @@
# SPDX-FileCopyrightText: 2023 Bundesministerium des Innern und für Heimat, PG ZenDiS "Projektgruppe für Aufbau ZenDiS"
# SPDX-License-Identifier: Apache-2.0
---
ingress:
ingressClassName: "dedicated-haproxy-external"
persistence:
storageClassNames:
RWX: "nfs-client"
RWO: "ionos-enterprise-ssd"
# This a sample file and could be filled with proper variable overload.
sample: true
...