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

Have relprep.sh check to see if bundle & manifest CSVs are in sync #219

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

joelsmith
Copy link
Contributor

@joelsmith joelsmith commented Feb 20, 2024

Also:

  • make CRD extraction more robust, to handle more than just examples.keda.sh CRDs
  • notice when there are missing CRDs in the bundle generation inputs
  • manually sync some of the manifest CSV fields and the inputs to the
    generated bundle CSV's fields so that the new check passes

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO)

Notes for reviewers:
While doing the upstream 2.12.1 release, I noticed a little weirdness in the KEDA OLM operator's hack/relprep.sh script. Namely, that it isn't keeping config/manifests/bases/keda.clusterserviceversion.yaml and bundle/manifests/keda.clusterserviceversion.yaml in sync. Apparently, the former doesn't get updated by the operator-sdk generate kustomize manifests -q command like I thought it did, and the latter does get updated, but is only used for our manual testing workflow (when we're developing or doing a release). While playing around with it, I also did some test runs on 2.13.0 and noticed that there is a new CRD coming our way which lives in eventing.keda.sh instead of keda.sh, so that also broke the script. So I've opened a PR to "fix" all of that. I'm using quotes because some of the things aren't actually fixed by the script, only detected, so that a human knows which things to manually update. I didn't figure it was worth the work to automate them at this point, but we can always change our mind later if I'm wrong.

Also:
* make CRD extraction more robust, to handle more than just examples.keda.sh CRDs
* notice when there are missing CRDs in the bundle generation inputs
* manually sync some of the manifest CSV fields and the inputs to the
  generated bundle CSV's fields so that the new check passes

Signed-off-by: Joel Smith <joelsmith@redhat.com>
@joelsmith joelsmith requested a review from zroubalik as a code owner February 20, 2024 19:08
@joelsmith
Copy link
Contributor Author

Changes to config/manager/manager.yaml and the resulting generated changes to bundle/manifests/keda.clusterserviceversion.yaml are to make them match

securityContext:
runAsNonRoot: true
and
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL

The change to add a label in config/manifests/bases/keda.clusterserviceversion.yaml is to make it match the bundle-generated CSV.

@jkyros
Copy link
Contributor

jkyros commented Feb 20, 2024

Thanks for the detail and background, very much appreciated.

Oh yuck, and you had to change the keda.yaml parsing too. Chores have been rough this round 😄

/lgtm

@joelsmith joelsmith merged commit bfdc85b into kedacore:main Feb 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants