You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kubernetes secrets can also be passed to the function using the secureParameters field. Here, the secret value is the K8s secret name that will be mounted into the runtime and made available to the function via the environment variable SECURE_DATA.
This leads me to believe I can do:
kubectl -n default create secret generic test-secret \
--from-literal=foo=bar \
--from-literal=foo2=bar2
apiVersion: lifecycle.keptn.sh/v1alpha2
kind: KeptnTaskDefinition
metadata:
name: dummy-task
namespace: "default"
spec:
function:
secureParameters:
secret: test-secret
inline:
code: |
let secret_values = Deno.env.get('SECURE_DATA');
// Somehow get `foo` and `bar` from `secret_values`
But I cannot. In reality, my secret must take a certain form with SECURE_DATA as the key:
Kubernetes secrets can also be passed to the function using the secureParameters field. Here, the secret value is the K8s secret name that will be mounted into the runtime and made available to the function via the environment variable SECURE_DATA.
This leads me to believe I can do:
But I cannot. In reality, my secret must take a certain form with
SECURE_DATA
as the key:Which is fine, but then:
a) Keptn is forcing me to change the way I handle secrets
b) I need 2 secrets now, not one
For b) I cannot reference multiple secrets in a KeptnTaskDefinition. The following is not possible:
So I try to use a file:
Yet I still get the
SECURE_DATA
error.The text was updated successfully, but these errors were encountered: