Skip to content

Commit

Permalink
add customizations for argoproj.io/v1alpha1/Workflow
Browse files Browse the repository at this point in the history
Signed-off-by: yike21 <yike21@qq.com>
  • Loading branch information
yike21 committed May 10, 2023
1 parent 7b1ddc9 commit 43ade98
Show file tree
Hide file tree
Showing 9 changed files with 830 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ spec:
function Retain(desiredObj, observedObj)
if observedObj.spec.template.metadata ~= nil and observedObj.spec.template.metadata.labels ~= nil then
desiredObj.spec.template.metadata.labels = observedObj.spec.template.metadata.labels
return desiredObj
end
return desiredObj
end
statusReflection:
luaScript: >
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
labels:
app: sample
name: sample
namespace: test-workflow
spec:
parallelism: 2
entrypoint: volumes-existing-example
volumes:
- name: workdir
persistentVolumeClaim:
claimName: my-existing-volume
serviceAccountName: my-service-account
imagePullSecrets:
- name: my-secret
tolerations:
- key: 'key'
operation: 'Equal'
value: 'value'
effect: 'NoSchedule'

templates:
- name: volumes-existing-example
steps:
- - name: hello
template: whalesay

- name: whalesay
container:
image: docker/whalesay:latest
command: [cowsay]
args: ["hello world"]
volumeMounts:
- name: workdir
mountPath: /mnt/vol
resources:
limits:
memory: 1Gi
requests:
memory: 1Mi
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
labels:
app: sample
name: sample
namespace: test-workflow
spec:
parallelism: 1
entrypoint: volumes-existing-example
suspend: true
volumes:
- name: workdir
persistentVolumeClaim:
claimName: my-existing-volume
serviceAccountName: my-service-account
imagePullSecrets:
- name: my-secret
tolerations:
- key: 'key'
operation: 'Equal'
value: 'value'
effect: 'NoSchedule'

templates:
- name: volumes-existing-example
steps:
- - name: hello
template: whalesay

- name: whalesay
container:
image: docker/whalesay:latest
command: [cowsay]
args: ["hello world"]
volumeMounts:
- name: workdir
mountPath: /mnt/vol
resources:
limits:
memory: 1Gi
requests:
memory: 1Mi
status:
artifactGCStatus:
notSpecified: true
artifactRepositoryRef:
artifactRepository: {}
default: true
conditions:
- status: "False"
type: PodRunning
- status: "True"
type: Completed
finishedAt: "2023-04-20T11:26:47Z"
nodes:
sample:
children:
- sample-2754495299
displayName: sample
finishedAt: "2023-04-20T11:26:47Z"
id: sample
name: sample
outboundNodes:
- sample-410485805
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 19
memory: 18
startedAt: "2023-04-20T11:26:17Z"
templateName: volumes-existing-example
templateScope: local/sample
type: Steps
sample-410485805:
boundaryID: sample
displayName: hello
finishedAt: "2023-04-20T11:26:38Z"
hostNodeName: member1-control-plane
id: sample-410485805
name: sample[0].hello
outputs:
exitCode: "0"
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 19
memory: 18
startedAt: "2023-04-20T11:26:17Z"
templateName: whalesay
templateScope: local/sample
type: Pod
sample-2754495299:
boundaryID: sample
children:
- sample-410485805
displayName: '[0]'
finishedAt: "2023-04-20T11:26:47Z"
id: sample-2754495299
name: sample[0]
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 19
memory: 18
startedAt: "2023-04-20T11:26:17Z"
templateScope: local/sample
type: StepGroup
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 19
memory: 18
startedAt: "2023-04-20T11:26:17Z"
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
applied: true
clusterName: member1
health: Healthy
status:
artifactGCStatus:
notSpecified: true
artifactRepositoryRef:
artifactRepository: {}
default: true
conditions:
- status: "False"
type: PodRunning
- status: "True"
type: Completed
finishedAt: "2023-04-20T11:26:47Z"
nodes:
sample:
children:
- sample-2754495299
displayName: sample
finishedAt: "2023-04-20T11:26:47Z"
id: sample
name: sample
outboundNodes:
- sample-410485805
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 19
memory: 18
startedAt: "2023-04-20T11:26:17Z"
templateName: volumes-existing-example
templateScope: local/sample
type: Steps
sample-410485805:
boundaryID: sample
displayName: hello
finishedAt: "2023-04-20T11:26:38Z"
hostNodeName: member1-control-plane
id: sample-410485805
name: sample[0].hello
outputs:
exitCode: "0"
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 19
memory: 18
startedAt: "2023-04-20T11:26:17Z"
templateName: whalesay
templateScope: local/sample
type: Pod
sample-2754495299:
boundaryID: sample
children:
- sample-410485805
displayName: '[0]'
finishedAt: "2023-04-20T11:26:47Z"
id: sample-2754495299
name: sample[0]
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 19
memory: 18
startedAt: "2023-04-20T11:26:17Z"
templateScope: local/sample
type: StepGroup
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 19
memory: 18
startedAt: "2023-04-20T11:26:17Z"
---
applied: true
clusterName: member2
health: Unhealthy
status:
artifactGCStatus:
notSpecified: true
artifactRepositoryRef:
artifactRepository: {}
default: true
conditions:
- status: "False"
type: PodRunning
- status: "True"
type: SpecError
finishedAt: "2023-04-20T11:32:45Z"
nodes:
sample:
children:
- sample-2754495299
displayName: sample
finishedAt: "2023-04-20T11:32:45Z"
id: sample
name: sample
outboundNodes:
- sample-410485805
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 24
memory: 23
startedAt: "2023-04-20T11:32:11Z"
templateName: volumes-existing-example
templateScope: local/sample
type: Steps
sample-410485805:
boundaryID: sample
displayName: hello
finishedAt: "2023-04-20T11:32:37Z"
hostNodeName: member3-control-plane
id: sample-410485805
name: sample[0].hello
outputs:
exitCode: "0"
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 24
memory: 23
startedAt: "2023-04-20T11:32:11Z"
templateName: whalesay
templateScope: local/sample
type: Pod
sample-2754495299:
boundaryID: sample
children:
- sample-410485805
displayName: '[0]'
finishedAt: "2023-04-20T11:32:45Z"
id: sample-2754495299
name: sample[0]
phase: Succeeded
progress: /1
resourcesDuration:
cpu: 17
memory: 19
startedAt: "2023-04-20T11:32:11Z"
templateScope: local/sample
type: StepGroup
phase: Failed
progress: 0/1
resourcesDuration:
cpu: 17
memory: 19
startedAt: "2023-04-20T11:32:11Z"
---
applied: true
clusterName: member3
health: Healthy
status:
artifactGCStatus:
notSpecified: true
artifactRepositoryRef:
artifactRepository: {}
default: true
conditions:
- status: "False"
type: PodRunning
- status: "True"
type: Completed
finishedAt: "2023-04-20T11:32:45Z"
nodes:
sample:
children:
- sample-2754495299
displayName: sample
finishedAt: "2023-04-20T11:32:45Z"
id: sample
name: sample
outboundNodes:
- sample-410485805
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 24
memory: 23
startedAt: "2023-04-20T11:32:11Z"
templateName: volumes-existing-example
templateScope: local/sample
type: Steps
sample-410485805:
boundaryID: sample
displayName: hello
finishedAt: "2023-04-20T11:32:37Z"
hostNodeName: member3-control-plane
id: sample-410485805
name: sample[0].hello
outputs:
exitCode: "0"
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 24
memory: 23
startedAt: "2023-04-20T11:32:11Z"
templateName: whalesay
templateScope: local/sample
type: Pod
sample-2754495299:
boundaryID: sample
children:
- sample-410485805
displayName: '[0]'
finishedAt: "2023-04-20T11:32:45Z"
id: sample-2754495299
name: sample[0]
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 24
memory: 23
startedAt: "2023-04-20T11:32:11Z"
templateScope: local/sample
type: StepGroup
phase: Succeeded
progress: 1/1
resourcesDuration:
cpu: 24
memory: 23
startedAt: "2023-04-20T11:32:11Z"

0 comments on commit 43ade98

Please sign in to comment.