Skip to content

Commit 2c65128

Browse files
committed
Update for latest kwok
Signed-off-by: James Busche <[email protected]>
1 parent 91b76da commit 2c65128

File tree

5 files changed

+24
-62
lines changed

5 files changed

+24
-62
lines changed

test/perf-test/cleanup-mcad-kwok.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
for i in `kubectl get appwrapper -n default |grep fake-defaultaw | awk '{print $1}'`; do kubectl delete appwrapper $i -n default ; done
3+
for i in `kubectl get appwrappers.workload.codeflare.dev -n default |grep fake-defaultaw | awk '{print $1}'`; do kubectl delete appwrappers.workload.codeflare.dev $i -n default ; done

test/perf-test/cleanup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
for i in `kubectl get appwrapper -n default |grep defaultaw | awk '{print $1}'`; do kubectl delete appwrapper $i -n default ; done
3+
for i in `kubectl get appwrappers.workload.codeflare.dev -n default |grep defaultaw | awk '{print $1}'`; do kubectl delete appwrappers.workload.codeflare.dev $i -n default ; done

test/perf-test/preempt-exp-kwok.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ spec:
1111
growthType: "exponential"
1212
priority: 9
1313
resources:
14-
Items: []
1514
GenericItems:
1615
- replicas: 1
1716
completionstatus: Complete
@@ -38,7 +37,7 @@ spec:
3837
metadata:
3938
namespace: default
4039
labels:
41-
appwrapper.mcad.ibm.com: "fake-defaultaw-schd-spec-with-timeout-1"
40+
appwrappers.workload.codeflare.dev: "fake-defaultaw-schd-spec-with-timeout-1"
4241
spec:
4342
affinity:
4443
nodeAffinity:

test/perf-test/preempt-exp.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
metadata:
4040
namespace: default
4141
labels:
42-
appwrapper.mcad.ibm.com: "defaultaw-schd-spec-with-timeout-1"
42+
appwrappers.workload.codeflare.dev: "defaultaw-schd-spec-with-timeout-1"
4343
spec:
4444
containers:
4545
- name: defaultaw-schd-spec-with-timeout-1

test/perf-test/simulatingnodesandappwrappers.md

+20-57
Original file line numberDiff line numberDiff line change
@@ -80,40 +80,23 @@ kubectl get pods -n kube-system |grep mcad
8080
brew install jq
8181
```
8282

83-
### 2.2 Install the latest version of Kustomize
83+
### Step 2.2. Install KWOK in your KIND Cluster:
84+
### 2.2.1 Variable Prep:
8485
```
85-
brew install kustomize
86+
# KWOK repository
87+
KWOK_REPO=kubernetes-sigs/kwok
88+
# Get latest
89+
KWOK_LATEST_RELEASE=$(curl "https://api.github.com/repos/${KWOK_REPO}/releases/latest" | jq -r '.tag_name')
8690
```
87-
88-
### Step 2.3. Install KWOK in your KIND Cluster:
89-
### 2.3.1 Variable Prep:
90-
```
91-
export KWOK_WORK_DIR=$(mktemp -d)
92-
export KWOK_REPO=kubernetes-sigs/kwok
93-
export KWOK_LATEST_RELEASE=$(curl "https://api.github.com/repos/${KWOK_REPO}/releases/latest" | jq -r '.tag_name')
94-
```
95-
### 2.3.2 Render kustomization yaml
96-
```
97-
cat <<EOF > "${KWOK_WORK_DIR}/kustomization.yaml"
98-
apiVersion: kustomize.config.k8s.io/v1beta1
99-
kind: Kustomization
100-
images:
101-
- name: registry.k8s.io/kwok/kwok
102-
newTag: "${KWOK_LATEST_RELEASE}"
103-
resources:
104-
- "https://github.com/${KWOK_REPO}/kustomize/kwok?ref=${KWOK_LATEST_RELEASE}"
105-
EOF
106-
```
107-
### 2.3.3 Render it with the prepared variables.
91+
### 2.2.2 Deployment kwok and set up CRDs
10892
```
109-
kubectl kustomize "${KWOK_WORK_DIR}" > "${KWOK_WORK_DIR}/kwok.yaml"
93+
kubectl apply -f "https://github.com/${KWOK_REPO}/releases/download/${KWOK_LATEST_RELEASE}/kwok.yaml"
11094
```
111-
### Step 2.4 Install the KWOK Controller in kube-system namespace:
112-
### 2.4.1 Apply your rendered yaml file from step 1.3 above:
95+
### 2.3.3 Set up default CRs of Stages (required)
11396
```
114-
kubectl apply -f "${KWOK_WORK_DIR}/kwok.yaml"
97+
kubectl apply -f "https://github.com/${KWOK_REPO}/releases/download/${KWOK_LATEST_RELEASE}/stage-fast.yaml"
11598
```
116-
### 2.4.2 Check to make sure the kwok controller started:
99+
### 2.4 Check to make sure the kwok controller started:
117100
```
118101
kubectl get pods -n kube-system |grep kwok-controller
119102
```
@@ -170,43 +153,23 @@ kubectl get pods -A |grep mcad-controller
170153
yum install make podman git tree jq go bc -y
171154
```
172155

173-
### 0.5 Install the latest version of Kustomize
174-
```
175-
OS=$(uname)
176-
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
177-
mv kustomize /usr/local/bin
178-
kustomize version
179-
```
180-
181156
## Step 1. Install KWOK in Cluster:
182157
### 1.1 Variable Prep:
183158
```
184-
export KWOK_WORK_DIR=$(mktemp -d)
185-
export KWOK_REPO=kubernetes-sigs/kwok
186-
export KWOK_LATEST_RELEASE=$(curl "https://api.github.com/repos/${KWOK_REPO}/releases/latest" | jq -r '.tag_name')
187-
```
188-
### 1.2 Render kustomization yaml
189-
```
190-
cat <<EOF > "${KWOK_WORK_DIR}/kustomization.yaml"
191-
apiVersion: kustomize.config.k8s.io/v1beta1
192-
kind: Kustomization
193-
images:
194-
- name: registry.k8s.io/kwok/kwok
195-
newTag: "${KWOK_LATEST_RELEASE}"
196-
resources:
197-
- "https://github.com/${KWOK_REPO}/kustomize/kwok?ref=${KWOK_LATEST_RELEASE}"
198-
EOF
159+
# KWOK repository
160+
KWOK_REPO=kubernetes-sigs/kwok
161+
# Get latest
162+
KWOK_LATEST_RELEASE=$(curl "https://api.github.com/repos/${KWOK_REPO}/releases/latest" | jq -r '.tag_name')
199163
```
200-
### 1.3 Render it with the prepared variables.
164+
### 1.2 Deployment kwok and set up CRDs
201165
```
202-
kubectl kustomize "${KWOK_WORK_DIR}" > "${KWOK_WORK_DIR}/kwok.yaml"
166+
kubectl apply -f "https://github.com/${KWOK_REPO}/releases/download/${KWOK_LATEST_RELEASE}/kwok.yaml"
203167
```
204-
## Step 2. Install the KWOK Controller in kube-system namespace:
205-
### 2.1 Apply your rendered yaml file from step 1.3 above:
168+
### 1.3 Set up default CRs of Stages (required)
206169
```
207-
kubectl apply -f "${KWOK_WORK_DIR}/kwok.yaml"
170+
kubectl apply -f "https://github.com/${KWOK_REPO}/releases/download/${KWOK_LATEST_RELEASE}/stage-fast.yaml"
208171
```
209-
### 2.2 Check to make sure the kwok controller started:
172+
### 2. Check to make sure the kwok controller started:
210173
```
211174
kubectl get pods -n kube-system |grep kwok-controller
212175
```

0 commit comments

Comments
 (0)