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

ci: add quotes while executing sed for replace & skip range #148

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

Rakshith-R
Copy link
Member

For the generated base csv to work, quote needs to be added
around replaces and skip_range values.

Signed-off-by: Rakshith R [email protected]

cc @Madhu-1 @nixpanic @yati1998

For the generated base csv to work, quote needs to be added
around replaces and skip_range values.

Signed-off-by: Rakshith R <[email protected]>
@mergify mergify bot requested review from nixpanic, yati1998 and Yuggupta27 April 21, 2022 13:33
@Rakshith-R Rakshith-R added the bug Something isn't working label Apr 21, 2022
@nixpanic
Copy link
Collaborator

Please add an example (as a comment) on how you tested and verified this.

@Rakshith-R
Copy link
Member Author

@nixpanic,PTAL

Before

[rakshith@fedora kubernetes-csi-addons]$ export SKIP_RANGE=">=4.2.0 <4.11.0"
[rakshith@fedora kubernetes-csi-addons]$ make bundle
sed 's/@PACKAGE_NAME@/csi-addons/g;s/@SKIP_RANGE@/>=4.2.0 <4.11.0/g;s/@REPLACES@//g' \
< config/manifests/bases/clusterserviceversion.yaml.in > config/manifests/bases/csi-addons.clusterserviceversion.yaml
go build -o /home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/controller-gen ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen
go build -o /home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/kustomize ./vendor/sigs.k8s.io/kustomize/kustomize/v4
/home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/controller-gen rbac:roleName=manager-role crd webhook paths="{./api/...,./cmd/...,./controllers/...,./sidecar/...}" output:crd:artifacts:config=config/crd/bases
cd config/manager && /home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/kustomize edit set image controller=quay.io/csiaddons/k8s-controller:latest rbac-proxy=gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
/home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/kustomize build config/crd > deploy/controller/crds.yaml
/home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/kustomize build config/rbac > deploy/controller/rbac.yaml
/home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/kustomize build config/manager > deploy/controller/setup-controller.yaml
go build -o /home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/operator-sdk ./vendor/github.com/operator-framework/operator-sdk/cmd/operator-sdk
/home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/kustomize build config/manifests | /home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/operator-sdk generate bundle --manifests --metadata --package=csi-addons 
Generating bundle manifests
FATA[0000] Error generating bundle manifests: error reading CSV base: error reading existing ClusterServiceVersion base config/manifests/bases/csi-addons.clusterserviceversion.yaml: no ClusterServiceVersion manifest in config/manifests/bases/csi-addons.clusterserviceversion.yaml 
make: *** [Makefile:107: bundle] Error 1

after

[rakshith@fedora kubernetes-csi-addons]$ export SKIP_RANGE=">=4.2.0 <4.11.0"
[rakshith@fedora kubernetes-csi-addons]$ make bundle
sed 's/@PACKAGE_NAME@/csi-addons/g;s/@SKIP_RANGE@/">=4.2.0 <4.11.0"/g;s/@REPLACES@/""/g' \
< config/manifests/bases/clusterserviceversion.yaml.in > config/manifests/bases/csi-addons.clusterserviceversion.yaml
go build -o /home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/controller-gen ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen
go build -o /home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/kustomize ./vendor/sigs.k8s.io/kustomize/kustomize/v4
/home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/controller-gen rbac:roleName=manager-role crd webhook paths="{./api/...,./cmd/...,./controllers/...,./sidecar/...}" output:crd:artifacts:config=config/crd/bases
cd config/manager && /home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/kustomize edit set image controller=quay.io/csiaddons/k8s-controller:latest rbac-proxy=gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
/home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/kustomize build config/crd > deploy/controller/crds.yaml
/home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/kustomize build config/rbac > deploy/controller/rbac.yaml
/home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/kustomize build config/manager > deploy/controller/setup-controller.yaml
go build -o /home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/operator-sdk ./vendor/github.com/operator-framework/operator-sdk/cmd/operator-sdk
/home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/kustomize build config/manifests | /home/rakshith/workspace/src/github.com/csi-addons/kubernetes-csi-addons/bin/operator-sdk generate bundle --manifests --metadata --package=csi-addons 
Generating bundle manifests
WARN[0000] ClusterServiceVersion validation: [OperationFailed] provided API should have an example annotation 
WARN[0000] ClusterServiceVersion validation: [OperationFailed] provided API should have an example annotation 
WARN[0000] ClusterServiceVersion validation: [OperationFailed] provided API should have an example annotation 
WARN[0000] ClusterServiceVersion validation: [OperationFailed] provided API should have an example annotation 
Bundle manifests generated successfully in bundle
Generating bundle metadata
INFO[0000] Creating bundle.Dockerfile                   
INFO[0000] Creating bundle/metadata/annotations.yaml    
INFO[0000] Bundle metadata generated suceessfully  

@mergify mergify bot merged commit 11ed29b into csi-addons:main Apr 21, 2022
Nikhil-Ladha pushed a commit to Nikhil-Ladha/kubernetes-csi-addons that referenced this pull request Jun 18, 2024
Syncing latest changes from upstream main for kubernetes-csi-addons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants