-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile: fix kwok installation (#3561)
Signed-off-by: zhangzujian <[email protected]>
- Loading branch information
1 parent
db2aeeb
commit acb9e97
Showing
5 changed files
with
2,188 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 was deleted.
Oops, something went wrong.
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,259 @@ | ||
apiVersion: kwok.x-k8s.io/v1alpha1 | ||
kind: Stage | ||
metadata: | ||
name: node-heartbeat-with-lease | ||
spec: | ||
delay: | ||
durationMilliseconds: 600000 | ||
jitterDurationMilliseconds: 610000 | ||
next: | ||
statusTemplate: | | ||
{{ $now := Now }} | ||
{{ $lastTransitionTime := or .metadata.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 }} | ||
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" | ||
--- | ||
apiVersion: kwok.x-k8s.io/v1alpha1 | ||
kind: Stage | ||
metadata: | ||
name: node-initialize | ||
spec: | ||
next: | ||
statusTemplate: | | ||
{{ $now := Now }} | ||
{{ $lastTransitionTime := or .metadata.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 | ||
resourceRef: | ||
apiGroup: v1 | ||
kind: Node | ||
selector: | ||
matchExpressions: | ||
- key: .status.conditions.[] | select( .type == "Ready" ) | .status | ||
operator: NotIn | ||
values: | ||
- "True" | ||
--- | ||
apiVersion: kwok.x-k8s.io/v1alpha1 | ||
kind: Stage | ||
metadata: | ||
name: pod-complete | ||
spec: | ||
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 | ||
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 | ||
--- | ||
apiVersion: kwok.x-k8s.io/v1alpha1 | ||
kind: Stage | ||
metadata: | ||
name: pod-delete | ||
spec: | ||
next: | ||
delete: true | ||
finalizers: | ||
empty: true | ||
resourceRef: | ||
apiGroup: v1 | ||
kind: Pod | ||
selector: | ||
matchExpressions: | ||
- key: .metadata.deletionTimestamp | ||
operator: Exists | ||
--- | ||
apiVersion: kwok.x-k8s.io/v1alpha1 | ||
kind: Stage | ||
metadata: | ||
name: pod-ready | ||
spec: | ||
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: {{ index .metadata.annotations "ovn.kubernetes.io/ip_address" }} | ||
phase: Running | ||
startTime: {{ $now | Quote }} | ||
resourceRef: | ||
apiGroup: v1 | ||
kind: Pod | ||
selector: | ||
matchExpressions: | ||
- key: .metadata.deletionTimestamp | ||
operator: DoesNotExist | ||
- key: .status.podIP | ||
operator: DoesNotExist | ||
- key: .metadata.annotations."ovn.kubernetes.io/routed" | ||
operator: In | ||
values: | ||
- "true" |
Oops, something went wrong.