Domantas
05/17/2021, 12:06 PMjob_template_path
where there is a path to yaml file which is supposed to create environment variables and used them in the prefect code:
apiVersion: v1
kind: Pod
metadata:
name: secret-test-pod
spec:
containers:
- name: test-container
image: <http://k8s.gcr.io/busybox|k8s.gcr.io/busybox>
command: [ "/bin/sh", "-c", "env" ]
envFrom:
- secretRef:
name: mysecret
restartPolicy: Never
Yaml file template is took from kubernetes documentation(https://kubernetes.io/docs/concepts/configuration/secret/#use-cases)
However, when I try to run it on prefect server, I got this error: "'spec'"
(will attach an error log screenshot)
Is there are anything wrong with the template?
Is this approach is a good way to define and use secrets in the kubernetes agent?
P.S I tried to define env
parameter with secrets by using KubernetesRun agent but it is not a good option for this case since all secrets could be visible as a plain text in the prefect server UI.davzucky
05/17/2021, 1:21 PMDomantas
05/17/2021, 2:34 PM