0

I need a help with HelmRelease config, i need to concatenate secret value with string.

I have a feeling that I don't understand something in secret management. What is the right approach to combine secret with string. I would most like to do it with printf function but I can't write secret as a variable. Please give me some advice.

Data:

jdbcOverwrite.jdbcUrl: sonarqube.rds.ednpoint.aws.de. (base64 encoded get from secret)

string : jdbc:postgresql://

new value should look like: jdbcUrl: jdbc:postgresql://sonarqube.rds.ednpoint.aws.de

Sonarqube need to have fully Url:

helm.yaml`

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: sonarqube
spec:
  serviceAccountName: ${SERVICE_ACCOUNT_NAME}
  releaseName: sonarqube
  interval: 25m
  timeout: 20m
  chart:
    spec:
      #repository: https://SonarSource.github.io/helm-chart-sonarqube
      chart: sonarqube
      version: 6.0.0
      sourceRef:
        kind: HelmRepository
        name: sonarqube-repo
        namespace: sonarqube

  valuesFrom:
    - kind: Secret
      name: sonarqube-${ENVIRONMENT}-connection
      valuesKey: username
      targetPath: jdbcOverwrite.jdbcUsername
    - kind: Secret
      name: sonarqube-${ENVIRONMENT}-connection
      valuesKey: password
      targetPath: jdbcOverwrite.jdbcPassword
    - kind: Secret
      name: sonarqube-${ENVIRONMENT}-connection
      valuesKey: endpoint
      targetPath: jdbcOverwrite.jdbcUrl

Ideally, I would add a string to this variablejdbcOverwrite.jdbcUrl`, should I use Kustomize? I would appreciate any guidance

I would appreciate any guidance

Pawel
  • 19
  • 4

0 Answers0