From d19f76af04dea46171d159fc92f1fe1b94e8fbca Mon Sep 17 00:00:00 2001 From: Ludovic Ortega Date: Tue, 18 Jun 2024 22:39:54 +0000 Subject: [PATCH] feat: use authentification media website --- .../group_vars/kubernetes_master/secrets.example | 8 ++++++++ .../bazarr/manifests/01_external_secret.yaml | 16 +++++++++++++++- argocd/media/bazarr/values.yaml | 5 +++++ .../prowlarr/manifests/01_external_secret.yaml | 14 ++++++++++++++ argocd/media/prowlarr/values.yaml | 2 ++ .../radarr/manifests/01_external_secret.yaml | 14 ++++++++++++++ argocd/media/radarr/values.yaml | 2 ++ .../sonarr/manifests/01_external_secret.yaml | 14 ++++++++++++++ argocd/media/sonarr/values.yaml | 2 ++ 9 files changed, 76 insertions(+), 1 deletion(-) diff --git a/ansible/group_vars/kubernetes_master/secrets.example b/ansible/group_vars/kubernetes_master/secrets.example index e7cd60cff..2bab52fe3 100644 --- a/ansible/group_vars/kubernetes_master/secrets.example +++ b/ansible/group_vars/kubernetes_master/secrets.example @@ -88,24 +88,32 @@ secret_vault_datas: - path: secret/data/homelab/prod/bazarr data: data: + USERNAME: + PASSWORD: API_KEY: POSTGRES_USER: POSTGRES_PASSWORD: - path: secret/data/homelab/prod/prowlarr data: data: + USERNAME: + PASSWORD: API_KEY: POSTGRES_USER: POSTGRES_PASSWORD: - path: secret/data/homelab/prod/radarr data: data: + USERNAME: + PASSWORD: API_KEY: POSTGRES_USER: POSTGRES_PASSWORD: - path: secret/data/homelab/prod/sonarr data: data: + USERNAME: + PASSWORD: API_KEY: POSTGRES_USER: POSTGRES_PASSWORD: diff --git a/argocd/media/bazarr/manifests/01_external_secret.yaml b/argocd/media/bazarr/manifests/01_external_secret.yaml index 5fc1cb4d5..eafcc873a 100644 --- a/argocd/media/bazarr/manifests/01_external_secret.yaml +++ b/argocd/media/bazarr/manifests/01_external_secret.yaml @@ -40,7 +40,21 @@ spec: kind: SecretStore name: vault data: - - secretKey: RADARR__AUTH__APIKEY + - secretKey: BAZARR__AUTH__USERNAME + remoteRef: + conversionStrategy: Default + decodingStrategy: None + metadataPolicy: None + key: secret/data/homelab/prod/bazarr + property: USERNAME + - secretKey: BAZARR__AUTH__PASSWORD + remoteRef: + conversionStrategy: Default + decodingStrategy: None + metadataPolicy: None + key: secret/data/homelab/prod/bazarr + property: PASSWORD + - secretKey: BAZARR__AUTH__APIKEY remoteRef: conversionStrategy: Default decodingStrategy: None diff --git a/argocd/media/bazarr/values.yaml b/argocd/media/bazarr/values.yaml index a0ebf6f20..9a6f55bb4 100644 --- a/argocd/media/bazarr/values.yaml +++ b/argocd/media/bazarr/values.yaml @@ -13,6 +13,11 @@ extraEnv: value: "5432" - name: POSTGRES_DATABASE value: bazarr + - name: BAZARR__AUTH__METHOD + value: Forms +extraEnvFrom: + - secretRef: + name: bazarr-vault volumes: - name: data persistentVolumeClaim: diff --git a/argocd/media/prowlarr/manifests/01_external_secret.yaml b/argocd/media/prowlarr/manifests/01_external_secret.yaml index e8482088e..5bdb6b16e 100644 --- a/argocd/media/prowlarr/manifests/01_external_secret.yaml +++ b/argocd/media/prowlarr/manifests/01_external_secret.yaml @@ -40,6 +40,20 @@ spec: kind: SecretStore name: vault data: + - secretKey: PROWLARR__AUTH__USERNAME + remoteRef: + conversionStrategy: Default + decodingStrategy: None + metadataPolicy: None + key: secret/data/homelab/prod/prowlarr + property: USERNAME + - secretKey: PROWLARR__AUTH__PASSWORD + remoteRef: + conversionStrategy: Default + decodingStrategy: None + metadataPolicy: None + key: secret/data/homelab/prod/prowlarr + property: PASSWORD - secretKey: PROWLARR__AUTH__APIKEY remoteRef: conversionStrategy: Default diff --git a/argocd/media/prowlarr/values.yaml b/argocd/media/prowlarr/values.yaml index 856b6fee2..ca019fefd 100644 --- a/argocd/media/prowlarr/values.yaml +++ b/argocd/media/prowlarr/values.yaml @@ -19,6 +19,8 @@ extraEnv: value: "5432" - name: PROWLARR__POSTGRES__MAINDB value: prowlarr + - name: PROWLARR__AUTH__METHOD + value: Forms extraEnvFrom: - secretRef: name: prowlarr-vault diff --git a/argocd/media/radarr/manifests/01_external_secret.yaml b/argocd/media/radarr/manifests/01_external_secret.yaml index 7cdd107ae..c91f29ec4 100644 --- a/argocd/media/radarr/manifests/01_external_secret.yaml +++ b/argocd/media/radarr/manifests/01_external_secret.yaml @@ -40,6 +40,20 @@ spec: kind: SecretStore name: vault data: + - secretKey: RADARR__AUTH__USERNAME + remoteRef: + conversionStrategy: Default + decodingStrategy: None + metadataPolicy: None + key: secret/data/homelab/prod/radarr + property: USERNAME + - secretKey: RADARR__AUTH__PASSWORD + remoteRef: + conversionStrategy: Default + decodingStrategy: None + metadataPolicy: None + key: secret/data/homelab/prod/radarr + property: PASSWORD - secretKey: RADARR__AUTH__APIKEY remoteRef: conversionStrategy: Default diff --git a/argocd/media/radarr/values.yaml b/argocd/media/radarr/values.yaml index 2c21bf5b9..c60262495 100644 --- a/argocd/media/radarr/values.yaml +++ b/argocd/media/radarr/values.yaml @@ -19,6 +19,8 @@ extraEnv: value: "5432" - name: RADARR__POSTGRES__MAINDB value: radarr + - name: RADARR__AUTH__METHOD + value: Forms extraEnvFrom: - secretRef: name: radarr-vault diff --git a/argocd/media/sonarr/manifests/01_external_secret.yaml b/argocd/media/sonarr/manifests/01_external_secret.yaml index d834e2f1c..34afa1056 100644 --- a/argocd/media/sonarr/manifests/01_external_secret.yaml +++ b/argocd/media/sonarr/manifests/01_external_secret.yaml @@ -40,6 +40,20 @@ spec: kind: SecretStore name: vault data: + - secretKey: SONARR__AUTH__USERNAME + remoteRef: + conversionStrategy: Default + decodingStrategy: None + metadataPolicy: None + key: secret/data/homelab/prod/sonarr + property: USERNAME + - secretKey: SONARR__AUTH__PASSWORD + remoteRef: + conversionStrategy: Default + decodingStrategy: None + metadataPolicy: None + key: secret/data/homelab/prod/sonarr + property: PASSWORD - secretKey: SONARR__AUTH__APIKEY remoteRef: conversionStrategy: Default diff --git a/argocd/media/sonarr/values.yaml b/argocd/media/sonarr/values.yaml index b44e10dd1..821db56d4 100644 --- a/argocd/media/sonarr/values.yaml +++ b/argocd/media/sonarr/values.yaml @@ -19,6 +19,8 @@ extraEnv: value: "5432" - name: SONARR__POSTGRES__MAINDB value: sonarr + - name: SONARR__AUTH__METHOD + value: Forms extraEnvFrom: - secretRef: name: sonarr-vault