diff --git a/operator/config/samples/python_execution/taskdefinition_pyfunction_recursive.yaml b/operator/config/samples/python_execution/taskdefinition_pyfunction_recursive.yaml new file mode 100644 index 0000000000..2d6b35b8de --- /dev/null +++ b/operator/config/samples/python_execution/taskdefinition_pyfunction_recursive.yaml @@ -0,0 +1,11 @@ +apiVersion: lifecycle.keptn.sh/v1alpha3 +kind: KeptnTaskDefinition +metadata: + name: scheduled-deployment-2 +spec: + python: + parameters: + map: + mydata: "my-other-data" + functionRef: + name: scheduled-deployment-inline diff --git a/operator/config/samples/python_execution/taskdefinition_pyfunction_use_envvars.yaml b/operator/config/samples/python_execution/taskdefinition_pyfunction_use_envvars.yaml new file mode 100644 index 0000000000..0b5206991a --- /dev/null +++ b/operator/config/samples/python_execution/taskdefinition_pyfunction_use_envvars.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: Secret +metadata: + name: mysecret +type: Opaque +data: + SECURE_DATA: dG9rZW46IG15dG9rZW4= +--- +apiVersion: lifecycle.keptn.sh/v1alpha3 +kind: KeptnTaskDefinition +metadata: + name: pre-deployment-hello + annotations: + python: test +spec: + python: + parameters: + map: + user: "myuser" + secureParameters: + secret: mysecret + cmdParameters: "-h" + inline: + code: | + import os + import yaml + data = os.getenv('DATA') + dct = yaml.safe_load(data) + USER= dct['user'] + PASSWORD = os.environ.get('SECURE_DATA') + print(USER,PASSWORD)