apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "2"
  name: suitecrm-secret
  namespace: hf-suitecrm
spec:
  data:
  - remoteRef:
      conversionStrategy: Default
      decodingStrategy: None
      key: DB_HOST
      metadataPolicy: None
    secretKey: DB_HOST
  - remoteRef:
      conversionStrategy: Default
      decodingStrategy: None
      key: DB_PORT
      metadataPolicy: None
    secretKey: DB_PORT
  - remoteRef:
      conversionStrategy: Default
      decodingStrategy: None
      key: DB_NAME
      metadataPolicy: None
    secretKey: DB_NAME
  - remoteRef:
      conversionStrategy: Default
      decodingStrategy: None
      key: DB_USER
      metadataPolicy: None
    secretKey: DB_USER
  - remoteRef:
      conversionStrategy: Default
      decodingStrategy: None
      key: DB_PASSWORD
      metadataPolicy: None
    secretKey: DB_PASSWORD
  - remoteRef:
      conversionStrategy: Default
      decodingStrategy: None
      key: SITE_URL
      metadataPolicy: None
    secretKey: SITE_URL
  - remoteRef:
      conversionStrategy: Default
      decodingStrategy: None
      key: MARIADB_DATABASE
      metadataPolicy: None
    secretKey: MARIADB_DATABASE
  - remoteRef:
      conversionStrategy: Default
      decodingStrategy: None
      key: MARIADB_USER
      metadataPolicy: None
    secretKey: MARIADB_USER
  - remoteRef:
      conversionStrategy: Default
      decodingStrategy: None
      key: MARIADB_PASSWORD
      metadataPolicy: None
    secretKey: MARIADB_PASSWORD
  - remoteRef:
      conversionStrategy: Default
      decodingStrategy: None
      key: MARIADB_ROOT_PASSWORD
      metadataPolicy: None
    secretKey: MARIADB_ROOT_PASSWORD
  refreshInterval: 1h
  secretStoreRef:
    kind: SecretStore
    name: dmz-infisical
  target:
    creationPolicy: Merge
    deletionPolicy: Retain
    name: suitecrm-secret
---
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "1"
  name: dmz-infisical
  namespace: hf-suitecrm
spec:
  provider:
    infisical:
      auth:
        universalAuthCredentials:
          clientId:
            key: clientId
            name: infisical-universal-auth
          clientSecret:
            key: clientSecret
            name: infisical-universal-auth
      hostAPI: http://infisical-infisical-standalone-infisical.platform-infisical.svc.cluster.local:8080
      secretsScope:
        environmentSlug: prod
        projectSlug: platform-kubernetes-pqmd
        secretsPath: /tenants/pidoka/suitecrm
