From 10ee5647c5c29963613db263dbc5e77eb738909d Mon Sep 17 00:00:00 2001 From: Benjamin Bordes Date: Thu, 15 Jan 2026 17:45:58 +0100 Subject: [PATCH] feat: :sparkles: make socle repository url and revision configurable Configuration for the socle Git repository used by Ansible jobs for post-installation tasks. Especially useful in air-gapped environments and during development. --- README.md | 3 ++- .../templates/awx/values/200-ansible-job.j2 | 2 +- .../templates/gitlab/values/200-ansible-job.j2 | 4 ++-- .../templates/global/values/200-ansible-job.j2 | 2 +- .../templates/harbor/values/200-ansible-job.j2 | 2 +- .../templates/keycloak/values/200-ansible-job.j2 | 2 +- .../templates/sonarqube/values/200-ansible-job.j2 | 2 +- .../templates/vault/values/200-ansible-job.j2 | 2 +- roles/socle-config/templates/crd-conf-dso.yaml | 14 ++++++++++++-- 9 files changed, 22 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 18f1bc1de..cfa87114e 100644 --- a/README.md +++ b/README.md @@ -1719,13 +1719,14 @@ kubectl explain dsc.spec.global.backup.cnpg ## Offline / air gap En mode air gap ou déconnecté d'internet, certaines valeurs de la `dsc` devront être adaptées. -- `dsc.sonarqube:` +- `dsc.sonarqube` : - `pluginDownloadUrl` et `prometheusJavaagentVersion` - `dsc.gitlabCatalog.catalogRepoUrl` - `dsc.argocd.privateGitlabDomain` - `dsc.grafanaOperator.ociChartUrl` - `helmRepoUrl` pour chaque service à savoir : - `argocd`, `certmanager`, `cloudnativepg`, `console`, `glexporter`, `gitlabOperator`, `gitlabrunner`, `harbor`, `keycloak`, `kyverno`, `sonarqube` et `vault` +- `dsc.awx.repoSocle.url` (et optionnellement : `dsc.awx.repoSocle.revision`) ## Platform diff --git a/roles/gitops/rendering-apps-files/templates/awx/values/200-ansible-job.j2 b/roles/gitops/rendering-apps-files/templates/awx/values/200-ansible-job.j2 index ec032ccae..a53b7c5e0 100644 --- a/roles/gitops/rendering-apps-files/templates/awx/values/200-ansible-job.j2 +++ b/roles/gitops/rendering-apps-files/templates/awx/values/200-ansible-job.j2 @@ -7,7 +7,7 @@ cpn-ansible-job: - /bin/sh - -c - | - git clone https://github.com/cloud-pi-native/socle.git && \ + git clone {{ dsc.awx.repoSocle.url }} -b {{ dsc.awx.repoSocle.revision }} socle && \ cd socle && \ ansible-playbook post-install/awx-oidc.yaml {% if dsc.proxy.enabled %} diff --git a/roles/gitops/rendering-apps-files/templates/gitlab/values/200-ansible-job.j2 b/roles/gitops/rendering-apps-files/templates/gitlab/values/200-ansible-job.j2 index 4707a057e..6583b605b 100644 --- a/roles/gitops/rendering-apps-files/templates/gitlab/values/200-ansible-job.j2 +++ b/roles/gitops/rendering-apps-files/templates/gitlab/values/200-ansible-job.j2 @@ -7,7 +7,7 @@ cpn-ansible-job: - /bin/sh - -c - | - git clone https://github.com/cloud-pi-native/socle.git && \ + git clone {{ dsc.awx.repoSocle.url }} -b {{ dsc.awx.repoSocle.revision }} socle && \ cd socle && \ ansible-playbook post-install/gitlab.yaml extraEnvFrom: @@ -22,6 +22,6 @@ cpn-ansible-job: - /bin/sh - -c - | - git clone https://github.com/cloud-pi-native/socle.git && \ + git clone {{ dsc.awx.repoSocle.url }} -b {{ dsc.awx.repoSocle.revision }} socle && \ cd socle && \ ansible-playbook post-install/gitlab-ci-catalog.yaml diff --git a/roles/gitops/rendering-apps-files/templates/global/values/200-ansible-job.j2 b/roles/gitops/rendering-apps-files/templates/global/values/200-ansible-job.j2 index 4d10b1c7e..32d502b8c 100644 --- a/roles/gitops/rendering-apps-files/templates/global/values/200-ansible-job.j2 +++ b/roles/gitops/rendering-apps-files/templates/global/values/200-ansible-job.j2 @@ -8,7 +8,7 @@ cpn-ansible-job: - /bin/sh - -c - | - git clone https://github.com/cloud-pi-native/socle.git && \ + git clone {{ dsc.awx.repoSocle.url }} -b {{ dsc.awx.repoSocle.revision }} socle && \ cd socle && \ ansible-playbook post-install/pgdump.yaml {% if dsc.global.backup.s3.endpointCA is defined %} diff --git a/roles/gitops/rendering-apps-files/templates/harbor/values/200-ansible-job.j2 b/roles/gitops/rendering-apps-files/templates/harbor/values/200-ansible-job.j2 index 2e4fb48c5..f814c1bbc 100644 --- a/roles/gitops/rendering-apps-files/templates/harbor/values/200-ansible-job.j2 +++ b/roles/gitops/rendering-apps-files/templates/harbor/values/200-ansible-job.j2 @@ -7,7 +7,7 @@ cpn-ansible-job: - /bin/sh - -c - | - git clone https://github.com/cloud-pi-native/socle.git && \ + git clone {{ dsc.awx.repoSocle.url }} -b {{ dsc.awx.repoSocle.revision }} socle && \ cd socle && \ ansible-playbook post-install/harbor.yaml extraEnvFrom: diff --git a/roles/gitops/rendering-apps-files/templates/keycloak/values/200-ansible-job.j2 b/roles/gitops/rendering-apps-files/templates/keycloak/values/200-ansible-job.j2 index c4242dee5..5d38a4421 100644 --- a/roles/gitops/rendering-apps-files/templates/keycloak/values/200-ansible-job.j2 +++ b/roles/gitops/rendering-apps-files/templates/keycloak/values/200-ansible-job.j2 @@ -7,7 +7,7 @@ cpn-ansible-job: - /bin/sh - -c - | - git clone https://github.com/cloud-pi-native/socle.git && \ + git clone {{ dsc.awx.repoSocle.url }} -b {{ dsc.awx.repoSocle.revision }} socle && \ cd socle && \ ansible-playbook post-install/keycloak.yaml extraEnvFrom: diff --git a/roles/gitops/rendering-apps-files/templates/sonarqube/values/200-ansible-job.j2 b/roles/gitops/rendering-apps-files/templates/sonarqube/values/200-ansible-job.j2 index 8289c807a..2ecadf4c6 100644 --- a/roles/gitops/rendering-apps-files/templates/sonarqube/values/200-ansible-job.j2 +++ b/roles/gitops/rendering-apps-files/templates/sonarqube/values/200-ansible-job.j2 @@ -7,7 +7,7 @@ cpn-ansible-job: - /bin/sh - -c - | - git clone https://github.com/cloud-pi-native/socle.git && \ + git clone {{ dsc.awx.repoSocle.url }} -b {{ dsc.awx.repoSocle.revision }} socle && \ cd socle && \ ansible-playbook post-install/sonarqube.yaml extraEnvFrom: diff --git a/roles/gitops/rendering-apps-files/templates/vault/values/200-ansible-job.j2 b/roles/gitops/rendering-apps-files/templates/vault/values/200-ansible-job.j2 index cfa01f201..59a0d07dd 100644 --- a/roles/gitops/rendering-apps-files/templates/vault/values/200-ansible-job.j2 +++ b/roles/gitops/rendering-apps-files/templates/vault/values/200-ansible-job.j2 @@ -7,7 +7,7 @@ cpn-ansible-job: - /bin/sh - -c - | - git clone https://github.com/cloud-pi-native/socle.git && \ + git clone {{ dsc.awx.repoSocle.url }} -b {{ dsc.awx.repoSocle.revision }} socle && \ cd socle && \ ansible-playbook post-install/vault.yaml extraEnvFrom: diff --git a/roles/socle-config/templates/crd-conf-dso.yaml b/roles/socle-config/templates/crd-conf-dso.yaml index 9650efcc8..efcc36d33 100644 --- a/roles/socle-config/templates/crd-conf-dso.yaml +++ b/roles/socle-config/templates/crd-conf-dso.yaml @@ -183,6 +183,16 @@ spec: chartVersion: description: AWX Operator helm chart version (e.g., "2.19.1"). type: string + repoSocle: + type: object + description: Configuration for the socle Git repository used by Ansible jobs for post-installation tasks. + properties: + url: + type: string + description: URL of the socle Git repository containing the post-installation Ansible playbooks. + revision: + type: string + description: Branch, tag, or commit hash of the Git repository to clone for Ansible jobs. defaultAwxVersion: description: | AWX default version related to chartVersion is required only @@ -200,7 +210,7 @@ spec: type: string default: 10Gi helmRepoUrl: - description: AWX repository url. + description: AWX helm repository url. type: string cnpg: description: Configuration for cnpg clusters. @@ -215,7 +225,7 @@ spec: - replica - restore exposed: - description: Whether or not the cnpg cluster shoul be exposed via NodePort. + description: Whether or not the cnpg cluster should be exposed via NodePort. type: boolean default: false nodePort: