open-component-model / ocm

Open Component Model (Software Bill of Delivery Toolset)
https://ocm.software
Apache License 2.0
31 stars 19 forks source link

feat: add uninstall command to the controller #766

Closed Skarlso closed 2 months ago

Skarlso commented 2 months ago

Description

Closes https://github.com/open-component-model/ocm-project/issues/37

What type of PR is this? (check all applicable)

Related Tickets & Documents

Screenshots

Added tests?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Added to documentation?

Checklist:

github-actions[bot] commented 2 months ago

Mend Scan Summary: :x:

Repository: open-component-model/ocm

VIOLATION DESCRIPTION NUMBER OF VIOLATIONS
HIGH/CRITICAL SECURITY VULNERABILITIES 1
MAJOR UPDATES AVAILABLE 0
LICENSE REQUIRES REVIEW 4
HIGH RISK LICENSES 9
RESTRICTIED LICENSE FOR ON-PREMISE DELIVERY 0

Detailed Logs: mend-scan-> Generate Report Mend UI

ocmbot[bot] commented 2 months ago

Integration Tests for e05a5a083e96085114b24d03925f614683d9e8cc run with result: Success ✅!

Skarlso commented 2 months ago
./bin/ocm controller uninstall
β–Ί uninstalling ocm-controller with version latest
β–Ί got latest version "v0.21.1"
βœ” successfully fetched install file
β–Ί applying to cluster...
β–Ί waiting for ocm deployment to be deleted
βœ” ocm-controller successfully uninstalled

Leaving the prereqs

➜  ocm-controller git:(fix-version-in-install) k get pods -A
NAMESPACE            NAME                                             READY   STATUS    RESTARTS   AGE
cert-manager         cert-manager-6954d7bbbf-rq2s7                    1/1     Running   0          21m
cert-manager         cert-manager-cainjector-84bdff4846-xkxx7         1/1     Running   0          21m
cert-manager         cert-manager-webhook-85b6b76d9b-kwxdj            1/1     Running   0          21m
flux-system          helm-controller-57d8957947-b7j4l                 1/1     Running   0          15m
flux-system          kustomize-controller-858996fc8d-shnvf            1/1     Running   0          15m
flux-system          notification-controller-ddf44665d-q4gcq          1/1     Running   0          15m
flux-system          source-controller-56ccbf8db8-vfp8x               1/1     Running   0          15m
kube-system          coredns-5d78c9869d-6snbs                         1/1     Running   0          33m
kube-system          coredns-5d78c9869d-tbgs7                         1/1     Running   0          33m
kube-system          etcd-ocm-test-control-plane                      1/1     Running   0          33m
kube-system          kindnet-cb6jf                                    1/1     Running   0          33m
kube-system          kube-apiserver-ocm-test-control-plane            1/1     Running   0          33m
kube-system          kube-controller-manager-ocm-test-control-plane   1/1     Running   0          33m
kube-system          kube-proxy-tkjtt                                 1/1     Running   0          33m
kube-system          kube-scheduler-ocm-test-control-plane            1/1     Running   0          33m
local-path-storage   local-path-provisioner-6bc4bddd6b-gfk9t          1/1     Running   0          33m
Skarlso commented 2 months ago

and with deleting the prerequisits

./bin/ocm controller uninstall -p
β–Ί uninstalling ocm-controller with version latest
β–Ί got latest version "v0.21.1"
βœ” successfully fetched install file
β–Ί applying to cluster...
β–Ί waiting for ocm deployment to be deleted
βœ” ocm-controller successfully uninstalled
β–Ί uninstalling cert-manager and issuers
β–Ί uninstalling cert-manager with version v1.13.2
β–Ί remove certificate for internal registry
βœ” successfully fetched install file
β–Ί applying to cluster...
β–Ί waiting for ocm deployment to be deleted
βœ” cert-manager successfully uninstalled
βœ” successfully uninstalled prerequisites
k get pods -A
NAMESPACE            NAME                                             READY   STATUS    RESTARTS   AGE
kube-system          coredns-5d78c9869d-g2v8n                         1/1     Running   0          6m38s
kube-system          coredns-5d78c9869d-ghqj2                         1/1     Running   0          6m38s
kube-system          etcd-ocm-test-control-plane                      1/1     Running   0          6m51s
kube-system          kindnet-vh6kh                                    1/1     Running   0          6m38s
kube-system          kube-apiserver-ocm-test-control-plane            1/1     Running   0          6m51s
kube-system          kube-controller-manager-ocm-test-control-plane   1/1     Running   0          6m51s
kube-system          kube-proxy-xltdq                                 1/1     Running   0          6m38s
kube-system          kube-scheduler-ocm-test-control-plane            1/1     Running   0          6m51s
local-path-storage   local-path-provisioner-6bc4bddd6b-llp57          1/1     Running   0          6m38s
ocmbot[bot] commented 2 months ago

Integration Tests for e05a5a083e96085114b24d03925f614683d9e8cc run with result: Success ✅!