mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
47bf1e8612
* add instructions Signed-off-by: ShutingZhao <shuting@nirmata.com> * add etcd sizes for pods Signed-off-by: ShutingZhao <shuting@nirmata.com> * add kwok script Signed-off-by: ShutingZhao <shuting@nirmata.com> * update kwok script Signed-off-by: ShutingZhao <shuting@nirmata.com> * update node creation script Signed-off-by: ShutingZhao <shuting@nirmata.com> * add script to calculate size Signed-off-by: ShutingZhao <shuting@nirmata.com> * update Signed-off-by: ShutingZhao <shuting@nirmata.com> * update Signed-off-by: ShutingZhao <shuting@nirmata.com> * update Signed-off-by: ShutingZhao <shuting@nirmata.com> * update Signed-off-by: ShutingZhao <shuting@nirmata.com> * update Signed-off-by: ShutingZhao <shuting@nirmata.com> * linter fixes Signed-off-by: ShutingZhao <shuting@nirmata.com> --------- Signed-off-by: ShutingZhao <shuting@nirmata.com>
24 lines
711 B
Bash
Executable file
24 lines
711 B
Bash
Executable file
#!/bin/bash
|
|
|
|
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
|
|
|
|
# Variables preparation
|
|
KWOK_WORK_DIR=$(mktemp -d)
|
|
KWOK_REPO=kubernetes-sigs/kwok
|
|
KWOK_LATEST_RELEASE=$(curl "https://api.github.com/repos/${KWOK_REPO}/releases/latest" | jq -r '.tag_name')
|
|
|
|
# Render kustomization yaml
|
|
cat <<EOF > "${KWOK_WORK_DIR}/kustomization.yaml"
|
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
kind: Kustomization
|
|
images:
|
|
- name: registry.k8s.io/kwok/kwok
|
|
newTag: "${KWOK_LATEST_RELEASE}"
|
|
resources:
|
|
- "https://github.com/${KWOK_REPO}/kustomize/kwok?ref=${KWOK_LATEST_RELEASE}"
|
|
EOF
|
|
|
|
kubectl kustomize "${KWOK_WORK_DIR}" > "${KWOK_WORK_DIR}/kwok.yaml"
|
|
|
|
# create `kwok` deployment
|
|
kubectl apply -f "${KWOK_WORK_DIR}/kwok.yaml"
|