ibm-cloud-docs / secrets-manager

Documentation repository for secrets-manager
1 stars 11 forks source link

SecretsManager + IKS - yaml for installation of helm chart with a trusted profile errors #19

Closed isaaceichelberger closed 1 year ago

isaaceichelberger commented 1 year ago

Docs link: https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-tutorial-kubernetes-secrets When running

echo '
installCRDs: true
extraVolumes:
- name: sa-token
projected:
    defaultMode: 420
    sources:
    - serviceAccountToken:
        path: sa-token
        expirationSeconds: 3600
        audience: iam
extraVolumeMounts:
- mountPath: /var/run/secrets/tokens
name: sa-token
webhook:
  extraVolumes:
  - name: sa-token
      projected:
      defaultMode: 420
      sources:
      - serviceAccountToken:
          path: sa-token
          expirationSeconds: 3600
          audience: iam
  extraVolumeMounts:
  - mountPath: /var/run/secrets/tokens
      name: sa-token' >values.yml
helm install external-secrets external-secrets/external-secrets -n external-secrets --create-namespace -f values.yml

as mentioned by the docs, you will get this error

Error: INSTALLATION FAILED: failed to parse values.yml: error converting YAML to JSON: yaml: line 18: mapping values are not allowed in this context

The yaml file should be as follows:


installCRDs: true
extraVolumes:
- name: sa-token
projected:
    defaultMode: 420
    sources:
    - serviceAccountToken:
        path: sa-token
        expirationSeconds: 3600
        audience: iam
extraVolumeMounts:
- mountPath: /var/run/secrets/tokens
name: sa-token
webhook:
  extraVolumes:
  - name: sa-token
      projected:
      defaultMode: 420
      sources:
      - serviceAccountToken:
          path: sa-token
          expirationSeconds: 3600
          audience: iam
  extraVolumeMounts:
  - mountPath: /var/run/secrets/tokens
      name: sa-token
alessandroros commented 1 year ago

I have the same issue. Any suggestion?

isaaceichelberger commented 1 year ago

I have the same issue. Any suggestion?

change the yaml to what i put at the bottom of the post and it should work

alessandroros commented 1 year ago

I changed it but I get the same error. To me it seems the same file. What does it changed? https://www.diffchecker.com/QSv0jgLa/ Using a yaml linter it says there's an error at line 16, column 11.

h-romeus commented 1 year ago

Hello @alessandroros and @isaaceichelberger, thank you for opening this issue. This error was resolved in the latest update. Please run it again, and if you run into any issues, please open another ticket. And, please don't hesitate to open additional feedback in the future.