generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release manifests stage-fast.yaml and kwokctl-resource.yaml
- Loading branch information
Showing
24 changed files
with
651 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../node/fast | ||
- ../pod/fast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Node Fast Stage | ||
|
||
This Stage only initializes the node. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- node-initialize.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
apiVersion: kwok.x-k8s.io/v1alpha1 | ||
kind: Stage | ||
metadata: | ||
name: node-initialize | ||
spec: | ||
resourceRef: | ||
apiGroup: v1 | ||
kind: Node | ||
selector: | ||
matchExpressions: | ||
- key: '.status.conditions.[] | select( .type == "Ready" ) | .status' | ||
operator: 'NotIn' | ||
values: | ||
- 'True' | ||
next: | ||
statusTemplate: | | ||
{{ $now := Now }} | ||
{{ $lastTransitionTime := or .creationTimestamp $now }} | ||
conditions: | ||
{{ range NodeConditions }} | ||
- lastHeartbeatTime: {{ $now | Quote }} | ||
lastTransitionTime: {{ $lastTransitionTime | Quote }} | ||
message: {{ .message | Quote }} | ||
reason: {{ .reason | Quote }} | ||
status: {{ .status | Quote }} | ||
type: {{ .type | Quote}} | ||
{{ end }} | ||
addresses: | ||
{{ with .status.addresses }} | ||
{{ YAML . 1 }} | ||
{{ else }} | ||
{{ with NodeIP }} | ||
- address: {{ . | Quote }} | ||
type: InternalIP | ||
{{ end }} | ||
{{ with NodeName }} | ||
- address: {{ . | Quote }} | ||
type: Hostname | ||
{{ end }} | ||
{{ end }} | ||
{{ with NodePort }} | ||
daemonEndpoints: | ||
kubeletEndpoint: | ||
Port: {{ . }} | ||
{{ end }} | ||
allocatable: | ||
{{ with .status.allocatable }} | ||
{{ YAML . 1 }} | ||
{{ else }} | ||
cpu: 1k | ||
memory: 1Ti | ||
pods: 1M | ||
{{ end }} | ||
capacity: | ||
{{ with .status.capacity }} | ||
{{ YAML . 1 }} | ||
{{ else }} | ||
cpu: 1k | ||
memory: 1Ti | ||
pods: 1M | ||
{{ end }} | ||
{{ with .status.nodeInfo }} | ||
nodeInfo: | ||
architecture: {{ with .architecture }} {{ . }} {{ else }} "amd64" {{ end }} | ||
bootID: {{ with .bootID }} {{ . }} {{ else }} "" {{ end }} | ||
containerRuntimeVersion: {{ with .containerRuntimeVersion }} {{ . }} {{ else }} "kwok-{{ Version }}" {{ end }} | ||
kernelVersion: {{ with .kernelVersion }} {{ . }} {{ else }} "kwok-{{ Version }}" {{ end }} | ||
kubeProxyVersion: {{ with .kubeProxyVersion }} {{ . }} {{ else }} "kwok-{{ Version }}" {{ end }} | ||
kubeletVersion: {{ with .kubeletVersion }} {{ . }} {{ else }} "kwok-{{ Version }}" {{ end }} | ||
machineID: {{ with .machineID }} {{ . }} {{ else }} "" {{ end }} | ||
operatingSystem: {{ with .operatingSystem }} {{ . }} {{ else }} "linux" {{ end }} | ||
osImage: {{ with .osImage }} {{ . }} {{ else }} "" {{ end }} | ||
systemUUID: {{ with .systemUUID }} {{ . }} {{ else }} "" {{ end }} | ||
{{ end }} | ||
phase: Running |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Node Heartbeat Stage (DEPRECATED) | ||
|
||
This Stage configures the node heartbeat, only for prior to v0.3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- node-heartbeat.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: kwok.x-k8s.io/v1alpha1 | ||
kind: Stage | ||
metadata: | ||
name: node-heartbeat | ||
spec: | ||
resourceRef: | ||
apiGroup: v1 | ||
kind: Node | ||
selector: | ||
matchExpressions: | ||
- key: '.status.phase' | ||
operator: 'In' | ||
values: | ||
- 'Running' | ||
- key: '.status.conditions.[] | select( .type == "Ready" ) | .status' | ||
operator: 'In' | ||
values: | ||
- 'True' | ||
delay: | ||
durationMilliseconds: 20000 | ||
jitterDurationMilliseconds: 25000 | ||
next: | ||
statusTemplate: | | ||
{{ $now := Now }} | ||
{{ $lastTransitionTime := or .creationTimestamp $now }} | ||
conditions: | ||
{{ range NodeConditions }} | ||
- lastHeartbeatTime: {{ $now | Quote }} | ||
lastTransitionTime: {{ $lastTransitionTime | Quote }} | ||
message: {{ .message | Quote }} | ||
reason: {{ .reason | Quote }} | ||
status: {{ .status | Quote }} | ||
type: {{ .type | Quote }} | ||
{{ end }} | ||
immediateNextStage: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Pod Fast Stage | ||
|
||
These Stages make the pod ready, completed or deleted. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- pod-ready.yaml | ||
- pod-complete.yaml | ||
- pod-delete.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apiVersion: kwok.x-k8s.io/v1alpha1 | ||
kind: Stage | ||
metadata: | ||
name: pod-complete | ||
spec: | ||
resourceRef: | ||
apiGroup: v1 | ||
kind: Pod | ||
selector: | ||
matchExpressions: | ||
- key: '.metadata.deletionTimestamp' | ||
operator: 'DoesNotExist' | ||
- key: '.status.phase' | ||
operator: 'In' | ||
values: | ||
- 'Running' | ||
- key: '.metadata.ownerReferences.[].kind' | ||
operator: 'In' | ||
values: | ||
- 'Job' | ||
next: | ||
statusTemplate: | | ||
{{ $now := Now }} | ||
{{ $root := . }} | ||
containerStatuses: | ||
{{ range $index, $item := .spec.containers }} | ||
{{ $origin := index $root.status.containerStatuses $index }} | ||
- image: {{ $item.image | Quote }} | ||
name: {{ $item.name | Quote }} | ||
ready: false | ||
restartCount: 0 | ||
started: false | ||
state: | ||
terminated: | ||
exitCode: 0 | ||
finishedAt: {{ $now | Quote }} | ||
reason: Completed | ||
startedAt: {{ $now | Quote }} | ||
{{ end }} | ||
phase: Succeeded |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: kwok.x-k8s.io/v1alpha1 | ||
kind: Stage | ||
metadata: | ||
name: pod-delete | ||
spec: | ||
resourceRef: | ||
apiGroup: v1 | ||
kind: Pod | ||
selector: | ||
matchExpressions: | ||
- key: '.metadata.deletionTimestamp' | ||
operator: 'Exists' | ||
next: | ||
finalizers: | ||
empty: true | ||
delete: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
apiVersion: kwok.x-k8s.io/v1alpha1 | ||
kind: Stage | ||
metadata: | ||
name: pod-ready | ||
spec: | ||
resourceRef: | ||
apiGroup: v1 | ||
kind: Pod | ||
selector: | ||
matchExpressions: | ||
- key: '.metadata.deletionTimestamp' | ||
operator: 'DoesNotExist' | ||
- key: '.status.podIP' | ||
operator: 'DoesNotExist' | ||
next: | ||
statusTemplate: | | ||
{{ $now := Now }} | ||
conditions: | ||
- lastTransitionTime: {{ $now | Quote }} | ||
status: "True" | ||
type: Initialized | ||
- lastTransitionTime: {{ $now | Quote }} | ||
status: "True" | ||
type: Ready | ||
- lastTransitionTime: {{ $now | Quote }} | ||
status: "True" | ||
type: ContainersReady | ||
{{ range .spec.readinessGates }} | ||
- lastTransitionTime: {{ $now | Quote }} | ||
status: "True" | ||
type: {{ .conditionType | Quote }} | ||
{{ end }} | ||
containerStatuses: | ||
{{ range .spec.containers }} | ||
- image: {{ .image | Quote }} | ||
name: {{ .name | Quote }} | ||
ready: true | ||
restartCount: 0 | ||
state: | ||
running: | ||
startedAt: {{ $now | Quote }} | ||
{{ end }} | ||
initContainerStatuses: | ||
{{ range .spec.initContainers }} | ||
- image: {{ .image | Quote }} | ||
name: {{ .name | Quote }} | ||
ready: true | ||
restartCount: 0 | ||
state: | ||
terminated: | ||
exitCode: 0 | ||
finishedAt: {{ $now | Quote }} | ||
reason: Completed | ||
startedAt: {{ $now | Quote }} | ||
{{ end }} | ||
hostIP: {{ NodeIPWith .spec.nodeName | Quote }} | ||
podIP: {{ PodIPWith .spec.nodeName ( or .spec.hostNetwork false ) ( or .metadata.uid "" ) ( or .metadata.name "" ) ( or .metadata.namespace "" ) | Quote }} | ||
phase: Running | ||
startTime: {{ $now | Quote }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Pod General Stage (WIP) | ||
|
||
These Stages simulate real Pod behavior as closely as possible in the future, | ||
which is not perfect at the moment, so the refinement of this configuration is still a *Work In Progress*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- pod-create.yaml | ||
- pod-init-container-running.yaml | ||
- pod-init-container-completed.yaml | ||
- pod-ready.yaml | ||
- pod-complete.yaml | ||
- pod-remove-finalizer.yaml | ||
- pod-delete.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
apiVersion: kwok.x-k8s.io/v1alpha1 | ||
kind: Stage | ||
metadata: | ||
name: pod-complete | ||
spec: | ||
resourceRef: | ||
apiGroup: v1 | ||
kind: Pod | ||
selector: | ||
matchExpressions: | ||
- key: '.metadata.deletionTimestamp' | ||
operator: 'DoesNotExist' | ||
- key: '.status.phase' | ||
operator: 'In' | ||
values: | ||
- 'Running' | ||
- key: '.status.conditions.[] | select( .type == "Ready" ) | .status' | ||
operator: 'In' | ||
values: | ||
- 'True' | ||
- key: '.metadata.ownerReferences.[].kind' | ||
operator: 'In' | ||
values: | ||
- 'Job' | ||
weight: 1 | ||
delay: | ||
durationMilliseconds: 1000 | ||
jitterDurationMilliseconds: 5000 | ||
next: | ||
delete: false | ||
statusTemplate: | | ||
{{ $now := Now }} | ||
{{ $root := . }} | ||
containerStatuses: | ||
{{ range $index, $item := .spec.containers }} | ||
{{ $origin := index $root.status.containerStatuses $index }} | ||
- image: {{ $item.image | Quote }} | ||
name: {{ $item.name | Quote }} | ||
ready: true | ||
restartCount: 0 | ||
started: false | ||
state: | ||
terminated: | ||
exitCode: 0 | ||
finishedAt: {{ $now | Quote }} | ||
reason: Completed | ||
startedAt: {{ $now | Quote }} | ||
{{ end }} | ||
phase: Succeeded |
Oops, something went wrong.