Skip to content
Snippets Groups Projects

Resolve "Gitlab doesn't detect the deployment pods after K8s cluster upgrade to v1.22"

All threads resolved!

What does this MR do and why?

The extensions/v1beta1 was removed on Kubernetes 1.22: https://kubernetes.io/blog/2021/07/14/upcoming-changes-in-kubernetes-1-22/

Whenever we call extensions_client.discover the code raises a 404 not found and we fail to load deployments and ingresses. Consequently our deploy_boards also fail.

The fix is simply to not use this client anymore, since we don't need to look for resources in this APIs anymore. We should simply use the new APIs as suggested by the Kubernetes 1.22 documentation. That is networking.k8s.io/v1 for ingresses and apps/v1 for deployments. This also works in 1.21 because these APIs were already available and being used by us on our Auto DevOps chart.

Related Issues

#357612 (closed)

Screenshots or screen recordings

Deployed the environment to K8s 1.22

Deploy Boards loads the pods correctly.

deploy_test

When toggling between master and this branch we unsee/see the pods.

branch_test

How to set up and validate locally

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #357612 (closed)

Edited by Hordur Freyr Yngvason

Merge request reports

Merged results pipeline #570509127 passed

Pipeline: GitLab

#570513178

    Merged results pipeline passed for 53fc0e3e

    Test coverage 85.39% (-1.05%) from 2 jobs
    Approved by

    Merged by João Alexandre CunhaJoão Alexandre Cunha 2 years ago (Jun 22, 2022 8:46pm UTC)

    Pipeline #570663933 passed

    Pipeline passed for 75d50f74 on master

    Test coverage 76.05% (-1.05%) from 2 jobs
    8 environments impacted.

    Activity

    Filter activity
    • Approvals
    • Assignees & reviewers
    • Comments (from bots)
    • Comments (from users)
    • Commits & branches
    • Edits
    • Labels
    • Lock status
    • Mentions
    • Merge request status
    • Tracking
    Please register or sign in to reply
    Loading