Comments (6)
# oom.yaml
apiVersion: kwok.x-k8s.io/v1alpha1
kind: Stage
metadata:
name: oom
spec:
resourceRef:
apiGroup: v1
kind: Pod
selector:
matchExpressions:
- key: .status.phase
operator: In
values:
- Running
matchExtraResources:
- resourceRef:
apiGroup: custom.metrics.k8s.io/v1beta2
kind: MetricValue
selector:
matchCEL:
- expression: |
self.metadata.name == target.metadata.name &&
self.metadata.namespace == target.metadata.namespace &&
OOM(self.spec.containers, target.spec.containers)
next:
patches:
- subresource: status
root: status
template: |
{{ $now := Now }}
{{ $root := target }}
conditions:
- lastProbeTime: null
lastTransitionTime: {{ $now | Quote }}
message: ''
reason: ''
status: "False"
type: Ready
- lastProbeTime: null
lastTransitionTime: {{ $now | Quote }}
message: ''
reason: ''
status: "True"
type: OutOfMemory
containerStatuses:
{{ range $index, $item := .spec.containers }}
{{ $origin := index $root.status.containerStatuses $index }}
- image: {{ $item.image | Quote }}
name: {{ $item.name | Quote }}
ready: false
restartCount: {{ $origin.restartCount }}
started: false
state:
terminated:
exitCode: 137
finishedAt: {{ $now | Quote }}
reason: OOMKilled
startedAt: {{ $now | Quote }}
{{ end }}
phase: Failed
from kwok.
# node-image-exists.yaml
apiVersion: kwok.x-k8s.io/v1alpha1
kind: Stage
metadata:
name: node-image-exists
spec:
resourceRef:
apiGroup: v1
kind: Node
selector:
matchExtraResources:
- resourceRef:
apiGroup: v1
kind: Pod
selector:
matchExpressions:
- key: .status.phase
operator: In
values:
- Running
- ContainerCreating
next:
patches:
- subresource: status
root: status
template: |
{{ $exist := list }}
images:
{{ range .status.images }}
- names:
{{ range .names }}
{{ $exist = append $exist . }}
- {{ . | Quote }}
{{ end }}
{{ if .sizeBytes }}
sizeBytes: {{ .sizeBytes }}
{{ end }}
{{ end }}
{{ range matchExtraResources }}
{{ range .spec.containers }}
{{ if not (in $exist .image) }}
- names:
- {{ .image | Quote }}
{{ end }}
{{ end }}
{{ end }}
from kwok.
Whats the major difference between Trigger
and Stage v1alpha2
? Do they have any overlap in functionality?
from kwok.
Whats the major difference between
Trigger
andStage v1alpha2
?
Trigger can be thought of as a Stage between different resources.
from kwok.
Redesigning the API to put it in Stage
from kwok.
Related Issues (20)
- Kwok Stage Configs are not in expectation HOT 5
- Failed scheduling a simple pod on a basic (fake) node with Kwok HOT 3
- Add a test for the Stage
- Support helm charts in kwok HOT 5
- Expose etcd port unexpected HOT 6
- [kwokctl] Support for exposing component ports to hosts in container executing HOT 1
- `--kube-feature-gates ` doesn't work in `kwokctl --runtime=kind` (v0.5.1) HOT 4
- Release v0.5.2
- Failing start kube-controller-manager HOT 4
- more general resource lifecycle simulation HOT 2
- API v1alpha2
- kwok managed pods do not respect finalizers and are deleted immediately HOT 3
- Not working in CircleCI HOT 5
- Release v0.5.0
- Do we have document about how to perform Resource usage simulation? HOT 6
- Health check sometimes stops responding in EKS cluster HOT 7
- Delayed stages sometimes not executed HOT 6
- Release v0.5.1
- Support volume provisioner HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kwok.