Resolve "Gitlab doesn't detect the deployment pods after K8s cluster upgrade to v1.22"
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
Screenshots or screen recordings
Deployed the environment to K8s 1.22
Deploy Boards loads the pods correctly.
When toggling between master and this branch we unsee/see the pods.
How to set up and validate locally
- Have a deployable app.
- Enable these FF to allow you to use the deprecated
certificate_based_clusters
features:Feature.enable(:certificate_based_clusters)
. - Create a 1.22 Kubernetes cluster somewhere.
- Connect it to your GitLab project via https://docs.gitlab.com/ee/user/project/clusters/add_existing_cluster.html#how-to-add-an-existing-cluster.
- Set up Auto DevOps or at least just Auto Deploy in case you already have a docker image.
- Run a pipeline.
- Go to Deployments -> Environments on the left-side menu.
- Check that your pods will show on the screen after awhile.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #357612 (closed)
Merge request reports
Activity
changed milestone to %15.2
assigned to @Alexand
added 19 commits
-
64bd9677...3a5818f9 - 18 commits from branch
master
- c500f41b - Fix deploy boards for Kubernetes 1.22
-
64bd9677...3a5818f9 - 18 commits from branch
Suggested Reviewers (beta)
The individuals below may be good candidates to participate in the review based on various factors.
You can use slash commands in comments to quickly assign
/assign_reviewer @user1
.Suggested Reviewers @rymai
,@a_akgun
,@ashmckenzie
,@stanhu
,@rspeicher
If you do not believe these suggestions are useful, please apply the label Bad Suggested Reviewer. You can also provide feedback for this feature on this issue:
https://gitlab.com/gitlab-org/gitlab/-/issues/357923
.Automatically generated by Suggested Reviewers Bot - an experimental ML-based recommendation engine created by ~"group::applied ml".
Edited by GitLab Reviewer-Recommender Bot1 Warning 42e5c35c: The commit body should not contain more than 72 characters per line. For more information, take a look at our Commit message guidelines. If needed, you can retry the
danger-review
job that generated this comment.Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Suraj Tripathi ( @suraj_tripathy
) (UTC+5.5, 5.5 hours ahead of@Alexand
)Markus Koller ( @toupeira
) (UTC+2, 2 hours ahead of@Alexand
)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
Generated by
Dangermentioned in issue #357612 (closed)
Allure report
allure-report-publisher
generated test report!review-qa-blocking:
test report for 42e5c35cexpand test summary
+---------------------------------------------------------------------------+ | suites summary | +----------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +----------------------+--------+--------+---------+-------+-------+--------+ | Create | 23 | 0 | 2 | 22 | 25 | ❗ | | Plan | 48 | 0 | 1 | 48 | 49 | ❗ | | Manage | 37 | 0 | 2 | 38 | 39 | ❗ | | Version sanity check | 0 | 0 | 1 | 0 | 1 | ➖ | | Verify | 12 | 0 | 1 | 12 | 13 | ❗ | | Secure | 4 | 0 | 0 | 4 | 4 | ❗ | | Configure | 0 | 0 | 1 | 0 | 1 | ➖ | | Protect | 2 | 0 | 0 | 2 | 2 | ❗ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | +----------------------+--------+--------+---------+-------+-------+--------+ | Total | 126 | 0 | 9 | 126 | 135 | ❗ | +----------------------+--------+--------+---------+-------+-------+--------+
requested review from @hfyngvason
- Resolved by Sincheol (David) Kim
@hfyngvason could you please take the 1st review?
added workflowin review label and removed workflowin dev label
mentioned in issue Alexand/growth-and-development#1 (closed)
marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed
@hfyngvason
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.
For more info, please refer to the following links:
requested review from @dskim_gitlab and removed review request for @hfyngvason
enabled an automatic merge when the pipeline for b546db23 succeeds
@Alexand I've kicked it off again as it seems to be failing on unrelated test, but please take a look if it fails again.
added 636 commits
-
b247baca...0897e267 - 635 commits from branch
master
- 42e5c35c - Fix deploy boards for Kubernetes 1.22
-
b247baca...0897e267 - 635 commits from branch
Thanks, @hfyngvason and @dskim_gitlab.
After a rebase and a failed job retry the pipe is now
.I'll go ahead and self-merge, since we have all the approvals.
mentioned in commit 75d50f74
added workflowverification label and removed workflowin review label
added workflowstaging-canary label and removed workflowverification label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added Pick into 15.1 label
picked the changes into the branch
15-1-stable-ee-patch-2
with commit 5eb84d7dmentioned in commit 5eb84d7d
Automatically picked into !91668 (merged), will merge into
15-1-stable-ee
ready for15.1.2-ee
.removed Pick into 15.1 label
mentioned in merge request !91668 (merged)
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!1252 (merged)
mentioned in issue gl-retrospectives/configure#59 (closed)
added groupenvironments label and removed groupconfigure [DEPRECATED] label