From 67a76d19bd5d2fad18dba526d75f1f4f6416ce07 Mon Sep 17 00:00:00 2001 From: Mingchen Dai Date: Mon, 30 Sep 2024 10:11:40 +0000 Subject: [PATCH] Added Shell scirpts --- step1-deploy-operator.sh | 14 ++++++++++++++ step2-undeploy-operator.sh | 9 +++++++++ 2 files changed, 23 insertions(+) create mode 100644 step1-deploy-operator.sh create mode 100644 step2-undeploy-operator.sh diff --git a/step1-deploy-operator.sh b/step1-deploy-operator.sh new file mode 100644 index 0000000..f927963 --- /dev/null +++ b/step1-deploy-operator.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# 首先将 CRLF 统一替换为 LF: sed -i 's/\r$//' *.sh + +## 1. Install CRDs into the K8s cluster specified in ~/.kube/config. +make install + +## 2. Deploy controller to the K8s cluster specified in ~/.kube/config. +make deploy IMG=devstar.cn/devstar/devcontainer-operator:build-15c626593b1d94944ed6515b0ed6c32c939c6efc + +# 部署效果: +# kubectl get deployment -n devcontainer-operator-system devcontainer-operator-controller-manager +# NAME READY UP-TO-DATE AVAILABLE AGE +# devcontainer-operator-controller-manager 1/1 1 1 50m diff --git a/step2-undeploy-operator.sh b/step2-undeploy-operator.sh new file mode 100644 index 0000000..d715fe5 --- /dev/null +++ b/step2-undeploy-operator.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# 首先将 CRLF 统一替换为 LF: sed -i 's/\r$//' *.sh + +## 1. Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. +make undeploy + +## 2. Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. +make uninstall