diff --git a/parameters-scw-im-main.yaml b/parameters-scw-im-main.yaml new file mode 100644 index 0000000..29ae101 --- /dev/null +++ b/parameters-scw-im-main.yaml @@ -0,0 +1,32 @@ +--- + +# A set of parameters for our im-main Scaleway cluster. + +k8s_kubeconfig: "{{ lookup('env', 'KUBECONFIG') }}" + +core_deploy_cluster_issuer: yes +core_cluster_issuer_letsencrypt_email: tdudgeon@informaticsmatters.com + +infra_priority_class: im-application-critical + +ingress_class: nginx + +ic_state: absent +efs_state: absent +cinder_state: absent +ax_state: absent + +pg_state: present +pg_bu_state: absent +pg_image: informaticsmatters/rdkit-cartridge-debian +pg_version: Release_2024_03_3 +pg_vol_size_g: 1 +pg_cpu_request: 100m +pg_mem_request: 250Mi + +kc_state: present +kc_hostname: keycloak-scw.informaticsmatters.com + +rabbitmq_state: present +rabbitmq_hostname: rabbitmq-scw.informaticsmatters.com +rabbitmq_version: "4.2.2" diff --git a/roles/core/tasks/deploy.yaml b/roles/core/tasks/deploy.yaml index d2d102f..acfa087 100644 --- a/roles/core/tasks/deploy.yaml +++ b/roles/core/tasks/deploy.yaml @@ -8,9 +8,9 @@ - name: Install CertManager ClusterIssuer for Let's Encrypt kubernetes.core.k8s: - definition: "{{ lookup('template', '{{ item }}.yaml.j2') }}" + definition: "{{ lookup('template', item) }}" wait: yes loop: - - clusterissuer-production - - clusterissuer-staging + - clusterissuer-production.yaml.j2 + - clusterissuer-staging.yaml.j2 when: core_deploy_cluster_issuer|bool diff --git a/roles/core/tasks/undeploy.yaml b/roles/core/tasks/undeploy.yaml index 65dd15e..a15b7a0 100644 --- a/roles/core/tasks/undeploy.yaml +++ b/roles/core/tasks/undeploy.yaml @@ -3,15 +3,15 @@ - name: Remove PodSecurityPolicies kubernetes.core.k8s: state: absent - definition: "{{ lookup('template', '{{ item }}.yaml.j2') }}" + definition: "{{ lookup('template', item) }}" wait: yes loop: - - psp-im-core-unrestricted + - psp-im-core-unrestricted.yaml.j2 - name: Remove PriorityClasses kubernetes.core.k8s: state: absent - definition: "{{ lookup('template', '{{ item }}.yaml.j2') }}" + definition: "{{ lookup('template', item) }}" wait: yes loop: - - pc-im + - pc-im.yaml.j2 diff --git a/roles/infrastructure/tasks/deploy.yaml b/roles/infrastructure/tasks/deploy.yaml index 1f78e07..6b66bc9 100644 --- a/roles/infrastructure/tasks/deploy.yaml +++ b/roles/infrastructure/tasks/deploy.yaml @@ -236,13 +236,13 @@ - name: Keycloak kubernetes.core.k8s: - definition: "{{ lookup('template', '{{ item }}.yaml.j2') }}" + definition: "{{ lookup('template', item) }}" wait: yes wait_timeout: "{{ wait_timeout }}" loop: - - service-keycloak - - ingress-keycloak - - statefulset-keycloak + - service-keycloak.yaml.j2 + - ingress-keycloak.yaml.j2 + - statefulset-keycloak.yaml.j2 - name: Wait for keycloak to become Ready ({{ wait_timeout }} seconds) kubernetes.core.k8s_info: diff --git a/roles/infrastructure/templates/rabbitmqcluster.yaml.j2 b/roles/infrastructure/templates/rabbitmqcluster.yaml.j2 index b1b2a47..b8492a4 100644 --- a/roles/infrastructure/templates/rabbitmqcluster.yaml.j2 +++ b/roles/infrastructure/templates/rabbitmqcluster.yaml.j2 @@ -36,7 +36,9 @@ spec: {% endif %} {% endif %} persistence: +{% if rabbitmq_vol_storageclass != ' ' %} storageClassName: {{ rabbitmq_vol_storageclass }} +{% endif %} storage: {{ rabbitmq_vol_size_g }}Gi override: statefulSet: