From 08173eccfd248cd2fd9cb7a937b46f450c128a8a Mon Sep 17 00:00:00 2001 From: ace Date: Sat, 8 Apr 2023 22:26:06 +0300 Subject: [PATCH] postgres-operator: bump to v1.9.0, helm chart v1.9.0 postgres-operator-ui: bump to v1.9.0, helm chart v1.9.0 astodon: bump to v4.1.2, helm chart v4.0.0 cert-manager: bump to v1.11.1, helm chart v1.11.1 --- .../ghp/sample/group_vars/all/versions.yaml | 8 ++--- roles/mastodon/defaults/main.yaml | 16 ++++----- roles/mastodon/tasks/main.yaml | 35 +++++++++++++++++++ 3 files changed, 46 insertions(+), 13 deletions(-) diff --git a/inventory/ghp/sample/group_vars/all/versions.yaml b/inventory/ghp/sample/group_vars/all/versions.yaml index 67b71a5..a88d49e 100644 --- a/inventory/ghp/sample/group_vars/all/versions.yaml +++ b/inventory/ghp/sample/group_vars/all/versions.yaml @@ -6,7 +6,7 @@ nfs_client_provisioner_hdd_version: 4.0.14 nfs_client_provisioner_ssd_version: 4.0.14 # Cert-manager -cert_manager_version: 1.10.2 +cert_manager_version: 1.11.1 # External-DNS external_dns_version: 6.8.1 @@ -20,8 +20,8 @@ internal_ingress_nginx_version: 4.2.0 local_ingress_nginx_version: 4.2.0 # PostgreSQL operator -postgres_operator_ui_version: 1.8.2 -postgres_operator_version: 1.8.2 +postgres_operator_version: 1.9.0 +postgres_operator_ui_version: 1.9.0 # OpenLDAP openldap_version: 1.2.7 @@ -45,7 +45,7 @@ gitea_version: 7.0.4 harbor_version: 1.9.4 # Mastodon -mastodon_version: 0.3.0 +mastodon_version: 4.0.0 # Nextcloud nextcloud_version: 3.5.1 diff --git a/roles/mastodon/defaults/main.yaml b/roles/mastodon/defaults/main.yaml index c931ae9..c05b26f 100644 --- a/roles/mastodon/defaults/main.yaml +++ b/roles/mastodon/defaults/main.yaml @@ -7,7 +7,7 @@ mastodon_admin_email: "mastodon@{{ mail_domain | default(domain) }}" mastodon_default_values: ingress: enabled: true - className: "{{ external_ingress_class if mastodon_publish else internal_ingress_class }}" + ingressClassName: "{{ external_ingress_class if mastodon_publish else internal_ingress_class }}" annotations: cert-manager.io/cluster-issuer: "letsencrypt-prod" kubernetes.io/tls-acme: "true" @@ -67,7 +67,7 @@ mastodon_default_values: ca_file: delivery_method: smtp domain: "{{ domain }}" - enable_starttls_auto: false + enable_starttls: false from_address: "{{ mastodon_admin_email }}" login: "{{ mastodon_admin_user | default(mastodon_admin_username) | default('mastodon') }}" openssl_verify_mode: false @@ -115,24 +115,22 @@ mastodon_default_values: ## replicas: 1 - # https://github.com/bitnami/charts/tree/master/bitnami/postgresql#parameters postgresql: # Disable for external PostgreSQL enabled: false postgresqlHostname: "{{ namespace }}-postgres.{{ postgres_db_namespace | default(namespace) }}.svc.cluster.local" - postgresqlDatabase: mastodon # you must set a password; the password generated by the postgresql chart will # be rotated on each upgrade: # https://github.com/bitnami/charts/tree/master/bitnami/postgresql#upgrade - postgresqlUsername: "{{ mastodon_db_username }}" - postgresqlPassword: "{{ mastodon_db_password }}" - + auth: + database: mastodon + username: "{{ mastodon_db_username }}" + password: "{{ mastodon_db_password }}" + # https://github.com/bitnami/charts/tree/master/bitnami/redis#parameters redis: architecture: standalone enabled: true auth: password: "{{ mastodon_vapid_public_key_base64 | hash('md5') }}" - - diff --git a/roles/mastodon/tasks/main.yaml b/roles/mastodon/tasks/main.yaml index 8f92f94..baf8f77 100644 --- a/roles/mastodon/tasks/main.yaml +++ b/roles/mastodon/tasks/main.yaml @@ -15,3 +15,38 @@ chart_ref: "{{ mastodon_chart | default('ghp/mastodon') }}" chart_version: "{{ mastodon_version | default(omit) }}" release_values: "{{ mastodon_combined_values | from_yaml }}" + + +- name: Search for mastodon web pod + kubernetes.core.k8s_info: + kind: Pod + namespace: "{{ mastodon_namespace | default(namespace) }}" + label_selectors: + - app.kubernetes.io/component=web + - app.kubernetes.io/instance=mastodon + register: mastodon_web_pod_name + +- name: Remove mastodon web pod for restart + kubernetes.core.k8s: + state: absent + api_version: v1 + kind: Pod + namespace: "{{ mastodon_namespace | default(namespace) }}" + name: "{{ mastodon_web_pod_name.resources[0].metadata.name }}" + +- name: Search for mastodon streaming pod + kubernetes.core.k8s_info: + kind: Pod + namespace: "{{ mastodon_namespace | default(namespace) }}" + label_selectors: + - app.kubernetes.io/component=streaming + - app.kubernetes.io/instance=mastodon + register: mastodon_streaming_pod_name + +- name: Remove mastodon streaming pod for restart + kubernetes.core.k8s: + state: absent + api_version: v1 + kind: Pod + namespace: "{{ mastodon_namespace | default(namespace) }}" + name: "{{ mastodon_streaming_pod_name.resources[0].metadata.name }}"