Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-8079

DBaaS: Percona Operators inside Kubernetes cluster managed by PMM can now be upgraded

Details

    • New Feature
    • Status: Done
    • Medium
    • Resolution: Fixed
    • None
    • 2.22.0
    • DBaaS controller
    • None

    Description

      User story:
      As a PMM admin, I need to be able to update k8s operators in my K8s cluster so that I can leverage fixes and new features coming with this version of the operator

      UI/UX:
      TBD

      Acceptance criteria

      • User can initiate Operator upgrade
      • User able to see the progress/status of the Upgrade process
      • upgrade operator to N+1 version 
      • user able to see the logs of the upgrade operation 
      • Other related components also updated 

      Out of scope:

      • expose the new features on PMM UI without pmm server update
      • update of the operator without user interaction
      • Rolling several upgrades at once

      Suggested implementation:
      TBD

      How to test:
      FB: https://github.com/Percona-Lab/pmm-submodules/pull/1901

      1. Register Kubernetes cluster, Kubernetes list should show there are operators installed.
      2. Delete operator installed when registering the cluster: curl -L https://raw.githubusercontent.com/percona/percona-xtradb-cluster-operator/v1.8.0/deploy/bundle.yaml | kubectl delete -f -
      3. Wait until it's deleted and apply old operator: curl -L https://raw.githubusercontent.com/percona/percona-xtradb-cluster-operator/v1.7.0/deploy/bundle.yaml | kubectl apply -f -
      4. Create database cluster with old version of operator, we will need this later:  
        curl 'http://localhost/v1/management/DBaaS/XtraDBCluster/Create' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Content-Type: application/json;charset=utf-8' -H 'Origin: https://localhost' -H 'Connection: keep-alive' -H 'Referer: https://localhost/graph/dbaas/dbclusters' -H 'Cookie: grafana_session=3c8c0b0ab4665ec5a4828237b71834ac' -H 'TE: Trailers' --data-raw '{"kubernetes_cluster_name":"minikube","name":"dbcluster","params":{"cluster_size":3,"pxc":{"compute_resources":{"cpu_m":1000,"memory_bytes":1000000000},"disk_size":1000000000,"image":"percona/percona-xtradb-cluster:8.0.21-12.1"},"haproxy":{"compute_resources":{"cpu_m":1000,"memory_bytes":2000000000}}}}'
        
      5. At kubernetes listing page, you should see there is an update available for pxc operator. Triger the upgrade.
      6. You should see old operator pod getting terminated, new starting up. Check the image of the new operator pod to see it's really 1.8.0.
      7. Also the database cluster created in point 4. should contain updated versions of images and also CRVersion should be updated. Basically everywhere where was mentioned older version of operator '1.7.0' should be now '1.8.0'.

       

      Details:
      TBD

      Attachments

        Issue Links

          Activity

            People

              jan.prukner Jan Prukner (Inactive)
              roma.novikov Roma Novikov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 4 days
                  4d

                  Smart Checklist