forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-owner-reference.yaml
33 lines (31 loc) · 954 Bytes
/
k8s-owner-reference.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: k8s-owner-reference-
labels:
workflows.argoproj.io/test: "true"
annotations:
workflows.argoproj.io/description: |
This example creates a Kubernetes resource that will be deleted
when the workflow is deleted via Kubernetes GC.
A workflow is used for this example, but the same approach would apply
to other resource types.
https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/
spec:
entrypoint: main
templates:
- name: main
resource:
action: create
setOwnerReference: true
manifest: |
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: owned-eg-
spec:
entrypoint: main
templates:
- name: main
container:
image: argoproj/argosay:v2