From df2f7bce39eff59c69750551e7623bab47798e06 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Mon, 26 Aug 2024 14:17:54 +1000 Subject: [PATCH] update service annotations for address pool and allow shared ip for metallb for service adguard-home, homer, qbittorrent, gitea, sonaqube, minio, mongodb, postgresql and renovate --- apps/adguard-home/base/service.yaml | 1 + apps/gitea/env/k3s-cluster/values.yaml | 1 + apps/homer/base/service.yaml | 1 + apps/qbittorrent/base/service.yaml | 3 +++ apps/sonarqube/env/k3s-cluster/values.yaml | 3 +++ .../minio/env/k3s-cluster/values.yaml | 3 +++ .../mongodb/env/k3s-cluster/values.yaml | 3 +++ .../postgresql/env/k3s-cluster/values.yaml | 24 ++++++++++++------- infrastructures/renovate/base/values.yaml | 3 +++ 9 files changed, 33 insertions(+), 9 deletions(-) diff --git a/apps/adguard-home/base/service.yaml b/apps/adguard-home/base/service.yaml index ebdc709..965c49c 100644 --- a/apps/adguard-home/base/service.yaml +++ b/apps/adguard-home/base/service.yaml @@ -5,6 +5,7 @@ metadata: namespace: adguard-home annotations: metallb.universe.tf/address-pool: k3s-cluster-ips + metallb.universe.tf/allow-shared-ip: k3s-cluster-ips labels: app.kubernetes.io/name: adguard-home spec: diff --git a/apps/gitea/env/k3s-cluster/values.yaml b/apps/gitea/env/k3s-cluster/values.yaml index 5fa96cb..55f5244 100644 --- a/apps/gitea/env/k3s-cluster/values.yaml +++ b/apps/gitea/env/k3s-cluster/values.yaml @@ -19,6 +19,7 @@ service: ssh: 10022 annotations: metallb.universe.tf/address-pool: k3s-cluster-ips + metallb.universe.tf/allow-shared-ip: k3s-cluster-ips ingress: enabled: true ingressClassName: "nginx" diff --git a/apps/homer/base/service.yaml b/apps/homer/base/service.yaml index 513fedc..57e175c 100644 --- a/apps/homer/base/service.yaml +++ b/apps/homer/base/service.yaml @@ -5,6 +5,7 @@ metadata: namespace: homer annotations: metallb.universe.tf/address-pool: k3s-cluster-ips + metallb.universe.tf/allow-shared-ip: k3s-cluster-ips labels: app.kubernetes.io/name: homer spec: diff --git a/apps/qbittorrent/base/service.yaml b/apps/qbittorrent/base/service.yaml index 7d4e749..b6eedf7 100644 --- a/apps/qbittorrent/base/service.yaml +++ b/apps/qbittorrent/base/service.yaml @@ -3,6 +3,9 @@ kind: Service metadata: name: qbittorrent namespace: qbittorrent + annotations: + metallb.universe.tf/address-pool: k3s-cluster-ips + metallb.universe.tf/allow-shared-ip: k3s-cluster-ips labels: app.kubernetes.io/name: qbittorrent spec: diff --git a/apps/sonarqube/env/k3s-cluster/values.yaml b/apps/sonarqube/env/k3s-cluster/values.yaml index 8502475..1dcc1ba 100644 --- a/apps/sonarqube/env/k3s-cluster/values.yaml +++ b/apps/sonarqube/env/k3s-cluster/values.yaml @@ -23,6 +23,9 @@ service: ports: http: 8090 elastic: 9091 + annotations: + metallb.universe.tf/address-pool: k3s-cluster-ips + metallb.universe.tf/allow-shared-ip: k3s-cluster-ips persistence: enabled: true storageClass: local-path diff --git a/infrastructures/minio/env/k3s-cluster/values.yaml b/infrastructures/minio/env/k3s-cluster/values.yaml index c0d41aa..34654f2 100644 --- a/infrastructures/minio/env/k3s-cluster/values.yaml +++ b/infrastructures/minio/env/k3s-cluster/values.yaml @@ -13,6 +13,9 @@ service: ports: api: 19000 console: 19001 + annotations: + metallb.universe.tf/address-pool: k3s-cluster-ips + metallb.universe.tf/allow-shared-ip: k3s-cluster-ips persistence: existingClaim: "minio-pvc" containerSecurityContext: diff --git a/infrastructures/mongodb/env/k3s-cluster/values.yaml b/infrastructures/mongodb/env/k3s-cluster/values.yaml index bd0b81b..c390c47 100644 --- a/infrastructures/mongodb/env/k3s-cluster/values.yaml +++ b/infrastructures/mongodb/env/k3s-cluster/values.yaml @@ -22,6 +22,9 @@ startupProbe: enabled: true service: type: LoadBalancer + annotations: + metallb.universe.tf/address-pool: k3s-cluster-ips + metallb.universe.tf/allow-shared-ip: k3s-cluster-ips persistence: existingClaim: "mongodb-pvc" persistentVolumeClaimRetentionPolicy: diff --git a/infrastructures/postgresql/env/k3s-cluster/values.yaml b/infrastructures/postgresql/env/k3s-cluster/values.yaml index 68325db..4a3ec6c 100644 --- a/infrastructures/postgresql/env/k3s-cluster/values.yaml +++ b/infrastructures/postgresql/env/k3s-cluster/values.yaml @@ -1,16 +1,16 @@ auth: username: edward database: edwarddb - existingSecret: "postgresql-secrets" + existingSecret: postgresql-secrets secretKeys: adminPasswordKey: postgres_password userPasswordKey: password replicationPasswordKey: replication_password -architecture: "replication" +architecture: replication replication: - synchronousCommit: "on" + synchronousCommit: on numSynchronousReplicas: 1 - applicationName: "postgres_repl" + applicationName: postgres_repl primary: podSecurityContext: fsGroup: 1000 @@ -18,9 +18,12 @@ primary: runAsUser: 1000 runAsGroup: 1000 podLabels: - name: "postgresql-primary" + name: postgresql-primary service: - type: "LoadBalancer" + type: LoadBalancer + annotations: + metallb.universe.tf/address-pool: k3s-cluster-ips + metallb.universe.tf/allow-shared-ip: k3s-cluster-ips persistence: existingClaim: postgresql-primary-pvc selector: @@ -29,18 +32,21 @@ primary: persistentVolumeClaimRetentionPolicy: enabled: true readReplicas: - name: "replica" + name: replica podSecurityContext: fsGroup: 1000 containerSecurityContext: runAsUser: 1000 runAsGroup: 1000 podLabels: - name: "postgresql-replica" + name: postgresql-replica service: - type: "LoadBalancer" + type: LoadBalancer ports: postgresql: 5433 + annotations: + metallb.universe.tf/address-pool: k3s-cluster-ips + metallb.universe.tf/allow-shared-ip: k3s-cluster-ips persistence: existingClaim: postgresql-replica-pvc selector: diff --git a/infrastructures/renovate/base/values.yaml b/infrastructures/renovate/base/values.yaml index 38bece6..8bb6915 100644 --- a/infrastructures/renovate/base/values.yaml +++ b/infrastructures/renovate/base/values.yaml @@ -22,6 +22,9 @@ cachePersistence: service: type: LoadBalancer port: 18899 + annotations: + metallb.universe.tf/address-pool: k3s-cluster-ips + metallb.universe.tf/allow-shared-ip: k3s-cluster-ips ingress: enabled: true ingressClassName: nginx