Skip to content

Commit

Permalink
Add test for general pod pending
Browse files Browse the repository at this point in the history
  • Loading branch information
wzshiming committed May 24, 2024
1 parent 3dcc942 commit 1e79c73
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
15 changes: 15 additions & 0 deletions kustomize/stage/pod/general/testdata/pod-pending.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# @Stage: ../pod-create.yaml
# @Stage: ../pod-init-container-running.yaml
# @Stage: ../pod-init-container-completed.yaml
# @Stage: ../pod-ready.yaml
# @Stage: ../pod-complete.yaml
# @Stage: ../pod-remove-finalizer.yaml
# @Stage: ../pod-delete.yaml
apiVersion: v1
kind: Pod
metadata:
name: example-pod
spec:
containers:
- name: container
image: image
50 changes: 50 additions & 0 deletions kustomize/stage/pod/general/testdata/pod-pending.output.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
apiGroup: v1
kind: Pod
name: example-pod
stages:
- delay:
max: 5s
min: 1s
next:
- data:
- op: add
path: /metadata/finalizers
value:
- kwok.x-k8s.io/fake
kind: patch
type: application/json-patch+json
- data:
status:
conditions:
- lastProbeTime: null
lastTransitionTime: <Now>
status: "True"
type: Initialized
- lastProbeTime: null
lastTransitionTime: <Now>
message: 'containers with unready status: [ container ]'
reason: ContainersNotReady
status: "False"
type: Ready
- lastProbeTime: null
lastTransitionTime: <Now>
message: 'containers with unready status: [ container ]'
reason: ContainersNotReady
status: "False"
type: ContainersReady
containerStatuses:
- image: image
name: container
ready: false
restartCount: 0
started: false
state:
waiting:
reason: ContainerCreating
hostIP: <NodeIPWith(<nil>)>
phase: Pending
podIP: <PodIPWith(<nil>, false, "", "example-pod", "")>
kind: patch
subresource: status
type: application/merge-patch+json
stage: pod-create

0 comments on commit 1e79c73

Please sign in to comment.