Skip to content

Commit faa2735

Browse files
committed
refactor(cli): switch deploy/undeploy flow from oc to kubectl
- replace oc with kubectl in taskfile deploy and undeploy paths - update README example command accordingly Signed-off-by: Sam DaSilva <sam.ramos.dasilva@gmail.com>
1 parent 763e118 commit faa2735

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ kubectl create -f examples/config.yaml
114114

115115
After creating the `DpuOperatorConfig` CR, you should see the following pods:
116116
```sh
117-
oc get pods -n openshift-dpu-operator -o wide
117+
kubectl get pods -n openshift-dpu-operator -o wide
118118
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
119119
dpu-daemon-rn6mc 1/1 Running 0 22h 192.168.122.218 worker-229 <none> <none>
120120
dpu-daemon-xrrlg 1/1 Running 0 22h 192.168.122.90 worker-229-ptl <none> <none>

taskfile.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ tasks:
7474
vars:
7575
KUBECONFIG: '{{.KUBECONFIG}}'
7676
status:
77-
- NS=$(KUBECONFIG={{.KUBECONFIG}} oc get ns openshift-dpu-operator)
77+
- NS=$(KUBECONFIG={{.KUBECONFIG}} kubectl get ns openshift-dpu-operator)
7878
if [[ -n "$NS" ]]; then false else true fi
7979
cmds:
8080
# this will block untill everything is cleaned up and bringing system back into a clean state as if the operator was never installed
81-
- KUBECONFIG={{.KUBECONFIG}} oc delete -f examples/config.yaml || true
82-
- bin/kustomize build config/default | KUBECONFIG={{.KUBECONFIG}} oc delete --ignore-not-found=true -f -
83-
- KUBECONFIG={{.KUBECONFIG}} oc wait --for=delete ns openshift-dpu-operator --timeout=300s
81+
- KUBECONFIG={{.KUBECONFIG}} kubectl delete -f examples/config.yaml || true
82+
- bin/kustomize build config/default | KUBECONFIG={{.KUBECONFIG}} kubectl delete --ignore-not-found=true -f -
83+
- KUBECONFIG={{.KUBECONFIG}} kubectl wait --for=delete ns openshift-dpu-operator --timeout=300s
8484
- echo "Namespace 'openshift-dpu-operator' has been removed."
8585

8686
undeploy:
@@ -126,12 +126,12 @@ tasks:
126126
vars:
127127
KUBECONFIG_DPU: "{{.KUBECONFIG_DPU}}"
128128
KUBECONFIG_HOST: "{{.KUBECONFIG_HOST}}"
129-
- bin/kustomize build bin | KUBECONFIG="{{.KUBECONFIG_DPU}}" oc apply -f -
130-
- bin/kustomize build bin | KUBECONFIG="{{.KUBECONFIG_HOST}}" oc apply -f -
131-
- KUBECONFIG="{{.KUBECONFIG_DPU}}" oc -n openshift-dpu-operator wait --for=condition=Available deployment/dpu-operator-controller-manager --timeout=300s
132-
- KUBECONFIG="{{.KUBECONFIG_HOST}}" oc -n openshift-dpu-operator wait --for=condition=Available deployment/dpu-operator-controller-manager --timeout=300s
133-
- KUBECONFIG="{{.KUBECONFIG_DPU}}" oc -n openshift-dpu-operator wait --for=condition=ready pod --all --timeout=300s
134-
- KUBECONFIG="{{.KUBECONFIG_HOST}}" oc -n openshift-dpu-operator wait --for=condition=ready pod --all --timeout=300s
129+
- bin/kustomize build bin | KUBECONFIG="{{.KUBECONFIG_DPU}}" kubectl apply -f -
130+
- bin/kustomize build bin | KUBECONFIG="{{.KUBECONFIG_HOST}}" kubectl apply -f -
131+
- KUBECONFIG="{{.KUBECONFIG_DPU}}" kubectl -n openshift-dpu-operator wait --for=condition=Available deployment/dpu-operator-controller-manager --timeout=300s
132+
- KUBECONFIG="{{.KUBECONFIG_HOST}}" kubectl -n openshift-dpu-operator wait --for=condition=Available deployment/dpu-operator-controller-manager --timeout=300s
133+
- KUBECONFIG="{{.KUBECONFIG_DPU}}" kubectl -n openshift-dpu-operator wait --for=condition=ready pod --all --timeout=300s
134+
- KUBECONFIG="{{.KUBECONFIG_HOST}}" kubectl -n openshift-dpu-operator wait --for=condition=ready pod --all --timeout=300s
135135
- echo "DPU operator deployment complete - controller manager and webhook are ready"
136136

137137
deploy-1c:
@@ -141,9 +141,9 @@ tasks:
141141
- task: undeploy-1c
142142
vars:
143143
KUBECONFIG_HOST: "{{.KUBECONFIG_HOST}}"
144-
- bin/kustomize build bin | KUBECONFIG="{{.KUBECONFIG_HOST}}" oc apply -f -
145-
- KUBECONFIG="{{.KUBECONFIG_HOST}}" oc -n openshift-dpu-operator wait --for=condition=Available deployment/dpu-operator-controller-manager --timeout=300s
146-
- KUBECONFIG="{{.KUBECONFIG_HOST}}" oc -n openshift-dpu-operator wait --for=condition=ready pod --all --timeout=300s
144+
- bin/kustomize build bin | KUBECONFIG="{{.KUBECONFIG_HOST}}" kubectl apply -f -
145+
- KUBECONFIG="{{.KUBECONFIG_HOST}}" kubectl -n openshift-dpu-operator wait --for=condition=Available deployment/dpu-operator-controller-manager --timeout=300s
146+
- KUBECONFIG="{{.KUBECONFIG_HOST}}" kubectl -n openshift-dpu-operator wait --for=condition=ready pod --all --timeout=300s
147147

148148
prepare-e2e-test:
149149
cmds:

0 commit comments

Comments
 (0)