From cabdeb4480e4ff5400cb9927a1cae4b8a1b70da1 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Tue, 3 Sep 2024 10:58:50 +0200 Subject: [PATCH] Add cert-manager play & role Signed-off-by: Christian Berendt --- playbooks/kubernetes-k8s-cert-manager.yml | 10 ++++++++++ roles/cert_manager/README.md | 0 roles/cert_manager/defaults/main.yml | 5 +++++ roles/cert_manager/meta/main.yml | 22 +++++++++++++++++++++ roles/cert_manager/tasks/main.yml | 10 ++++++++++ roles/cert_manager/vars/main.yml | 2 ++ roles/cloudnative_pg/tasks/main.yml | 2 +- roles/headlamp/tasks/main.yml | 2 +- roles/memcached/tasks/main.yml | 2 +- roles/node_feature_discovery/tasks/main.yml | 2 +- roles/yaook_operators/tasks/main.yml | 4 ++-- 11 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 playbooks/kubernetes-k8s-cert-manager.yml create mode 100644 roles/cert_manager/README.md create mode 100644 roles/cert_manager/defaults/main.yml create mode 100644 roles/cert_manager/meta/main.yml create mode 100644 roles/cert_manager/tasks/main.yml create mode 100644 roles/cert_manager/vars/main.yml diff --git a/playbooks/kubernetes-k8s-cert-manager.yml b/playbooks/kubernetes-k8s-cert-manager.yml new file mode 100644 index 0000000..49dded2 --- /dev/null +++ b/playbooks/kubernetes-k8s-cert-manager.yml @@ -0,0 +1,10 @@ +--- +- name: Apply cert_manager role + hosts: + - "{{ hosts_manager|default(groups['manager'][0])|default('localhost') }}" + connection: local + + tasks: + - name: Include cert_manager role + ansible.builtin.include_role: + name: cert_manager diff --git a/roles/cert_manager/README.md b/roles/cert_manager/README.md new file mode 100644 index 0000000..e69de29 diff --git a/roles/cert_manager/defaults/main.yml b/roles/cert_manager/defaults/main.yml new file mode 100644 index 0000000..bb4f008 --- /dev/null +++ b/roles/cert_manager/defaults/main.yml @@ -0,0 +1,5 @@ +--- +cert_manager_helm_chart_ref: /charts/cert_manager +cert_manager_helm_release_name: cert-manager +cert_manager_helm_release_namespace: certificates +cert_manager_helm_values: {} diff --git a/roles/cert_manager/meta/main.yml b/roles/cert_manager/meta/main.yml new file mode 100644 index 0000000..73f9be5 --- /dev/null +++ b/roles/cert_manager/meta/main.yml @@ -0,0 +1,22 @@ +--- +galaxy_info: + author: Christian Berendt + description: Role osism.kubernetes.cert_maanger + company: OSISM GmbH + license: Apache License 2.0 + min_ansible_version: 2.16.0 + platforms: + - name: Ubuntu + versions: + - jammy + - noble + - name: Debian + versions: + - bookworm + - name: EL + versions: + - "9" + galaxy_tags: + - helm + - kubernetes + - osism diff --git a/roles/cert_manager/tasks/main.yml b/roles/cert_manager/tasks/main.yml new file mode 100644 index 0000000..5237cc6 --- /dev/null +++ b/roles/cert_manager/tasks/main.yml @@ -0,0 +1,10 @@ +--- +- name: Deploy cert-manager + kubernetes.core.helm: + release_name: "{{ cert_manager_helm_release_name }}" + chart_ref: "{{ cert_manager_helm_chart_ref }}" + release_namespace: "{{ cert_manager_helm_release_namespace }}" + create_namespace: true + kubeconfig: /share/kubeconfig + wait: true + values: "{{ _cert_manager_helm_values | combine(cert_manager_helm_values, recursive=True) }}" diff --git a/roles/cert_manager/vars/main.yml b/roles/cert_manager/vars/main.yml new file mode 100644 index 0000000..78fcb0d --- /dev/null +++ b/roles/cert_manager/vars/main.yml @@ -0,0 +1,2 @@ +--- +_cert_manager_helm_values: {} diff --git a/roles/cloudnative_pg/tasks/main.yml b/roles/cloudnative_pg/tasks/main.yml index 5f39956..60c9263 100644 --- a/roles/cloudnative_pg/tasks/main.yml +++ b/roles/cloudnative_pg/tasks/main.yml @@ -1,5 +1,5 @@ --- -- name: Deploy helm chart +- name: Deploy cloudnative-pg kubernetes.core.helm: release_name: "{{ cloudnative_pg_release_name }}" chart_ref: "{{ cloudnative_pg_chart_ref }}" diff --git a/roles/headlamp/tasks/main.yml b/roles/headlamp/tasks/main.yml index f2af1dc..d0fe3a2 100644 --- a/roles/headlamp/tasks/main.yml +++ b/roles/headlamp/tasks/main.yml @@ -1,5 +1,5 @@ --- -- name: Deploy helm chart +- name: Deploy headlamp kubernetes.core.helm: release_name: "{{ headlamp_helm_release_name }}" chart_ref: "{{ headlamp_helm_chart_ref }}" diff --git a/roles/memcached/tasks/main.yml b/roles/memcached/tasks/main.yml index 130848e..90722ec 100644 --- a/roles/memcached/tasks/main.yml +++ b/roles/memcached/tasks/main.yml @@ -1,5 +1,5 @@ --- -- name: Deploy helm chart +- name: Deploy memcached kubernetes.core.helm: release_name: "{{ memcached_helm_release_name }}" chart_ref: "{{ memcached_helm_chart_ref }}" diff --git a/roles/node_feature_discovery/tasks/main.yml b/roles/node_feature_discovery/tasks/main.yml index 7675d9f..741ceb2 100644 --- a/roles/node_feature_discovery/tasks/main.yml +++ b/roles/node_feature_discovery/tasks/main.yml @@ -1,5 +1,5 @@ --- -- name: Deploy helm chart +- name: Deploy node-feature-discovery kubernetes.core.helm: release_name: "{{ node_feature_discovery_helm_release_name }}" chart_ref: "{{ node_feature_discovery_helm_chart_ref }}" diff --git a/roles/yaook_operators/tasks/main.yml b/roles/yaook_operators/tasks/main.yml index 0b211be..a7dac8d 100644 --- a/roles/yaook_operators/tasks/main.yml +++ b/roles/yaook_operators/tasks/main.yml @@ -1,5 +1,5 @@ --- -- name: Deploy keystone-operator helm chart +- name: Deploy keystone-operator kubernetes.core.helm: release_name: "{{ yaook_operators_keystone_helm_release_name }}" chart_ref: "{{ yaook_operators_keystone_helm_chart_ref }}" @@ -9,7 +9,7 @@ wait: true values: "{{ _yaook_operators_keystone_helm_values | combine(yaook_operators_keystone_helm_values, recursive=True) }}" -- name: Deploy keystone-resources-operator helm chart +- name: Deploy keystone-resources-operator kubernetes.core.helm: release_name: "{{ yaook_operators_keystone_resources_helm_release_name }}" chart_ref: "{{ yaook_operators_keystone_resources_helm_chart_ref }}"