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

Update find parameter #38

Closed
wants to merge 1 commit into from
Closed

Update find parameter #38

wants to merge 1 commit into from

Conversation

jianh619
Copy link

Use single quote (or backslash ) to protect * (in *.yaml) from interpretation as shell script punctuation.

I'm using Ubuntu as my dev node , but find some weird things , that when using kubectl crossplane build provider , it will prompt error

# kubectl crossplane build provider
kubectl crossplane: error: failed to build package: failed to parse package: {path:/root/go/src/github.ibm.com/jbjhuang/cloudpak-provider/package/crds/cloudpak.crossplane.io_dependencies.yaml position:4096}: Object 'Kind' is missing in '
                           '

After several round check and test , finally found it's due to first two lines in crd

# cat crds/cloudpak.crossplane.io_dependencies.yaml

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition

It supposes to be remoted by Makefile scripts below , but failed , at least in ubuntu env

generate:
	go generate ./...
	@find package/crds -name *.yaml -exec sed -i.sed -e '1,2d' {} \;
	@find package/crds -name *.yaml.sed -delete

Use single quote  (or backslash ) to protect * (in *.yaml) from interpretation as shell script punctuation.

Signed-off-by: jbjhuang <[email protected]>
@negz negz closed this May 29, 2024
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

Successfully merging this pull request may close these issues.

3 participants