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

feat(ocp): add optional flag to force platform as openshift #810

Merged
merged 1 commit into from
May 3, 2024

Conversation

tthvo
Copy link
Member

@tthvo tthvo commented May 3, 2024

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits: git commit -S -m "YOUR_COMMIT_MESSAGE"

Fixes #805

Description of the change:

Provided an optional flag to overwrite platform discovery to set openshift to true.

With these changes, I try to utilize kustomize. I can try automatically add the patch the deployment like below but it looks not so nice:

cd config/manager && $(KUSTOMIZE) edit add patch \
--path patches/force_openshift_patch.yaml \
--group apps \
--version v1 \
--kind Deployment \
--name controller-manager \
--namespace system

But things can be much easier with yq. What do you think?

Motivation for the change:

See #805

How to manually test:

  • Uncomment the patch in manager.yaml
  • make oci-build bundle bundle-build
  • Push the controller and bundle images.
  • Launch a local kind cluster and logs the controller pod. It should show the following message regardless.
    2024-05-03T18:34:47Z	INFO	setup	detected OpenShift environment
    

@tthvo tthvo added feat New feature or request safe-to-test labels May 3, 2024
@tthvo tthvo marked this pull request as ready for review May 3, 2024 18:39
@tthvo tthvo requested review from a team and ebaron May 3, 2024 18:39
@ebaron
Copy link
Member

ebaron commented May 3, 2024

/build_test

Copy link
Member

@ebaron ebaron left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @tthvo!

Copy link

github-actions bot commented May 3, 2024

/build_test : At least one test failed ❌.
View Actions Run.

@andrewazores
Copy link
Member

^ scorecards still haven't been fixed in this base branch

@ebaron ebaron merged commit 4a72b4c into cryostatio:cryostat3 May 3, 2024
8 of 9 checks passed
@tthvo tthvo deleted the force-ocp branch May 3, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request safe-to-test
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants