Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use yq to add nullables to bundle CRD #796

Merged
merged 2 commits into from
Aug 31, 2022
Merged

Conversation

kaovilai
Copy link
Member

@kaovilai kaovilai commented Aug 18, 2022

remove placeholder deployment previously used to get operator-sdk to honor the service accounts roles.
Now using operator-sdk --extra-service-accounts flag feature instead.

Nullables that we override from make manifests are now added to make bundle by default.

The format changes are a side effect of yq processing.

manifests generated from kustomize has 2 spaces for indents except for lists where it has 0 indents.

yq forces 2 spaces on lists and turn multi-line description into a single line.

file now affected by yq formatting

  • dpa crd

file no longer affected by yq formatting

  • csv

@kaovilai kaovilai changed the title Use yq to add nullables Use yq to add nullables to bundle CRD Aug 18, 2022
@codecov-commenter

This comment was marked as off-topic.

@@ -168,7 +168,8 @@ metadata:
operatorframework.io/cluster-monitoring: "true"
operatorframework.io/suggested-namespace: openshift-adp
operators.openshift.io/infrastructure-features: '["Disconnected"]'
operators.openshift.io/valid-subscription: '["OpenShift Container Platform", "OpenShift Platform Plus"]'
operators.openshift.io/valid-subscription: '["OpenShift Container Platform", "OpenShift
Copy link
Member Author

Choose a reason for hiding this comment

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

This file changed because yq is no longer processing it.

@@ -12,612 +12,462 @@ spec:
listKind: DataProtectionApplicationList
plural: dataprotectionapplications
shortNames:
- dpa
- dpa
Copy link
Member Author

Choose a reason for hiding this comment

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

This file changed because yq processed it.

@@ -14,612 +12,462 @@ spec:
listKind: DataProtectionApplicationList
plural: dataprotectionapplications
shortNames:
- dpa
- dpa
Copy link
Member Author

Choose a reason for hiding this comment

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

This file changed because yq processed it.

@kaovilai
Copy link
Member Author

Checked https://yamldiff.com/

@kaovilai
Copy link
Member Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Aug 29, 2022

@kaovilai: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@weshayutin
Copy link
Contributor

@kaovilai is there an issue associated w/ this?

@kaovilai
Copy link
Member Author

@weshayutin Nullable was manually added to CustomResourceDefinition for https://issues.redhat.com/browse/OADP-535.

It has to be constantly overridden after running make bundle because it is not a default expected output from the generated CustomResourceDefinition.

This PR automates and preserves the desired nullable overrides in the CRD.

@weshayutin
Copy link
Contributor

Locally tested the PR w/ make deploy-olm
WFM :)

@weshayutin
Copy link
Contributor

/LGTM

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 31, 2022
Copy link
Contributor

@rayfordj rayfordj left a comment

Choose a reason for hiding this comment

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

/lgtm

  • local run of make bundle with changes; successful
  • superficial review of manifests/ & config/ files; acknowledging your comments on yq formatting (indention) changes

Thanks!

@kaovilai kaovilai merged commit 165199e into openshift:master Aug 31, 2022
@kaovilai
Copy link
Member Author

kaovilai commented Sep 1, 2022

/cherrypick oadp-1.1

@openshift-cherrypick-robot
Copy link
Contributor

@kaovilai: #796 failed to apply on top of branch "oadp-1.1":

Applying: remove placeholder deployment, use operator-sdk `--extra-service-accounts`, yq +nullables
Using index info to reconstruct a base tree...
M	Makefile
M	bundle/manifests/oadp-operator.clusterserviceversion.yaml
Falling back to patching base and 3-way merge...
Removing config/velero/velero.yaml
Auto-merging bundle/manifests/oadp-operator.clusterserviceversion.yaml
CONFLICT (content): Merge conflict in bundle/manifests/oadp-operator.clusterserviceversion.yaml
Auto-merging Makefile
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 remove placeholder deployment, use operator-sdk `--extra-service-accounts`, yq +nullables
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick oadp-1.1

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.

kaovilai added a commit to kaovilai/oadp-operator that referenced this pull request Sep 1, 2022
* remove placeholder deployment, use operator-sdk `--extra-service-accounts`, yq +nullables

* use var to shorten yq eval expression
kaovilai added a commit to kaovilai/oadp-operator that referenced this pull request Sep 16, 2022
* remove placeholder deployment, use operator-sdk `--extra-service-accounts`, yq +nullables

* use var to shorten yq eval expression
kaovilai added a commit that referenced this pull request Sep 22, 2022
* remove placeholder deployment, use operator-sdk `--extra-service-accounts`, yq +nullables

* use var to shorten yq eval expression
kaovilai added a commit to kaovilai/oadp-operator that referenced this pull request Oct 5, 2022
kaovilai added a commit to kaovilai/oadp-operator that referenced this pull request Oct 5, 2022
kaovilai added a commit to kaovilai/oadp-operator that referenced this pull request Oct 21, 2022
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.

None yet

5 participants