Skip to content

Commit a06697e

Browse files
committed
Add variables used for CICD instead of modifying the source files
1 parent 5517149 commit a06697e

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.github/workflows/test-deployment.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
mv inventory/mycluster/openrc.sh.template inventory/mycluster/openrc.sh
8080
sed -i 's!<changeme_with_full_path>/miniforge3/envs/rspy!/usr/share/miniconda/envs/rspy!g' inventory/mycluster/hosts.yaml
8181
sed -i 's!https://s3.gra.io.cloud.ovh.net!http://minio.minio.svc.cluster.local:9000!' inventory/mycluster/host_vars/setup/main.yaml
82+
sed -i -e 's!cinder.csi.openstack.org!k8s.io/minikube-hostpath!g' -e 's!instances: 3!instances: 1!g' inventory/mycluster/host_vars/setup/apps.yml
8283
conda run -n rspy --no-capture-output env PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=1 ansible-playbook registry.yaml -i inventory/mycluster/hosts.yaml -e ci_mode=true
8384
conda run -n rspy --no-capture-output env PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=1 ansible-playbook generate_inventory.yaml -i inventory/mycluster/hosts.yaml
8485
shell: bash
@@ -89,8 +90,6 @@ jobs:
8990
- name: Deploy the apps (for real)
9091
run: |
9192
sed -i 's!debug: false!debug: true!g' roles/app-installer/defaults/main.yaml
92-
sed -i 's!cinder.csi.openstack.org!k8s.io/minikube-hostpath!g' apps/00-storage-class/sc-retain.yaml
93-
sed -i 's!instances: 3!instances: 1!g' apps/03-cloudnative-pg/cluster.yaml
9493
sed -i -e 's!https://iam.{{ platform_domain_name }}!http://keycloak-service.iam.svc.cluster.local:8080!g' -e 's!insecure_oidc_skip_issuer_verification="false"!insecure_oidc_skip_issuer_verification="true"!g' apps/oauth2-proxy/values.yaml
9594
9695
conda run -n rspy --no-capture-output env PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=1 ansible-playbook apps.yaml -i inventory/mycluster/hosts.yaml

apps/00-storage-class/sc-retain.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ parameters:
2323
availability: nova
2424
fsType: ext4
2525
type: high-speed
26-
provisioner: cinder.csi.openstack.org
26+
provisioner: "{{ cinder.provisioner }}"
2727
reclaimPolicy: Retain
2828
volumeBindingMode: Immediate

apps/03-cloudnative-pg/cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ metadata:
2020
app.kubernetes.io/instance: '{{ app_name }}'
2121
wait-for-deployment: Ready
2222
spec:
23-
instances: 3
23+
instances: {{ postgresql.instances }}
2424

2525
enableSuperuserAccess: true
2626

inventory/sample/host_vars/setup/apps.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ apikeymanager:
3636
password: "{{ lookup('password', '/dev/null length=30 chars=ascii_letters') }}"
3737
secret: apikeymanager-database-password
3838

39+
cinder:
40+
provisioner: cinder.csi.openstack.org
41+
3942
certmanager:
4043
clusterissuer:
4144
acme:
@@ -67,6 +70,7 @@ postgresql:
6770
replication_password: "{{ lookup('password', '/dev/null length=30 chars=ascii_letters') }}"
6871
replication_user: "{{ lookup('password', '/dev/null length=30 chars=ascii_letters') }}"
6972
bucket: "{{ cluster_name }}-psql"
73+
instances: 3
7074

7175
keycloak:
7276
image: quay.io/keycloak/keycloak:23.0.6

0 commit comments

Comments
 (0)