Skip to content

Conversation

@adellape
Copy link
Contributor

@adellape adellape commented Jun 17, 2021

https://issues.redhat.com/browse/OSDOCS-1958

OCP 4.8 supports OSDK v1.8.0, and this new guide shows how to manually upgrade your existing Operator projects for compatibility with the new OSDK version.

Preview: Upgrading projects for newer Operator SDK versions

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 17, 2021
@adellape adellape changed the title Add OSDK upgrade guide for 4.8 [WIP] Add OSDK upgrade guide for 4.8 Jun 17, 2021
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 17, 2021
@netlify
Copy link

netlify bot commented Jun 17, 2021

✔️ Deploy Preview for osdocs ready!

🔨 Explore the source changes: d7b1e95

🔍 Inspect the deploy log: https://app.netlify.com/sites/osdocs/deploys/60dbe633525732000817cda3

😎 Browse the preview: https://deploy-preview-33613--osdocs.netlify.app

@adellape adellape force-pushed the osdk_upgrade_48 branch 2 times, most recently from e363ad9 to ae9dafa Compare June 17, 2021 23:01
@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 17, 2021
@adellape adellape force-pushed the osdk_upgrade_48 branch 5 times, most recently from 65fc4fe to 7b86eb0 Compare June 18, 2021 02:25
@openshift-ci openshift-ci bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 18, 2021
@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 18, 2021
@adellape adellape force-pushed the osdk_upgrade_48 branch 11 times, most recently from 1d83c15 to cefa7cc Compare June 18, 2021 04:24

Choose a reason for hiding this comment

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

YAML with a blank line? As long as you feel like customers can recognize what to specify for the resourceName field, then it's cool by me. I don't know the subject area, so I'm unsure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm yeah I'm not sure either. Came from https://github.com/operator-framework/operator-sdk/blob/2a1bd03/testdata/ansible/memcached-operator/config/manager/controller_manager_config.yaml.

I'll change the value to a user-replaceable <resource_name> for now. @rashmigottipati @varshab1210 Do you have a suggestion?

Copy link

@mikemckiernan mikemckiernan left a comment

Choose a reason for hiding this comment

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

Please check for the oops, otherwise, you know what to act on and what to ignore better than I do.

Interesting read.

@mikemckiernan mikemckiernan added peer-review-done Signifies that the peer review team has reviewed this PR and removed peer-review-needed Signifies that the peer review team needs to review this PR labels Jun 24, 2021
@cuipinghuo
Copy link

cuipinghuo commented Jun 29, 2021

@adellape I only have one suggestion for this pr.
for Upgrading projects for newer Operator SDK versions

`7.Make the following changes to your config/rbac/leader_election_role.yaml file:

a. For Ansible- and Helm-based Operator projects, add role rules for leader election.

Add the rule for the apiGroups, coordination.k8s.io, and resource leases in the config/rbac/leader_election_role.yaml file:

Expand all

config/rbac/leader_election_role.yaml file`

I think it should be

- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete

and no need to change b.Move leases.coordination.k8s.io to its own proxy-role rule.
Although the current version(looking a.+b. as a whole) is the same with what I suggest, it is really confusing. Because in a. you add coordination.k8s.io, but in b. you delete it and add back again.

@adellape
Copy link
Contributor Author

Although the current version(looking a.+b. as a whole) is the same with what I suggest, it is really confusing. Because in a. you add coordination.k8s.io, but in b. you delete it and add back again.

@cuipinghuo You're right! I've combined the changes for step 7 (no more 7a and 7b).

@adellape adellape merged commit a5a297d into openshift:master Jun 30, 2021
@adellape adellape deleted the osdk_upgrade_48 branch June 30, 2021 14:02
@adellape
Copy link
Contributor Author

/cherrypick enterprise-4.8

@openshift-cherrypick-robot

@adellape: new pull request created: #34155

Details

In response to this:

/cherrypick enterprise-4.8

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

Labels

branch/enterprise-4.8 peer-review-done Signifies that the peer review team has reviewed this PR size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants