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

setup.sh: macOS sed Command Broken #5

Open
c3-mitchwagner opened this issue Nov 7, 2023 · 1 comment
Open

setup.sh: macOS sed Command Broken #5

c3-mitchwagner opened this issue Nov 7, 2023 · 1 comment

Comments

@c3-mitchwagner
Copy link

c3-mitchwagner commented Nov 7, 2023

I cloned main to follow along with https://www.coursera.org/learn/foundations-of-red-hat-cloud-native-development/

Upon cd'ing into DO100x-apps/setup/macos and invoking bash ./setup.sh, I received the following error message:

Creating namespace 'mitch-dev' ...
Creating namespace 'mitch-stage' ...
Creating certificates ...
Creating Kubectl credentials for 'mitch' ...
Creating Kubectl context 'mitch-context' for user 'mitch' ...
Creating role resources for user 'mitch' in namespace 'mitch-dev' ...
sed: /Users/<snip>/DO100x-apps/setup/macos/files/role-binding.yml: No such file or directory
Could not apply security resources

This appears to be correct: the files directory is a macos sibling directory, not a child directory.

A temporary workaround is throwing a ".." in front of the /files bit of the path that sed is looking for:

86     if ! sed "s/{username}/${USERNAME}/g; s/{namespace}/${1}/g" $SCRIPTPATH/../files/role-binding.yml | kubectl apply -f -  > /dev/null 2>&1 ; then
@c3-mitchwagner c3-mitchwagner changed the title macOS sed Command Broken setup.sh: macOS sed Command Broken Nov 7, 2023
@c3-patrick-zhang-fed
Copy link

🚀

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

No branches or pull requests

2 participants