+operator-sdk:csv:customresourcedefinitions:order
does not change order in bundle
#6771
Labels
language/go
Issue is related to a Go operator project
lifecycle/frozen
Indicates that an issue or PR should not be auto-closed due to staleness.
Bug Report
What did you do?
Created new structure with operator-sdk version
v1.34.2
. I ran the following commands:Then checked that in
1_34_2/config/manifests/bases/oadp-operator.clusterserviceversion.yaml
and1_34_2/bundle/manifests/oadp-operator.clusterserviceversion.yaml
files, CloudStorage appears first then DataProtectionApplication (sorted alphabetically by default?) inspec.customresourcedefinitions.owned
list.Then, I manually added
// +operator-sdk:csv:customresourcedefinitions:order=1
in1_34_2/api/v1alpha1/dataprotectionapplication_types.go
and ranmake bunble
again. In1_34_2/config/manifests/bases/oadp-operator.clusterserviceversion.yaml
the order changes, and DataProtectionApplication appears first, but not in1_34_2/bundle/manifests/oadp-operator.clusterserviceversion.yaml
.What did you expect to see?
CRDs appearing in the order I desire in bundle CSV file.
What did you see instead? Under which circumstances?
CRDs appearing sorted alphabetically in bundle CSV file.
Environment
Operator type:
/language go
Kubernetes cluster type:
Not releated
$ operator-sdk version
operator-sdk version: "v1.34.2", commit: "81dd3cb24b8744de03d312c1ba23bfc617044005", kubernetes version: "1.28.0", go version: "go1.21.10", GOOS: "linux", GOARCH: "amd64"
$ go version
(if language is Go)go version go1.22.3 linux/amd64
$ kubectl version
Not related
Possible Solution
Not at the moment. (Manual workaround is changing order after running
make bundle
)Additional context
This is important in my opinion, because UIs (like https://operatorhub.io/ and OpenShift) use the order the CRD appear in
spec.customresourcedefinitions.owned
list to render them. This way, developers can use the order to show priority of CRDs to users.The text was updated successfully, but these errors were encountered: