SAP / sap-btp-service-operator

SAP BTP service operator enables developers to connect Kubernetes clusters to SAP BTP accounts and to consume SAP BTP services within the clusters by using Kubernetes native tools.
Apache License 2.0
125 stars 52 forks source link

Usage of a values.yaml #87

Closed tomfrenken closed 3 years ago

tomfrenken commented 3 years ago

Hey colleagues,

since you are publishing the operator as a helm chart, I was wondering if you could provide support for a values yaml where it is either possible to reference a secret that contains the credentials and/or writing the credentials directly into the values.yaml (the former would probably be better).

pavelmaliy commented 3 years ago

Hi I don't understand what do you mean by "writing the credentials directly into the values.yaml" you can pass to helm whatever values.yml you like with --values flag

tomfrenken commented 3 years ago

Well, the current recommended approach to set the values according to the README is this:

helm upgrade --install sap-btp-operator https://github.com/SAP/sap-btp-service-operator/releases/download/<release>/sap-btp-operator-<release>.tgz \
    --create-namespace \
    --namespace=sap-btp-operator \
    --set manager.secret.clientid=<clientid> \
    --set manager.secret.clientsecret=<clientsecret> \
    --set manager.secret.url=<sm_url> \
    --set manager.secret.tokenurl=<url>

Instead of using the --set flag, would it also be possible to use a values.yaml that looks like this:

manager:
  secret:
     clientid: "some-id"
     clientsecret: "123"
     url: "someurl"
     tokenurl: "some_token_url"

Furthermore, would it be possible to use a secret from which the values are just taken? For example, just specifying a secret in the values.yaml?

manager:
  secretRef: "my_secret_on_k8s"
pavelmaliy commented 3 years ago

you can do it like this:

helm upgrade --install sap-btp-operator https://github.com/SAP/sap-btp-service-operator/releases/download/<release>/sap-btp-operator-<release>.tgz \
    --create-namespace \
    --namespace=sap-btp-operator \
    --values=/path/to/yaml
tomfrenken commented 3 years ago

Ah I see, thanks for helping us out!

rufreakde commented 2 years ago

Hi @pavelmaliy ,

I know there is a solution to this issue but it also would be much simpler to allow a helmchart value for: existingSecret

As explained in detail here: https://utkuozdemir.org/blog/argocd-helm-secrets/

This would improve the usability of this operator and solidify the operator pattern which is declarative based. Could you create a backlog for this or task or similar for tracking?

Best regards, Rudolf