Skip to content

Upgrade SDK to use Kubernetes 1.26.2#6352

Merged
rashmigottipati merged 16 commits into
operator-framework:masterfrom
rashmigottipati:k8sbump
Mar 14, 2023
Merged

Upgrade SDK to use Kubernetes 1.26.2#6352
rashmigottipati merged 16 commits into
operator-framework:masterfrom
rashmigottipati:k8sbump

Conversation

@rashmigottipati

@rashmigottipati rashmigottipati commented Mar 8, 2023

Copy link
Copy Markdown
Member

Description of the change:

  • Changes in go.mod and go.sum resulted from bumping versions to support k8s 1.26.2
  • Changes in files due to deprecated types in apimachinery
  • Used generic set in files where sets.String is used, which has been deprecated
  • Fixed lint errors

Motivation for the change:
Support for k8s 1.26

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@rashmigottipati rashmigottipati temporarily deployed to deploy March 8, 2023 18:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 8, 2023 18:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 8, 2023 18:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 8, 2023 18:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 8, 2023 18:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 8, 2023 18:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 8, 2023 18:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 8, 2023 18:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 8, 2023 18:01 — with GitHub Actions Inactive
@rashmigottipati

Copy link
Copy Markdown
Member Author

/cc @everettraven @varshaprasad96

@openshift-ci openshift-ci Bot requested a review from everettraven March 8, 2023 18:01

@rashmigottipati rashmigottipati left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo for myself: Add changelog :)

@everettraven everettraven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the changes look good to me - great work @rashmigottipati!

The only glaring thing for me is pulling in Kubebuilder 3.9.0 which has a known bug that could break the scaffolding of Go operators.

Comment thread go.mod Outdated
Comment thread internal/plugins/ansible/v1/api.go
@rashmigottipati rashmigottipati temporarily deployed to deploy March 8, 2023 18:38 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 8, 2023 18:38 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 9, 2023 03:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 9, 2023 03:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 9, 2023 03:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 9, 2023 03:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 9, 2023 03:00 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 9, 2023 17:32 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 9, 2023 17:32 — with GitHub Actions Inactive
Comment thread go.mod Outdated
Comment thread internal/cmd/operator-sdk/cli/cli.go
Comment thread testdata/go/v3/memcached-operator/go.mod
COPY api/ api/
COPY controllers/ controllers/
COPY internal/controller/ internal/controller/
COPY monitoring/ monitoring/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would have to look into if we can rip of certain parts of monitoring/ and put it with internal/controller/. I assume the most of the registration of metrics would be done in the controller. This investigation is just for follow up not this PR.

@everettraven everettraven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me. Just some nits but I don't think they should block this PR from merging

Comment thread go.mod Outdated
Comment thread internal/cmd/operator-sdk/cli/cli.go
rashmigottipati and others added 11 commits March 13, 2023 15:22
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
…d YAML formatting issues

Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
@rashmigottipati rashmigottipati temporarily deployed to deploy March 13, 2023 19:22 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 13, 2023 19:22 — with GitHub Actions Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy March 13, 2023 19:22 — with GitHub Actions Inactive
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>

@everettraven everettraven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me - just noticed a tiny typo. Great work @rashmigottipati !

/lgtm

Comment thread changelog/fragments/bump-1.26.yaml Outdated
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>

@everettraven everettraven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@varshaprasad96 varshaprasad96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rashmigottipati the changes look good, but we are missing migration guide entries especially for go/v4alpha. It is necessary because any user who has scaffolded gov4alpha plugin with SDK 1.26.1 should be able to follow the changes in migration guide and migrate their project to 1.27 (upcoming release). Also since the description in changeling fragment is an array, it would be helpful to have a separate entry for each, so that it appears like this in the website.

Comment thread testdata/go/v3/memcached-operator/Makefile
Comment thread testdata/go/v3/memcached-operator/Makefile
Comment thread testdata/go/v4-alpha/memcached-operator/Dockerfile
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>

@varshaprasad96 varshaprasad96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two changes, rest looks good! Thanks for working on this @rashmigottipati :)

/lgtm

Comment thread changelog/fragments/bump-1.26.yaml Outdated
Comment thread changelog/fragments/bump-1.26.yaml Outdated
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>

@everettraven everettraven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@rashmigottipati rashmigottipati mentioned this pull request Mar 14, 2023
13 tasks
Comment on lines +38 to +54
Regarding the upcoming major changes in the plugin, please note that `go/v3` is being deprecated by Kubebuilder hence Operator SDK would also be migrating to `go/v4` soon.
Following are the changes to be addressed in your project structure, `Makefile` and `go.mod` files:
1) [go/v3, ansible/v1, helm/v1] Update your `go.mod` file to upgrade the dependencies and run `go mod tidy` to download them
```go
k8s.io/api v0.26.2
k8s.io/apiextensions-apiserver v0.26.2
k8s.io/apimachinery v0.26.2
k8s.io/cli-runtime v0.26.2
k8s.io/client-go v0.26.2
k8s.io/kubectl v0.26.2
sigs.k8s.io/controller-runtime v0.14.5
sigs.k8s.io/controller-tools v0.11.3
sigs.k8s.io/kubebuilder/v3 v3.9.1
```
2) [go/v3, ansible/v1, helm/v1] With the bump to Kubebuilder 3.9.1, the `go/v3` projects are now scaffolded with 0.13.1 version of kube-rbac-proxy. Modify the version of kube-rbac-proxy in the following scaffolded files:
- config/default/manager_auth_proxy_patch.yaml
- bundle/manifests/memcached-operator.clusterserviceversion.yaml

@simararneja simararneja Apr 7, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants