Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an App installing CAPO controllers #598

Closed
10 tasks done
Tracked by #600
kopiczko opened this issue Oct 19, 2021 · 1 comment
Closed
10 tasks done
Tracked by #600

Create an App installing CAPO controllers #598

kopiczko opened this issue Oct 19, 2021 · 1 comment
Assignees
Labels

Comments

@kopiczko
Copy link

kopiczko commented Oct 19, 2021

Tasks:

  • delete app
  • recreate from template repo
  • create pr based on CAPV controller app
  • link PR to this issue
  • sync with team phoenix
  • add crd-install job to CAPO controller app (example)
    • adopt existing (clusterctl based ) deployment
    • fix RBAC
    • create make targets
    • testing

Rollout

Prereq: Check if namespaces other than giantswarm are ok for CAPI/CAPO resources - slack thread

1. CAPO

  1. ensure CAPO-version match with current main branch of capo-app

  2. apply labels on existing CAPO objects to make app-operator workable on existing resources

    kubectl patch mutatingwebhookconfiguration capo-mutating-webhook-configuration --type=json -p='[{"op": "add", "path": "/metadata/labels/app.kubernetes.io~1managed-by", "value": "Helm"},{"op":"add","path":"/metadata/annotations","value":{}},{"op": "add", "path": "/metadata/annotations/meta.helm.sh~1release-name", "value": "cluster-api-provider-openstack"},{"op": "add", "path": "/metadata/annotations/meta.helm.sh~1release-namespace", "value": "giantswarm"}]'
    kubectl patch validatingwebhookconfiguration capo-validating-webhook-configuration --type=json -p='[{"op": "add", "path": "/metadata/labels/app.kubernetes.io~1managed-by", "value": "Helm"},{"op":"add","path":"/metadata/annotations","value":{}},{"op": "add", "path": "/metadata/annotations/meta.helm.sh~1release-name", "value": "cluster-api-provider-openstack"},{"op": "add", "path": "/metadata/annotations/meta.helm.sh~1release-namespace", "value": "giantswarm"}]'
    
  3. scale existing CAPO deployment to zero

     k scale deploy/capo-controller-manager --replicas=0 -n capo-system 
    
  4. delete webhook (as we rename with prefix zzz- capi will still use the old webhook as of alphabetic ordering)

     k delete mutatingwebhookconfigurations capo-mutating-webhook-configuration         
    
  5. release CAPO app (will trigger the rollout)

  6. cleanup leftover resources

     k delete clusterrole capo-system-capo-manager-role
     k delete clusterrolebinding capo-system-capo-manager-rolebinding
     k delete namespace capo-system
    
  7. After all MCs are done modify capo-mc-bootstrap to deploy CAPO via app

@kopiczko
Copy link
Author

kopiczko commented May 12, 2022

Today we upgraded two clusters with @bavarianbidi

  • gubble
  • halley

I'm planning to do

  • helios
  • hyperion

later today.

Then @bavarianbidi is going to release the cluster-api-provider-openstack-app repo to start managing the app (we create manually for now) with flux and adapt mc-bootstrap to use the app on fresh MCs.

Currently the app looks like this (halley):

$ k --context gs-halley get app -n giantswarm cluster-api-provider-openstack
NAME                             INSTALLED VERSION                                CREATED AT   LAST DEPLOYED   STATUS
cluster-api-provider-openstack   0.0.0-72ae9d9729ad6bb7fd5a09b5920b3c77ff7828a8   25m          25m             deployed

@kopiczko kopiczko self-assigned this May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants