hossted / hossted-operator

Hossted k8s operator
Apache License 2.0
0 stars 1 forks source link

primaryCreds should process different type of secrets #107

Closed gannulka closed 1 month ago

gannulka commented 1 month ago

Please add possibility to process such Secret with username from application (like RabbitMQ)

WhatsApp Image 2024-09-18 at 14 23 01

To reproduce locally please install with operator this rabbitmq

env:
  HOSSTED_API_URL: "https://api.hossted.com/v1/instances"
  EMAIL_ID: ""
  RECONCILE_DURATION: "10s"
  HOSSTED_ORG_ID: ""
  CONTEXT_NAME: ""
  LOKI_PASSWORD: ""
  LOKI_URL: ""
  LOKI_USERNAME: ""
  MIMIR_PASSWORD: ""
  MIMIR_URL: ""
  MIMIR_USERNAME: ""

replicas: 1

secret:
  HOSSTED_AUTH_TOKEN: "notoken"

stop: true

cve:
  enable: false
monitoring:
  enable: false
logging:
  enable: false
ingress:
  enable: false

nameOverride: hossted

operator:
  image:
    repository: hossted/operator
    tag: edge

primaryCreds:
  namespace: "hossted-rabbitmq"
  user: 
    key: "default_user"
    secretName: "hossted-rabbitmq-config"
  password: 
    key: "rabbitmq-password"
    secretName: "hossted-rabbitmq"

helm:
  - releaseName: "hossted-rabbitmq"
    namespace: "hossted-rabbitmq"
    values: 
      - "ingress.enabled=true"
      - "ingress.hostname=rabbitmq.f.hossted.app"
      - "ingress.ingressClassName=hossted-operator"
      - "auth.username=hossted-admin"
      - "auth.password=hossted-admin-password"
    repoName: "rabbitmq"
    chartName: "rabbitmq"
    repoUrl: "https://charts.bitnami.com/bitnami"

Looks like "primaryCreds" schema should be extended

AdheipSingh commented 1 month ago
primaryCreds:
  namespace: "hossted-rabbitmq"
  user: 
    type: "file"
    text: "default_user"
    key: "rabbitmq.conf"
    secretName: "hossted-rabbitmq-config"
  password: 
    key: "rabbitmq-password"
    secretName: "hossted-rabbitmq"