-
| 
         Hey, I'm currently working on an adoption of a helmchart of goharbor. parameters:
  harbor:
    chart_name: ${target_name}
    chart_version: 1.6.0
    namespace: ${namespace}
    helm_values:
      name: ${target_name}
      database:
        type: internal
        internal:
          password: ?{base64:targets/${target_name}/harbor-db-internal-password||randomstr:16}This Helmchart requires plaintext passwords as value-Input. Assuming my refs  This generates the file  $ cat refs/targets/harbor/harbor-controller-secret
---
data: cTc5UmZiYm4xYWZDOXNwcA==
encoding: original
type: base64
This is exactly what I expected:
data: UmVUbFZmdTU0bFZ0NG9Caw==
encoding: original
type: base64$ echo "UmVUbFZmdTU0bFZ0NG9Caw==" |base64 -d
ReTlVfu54lVt4oBkBut the secrets in the end looks like this: $ cat compiled/harbior/harbor/templates/database/database-secret.yaml
---
apiVersion: v1
data:
  POSTGRES_PASSWORD: P3tiYXNlNjQ6dGFyZ2V0cy9oYXJib3IvaGFyYm9yLWRiLWludGVybmFsLXBhc3N3b3JkfHxyYW5kb21zdHI6MTZ9
[...]$ echo "P3tiYXNlNjQ6dGFyZ2V0cy9oYXJib3IvaGFyYm9yLWRiLWludGVybmFsLXBhc3N3b3JkfHxyYW5kb21zdHI6MTZ9" | base64 -d
?{base64:targets/harbor/harbor-db-internal-password||randomstr:16}Any idea how I can make use of the kapitan secrets backend im cimbination with helm?  | 
  
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
| 
         I believe the issue is due to the fact that our integration with HELM, is not able to understand kapitan secrets. Here's what I think is happening: Any HELM chart that takes a password in the value files, will attempt to handle it by taking that value, and running a  So if you pass  Obviously.. if you pass ?{my-kapitan-ref:abc123}, HELM doesn't know how to handle it, and run a  I think a possible solutions are: 
 Full discussion here: https://kubernetes.slack.com/archives/C981W2HD3/p1615974246001700  | 
  
Beta Was this translation helpful? Give feedback.
I believe the issue is due to the fact that our integration with HELM, is not able to understand kapitan secrets.
Here's what I think is happening:
Any HELM chart that takes a password in the value files, will attempt to handle it by taking that value, and running a
base64of it. For reference, look at this mysql chartSo if you pass
password123to the value file, helm will do a base64 encryption and add it directly to the secret resource manifest.Obviously.. if you pass ?{my-kapitan-ref:abc123}, HELM doesn't know how to handle it, and run a
base64on that string, which is what you are getting.I think a possible solutions are: