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: operator build fix for macOS arm chips #5952

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ help: ## Display this help.
.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=v2-manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
sed -i '/namespace: seldon-mesh/d' config/rbac/role.yaml # remove namespace added by controller-gen
sed -i -e '/namespace: seldon-mesh/d' config/rbac/role.yaml # remove namespace added by controller-gen
Copy link
Member

Choose a reason for hiding this comment

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

sadly, -i and -e mean different things on BSD sed (closest to the one on MacOS) and on GNU (linux) sed.

See here:

So we would not be able to accept this PR as it prevents the script from running on all other dev machines.

Copy link
Member

Choose a reason for hiding this comment

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

The command would still run on linux, but would no longer do the same thing

cp config/rbac/role.yaml config/rbac/namespace_role.yaml
sed -i 's/ClusterRole/Role/' config/rbac/namespace_role.yaml
sed -i -e 's/ClusterRole/Role/' config/rbac/namespace_role.yaml
cp config/rbac/role_binding.yaml config/rbac/namespace_role_binding.yaml
sed -i 's/ClusterRole/Role/' config/rbac/namespace_role_binding.yaml
sed -i -e 's/ClusterRole/Role/' config/rbac/namespace_role_binding.yaml

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Expand Down Expand Up @@ -176,7 +176,7 @@ build-push-deploy: build docker-build docker-push deploy-all
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
.PHONY: controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.3)

KUSTOMIZE = $(shell pwd)/bin/kustomize
.PHONY: kustomize
Expand Down
Loading