-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.sh
More file actions
executable file
·59 lines (50 loc) · 1.6 KB
/
script.sh
File metadata and controls
executable file
·59 lines (50 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
set -eux
# install yoke cli
go install github.com/yokecd/yoke/cmd/yoke@latest
# create a local cluster
kind delete cluster
kind create cluster --config - <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
featureGates:
InformerResourceVersion: true
StorageVersionMigrator: true
APIServerIdentity: true
runtimeConfig:
'storagemigration.k8s.io/v1alpha1': true
EOF
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
kubectl patch -n kube-system deployment metrics-server --type=json -p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--kubelet-insecure-tls"}]'
# install the atc
yoke takeoff -debug -wait 1m --create-namespace --namespace atc atc oci://ghcr.io/yokecd/atc-installer:latest
# install the yokcd/examples Backend-Airway
yoke takeoff -debug -wait 1m backendairway "https://github.com/yokecd/examples/releases/download/latest/atc_backend_airway.wasm.gz"
# You are done! You can now create Backends!
kubectl apply -f - <<EOF
apiVersion: examples.com/v1
kind: Backend
metadata:
name: nginx
spec:
image: nginx:latest
replicas: 2
labels:
originalVersion: v1
EOF
# update the backendairway to use the v2 version.
# yoke takeoff -wait 30s backendairway "https://github.com/yokecd/examples/releases/download/latest/atc_backend_airway_v2.wasm.gz"
# Now we can create v2 versions
# kubectl apply -f - <<EOF
# apiVersion: examples.com/v2
# kind: Backend
# metadata:
# name: nginx-v2
# spec:
# img: nginx:latest
# replicas: 2
# meta:
# labels:
# originalVersion: v1
# annotations:
# cool: 'yes'
# EOF