/kind bug
What steps did you take and what happened:
Running make (or any of the scripts that invoke make) fails on a mac because macs don't have gnu sed. In the main Kubernetes repository we solved this problem in shell scripts by testing for the version of sed and using gsed on macs (or printing an error if it isn't installed with instructions on how to install it via homebrew). See kube::util::ensure-gnu-sed at https://github.com/kubernetes/kubernetes/blob/e056703ea7474990f5d7c58813082065543187eb/hack/lib/util.sh#L788-L797
What did you expect to happen:
We should either remove the need to use sed or update the Makefile (either directly or delegating to a shell script) to be cross platform.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version):/etc/os-release):@roberthbailey if the below code is acceptable, I can submit a PR.
PLATFORM := $(shell uname)
SED := sed
ifeq ($(PLATFORM),Darwin)
SED = gsed
endif
Also a check to see if gsed is installed else print info message.
I'm not an expert on makefile syntax, but that seems reasonable. If you don't have a way to test on both mac and linux I can help with that.
@stpabhi please see the pattern we use in main repo - https://cs.k8s.io/?q=is_gnu_sed&i=nope&files=&repos=kubernetes/kubernetes
@roberthbailey I have tested it on my Mac. @dims Thanks, will look into it
This should be fixed in #630
@vincepri - that fixes two of the three uses, but one remains: see https://github.com/kubernetes-sigs/cluster-api/blob/c28088516b8c9553b1006c53ec5648e88db61dd8/Makefile#L94
I have a potentially simple fix for this that I can submit once we've finished the v1alpha1 backlog.
If it's a simple fix, feel free to send it sooner.