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

fix(openshift): make post-render script compatible with mac #1970

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

leiicamundi
Copy link
Contributor

Which problem does the PR fix?

This PR aims to address compatibility issues with the post-render script on macOS. Currently, the script does not function properly on macOS and does not return an error. To resolve this, we introduce the usage of gsed (GNU sed) on macOS.

Additionally, I propose an alternative approach to eliminate the need for the post-render script altogether by using a flag in the source control configuration (scc) to remove the attribute. This would simplify the process for end users as demonstrated in the example provided here.

What's in this PR?

This PR introduces compatibility for the post-render script on macOS by utilizing gsed (GNU sed). This ensures that the script functions correctly across both macOS and Linux environments.

Checklist

Please ensure that all items in the checklist are completed before and after opening the PR.

Before opening the PR:

  • Run make go.update-golden-only in the repo's root dir.
  • Ensure there is no other open pull request for the same update/change.
  • Add tests for charts if needed.
  • Update in-repo documentation if necessary.

After opening the PR:

  • Sign our CLA (Contributor License Agreement) (will show once you open the PR).
  • Ensure all checks/tests pass in the PR.

@leiicamundi leiicamundi self-assigned this Jun 6, 2024
@leiicamundi leiicamundi added the platform/openshift Issues related to OpenShift label Jun 6, 2024
@leiicamundi leiicamundi marked this pull request as ready for review June 6, 2024 16:35
Copy link
Contributor

@hamza-m-masood hamza-m-masood left a comment

Choose a reason for hiding this comment

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

@leiicamundi this will only work on macs that have an apple silicon chip. Could you think of a solution that also includes the macs with intel chips?

@leiicamundi
Copy link
Contributor Author

Hello @hamza-m-masood, are you sure? https://github.com/bevry/dorothy/blob/master/commands/is-mac seems to use the same trick
I don't have a intel mac on hands, what is the output of uname on intel mac?

@drodriguez-305
Copy link
Contributor

@leiicamundi I have a personal Mac with a i9. Used the uname command and it's the same Darwin.

@leiicamundi leiicamundi merged commit c326f48 into main Jun 11, 2024
14 of 15 checks passed
@leiicamundi leiicamundi deleted the fix/openshift-patch-render branch June 11, 2024 06:19
aabouzaid pushed a commit that referenced this pull request Jul 13, 2024
Use gsed instead of sed when running the openshift post-render script on mac
This was referenced Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/openshift Issues related to OpenShift
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants