diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/07_clusterrole_argocd-operator-metrics-reader.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/00_clusterrole_argocd-operator-metrics-reader.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/07_clusterrole_argocd-operator-metrics-reader.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/00_clusterrole_argocd-operator-metrics-reader.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/06_configmap_argocd-operator-manager-config.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/05_configmap_argocd-operator-manager-config.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/06_configmap_argocd-operator-manager-config.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/05_configmap_argocd-operator-manager-config.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/08_customresourcedefinition_applications.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/06_customresourcedefinition_applications.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/08_customresourcedefinition_applications.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/06_customresourcedefinition_applications.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/09_customresourcedefinition_applicationsets.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/07_customresourcedefinition_applicationsets.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/09_customresourcedefinition_applicationsets.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/07_customresourcedefinition_applicationsets.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/10_customresourcedefinition_appprojects.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/08_customresourcedefinition_appprojects.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/10_customresourcedefinition_appprojects.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/08_customresourcedefinition_appprojects.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/11_customresourcedefinition_argocdexports.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/09_customresourcedefinition_argocdexports.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/11_customresourcedefinition_argocdexports.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/09_customresourcedefinition_argocdexports.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/12_customresourcedefinition_argocds.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/10_customresourcedefinition_argocds.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/12_customresourcedefinition_argocds.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/10_customresourcedefinition_argocds.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/13_deployment_argocd-operator-controller-manager.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/11_deployment_argocd-operator-controller-manager.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/13_deployment_argocd-operator-controller-manager.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/11_deployment_argocd-operator-controller-manager.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/05_service_argocd-operator-controller-manager-metrics-service.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/12_service_argocd-operator-controller-manager-metrics-service.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/05_service_argocd-operator-controller-manager-metrics-service.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/12_service_argocd-operator-controller-manager-metrics-service.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/00_serviceaccount_argocd-operator-controller-manager.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/13_serviceaccount_argocd-operator-controller-manager.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/00_serviceaccount_argocd-operator-controller-manager.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/all-namespaces/13_serviceaccount_argocd-operator-controller-manager.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/07_clusterrole_argocd-operator-metrics-reader.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/00_clusterrole_argocd-operator-metrics-reader.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/07_clusterrole_argocd-operator-metrics-reader.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/00_clusterrole_argocd-operator-metrics-reader.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/03_clusterrole_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/01_clusterrole_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/03_clusterrole_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/01_clusterrole_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/04_clusterrolebinding_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/02_clusterrolebinding_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/04_clusterrolebinding_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/02_clusterrolebinding_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/06_configmap_argocd-operator-manager-config.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/03_configmap_argocd-operator-manager-config.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/06_configmap_argocd-operator-manager-config.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/03_configmap_argocd-operator-manager-config.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/08_customresourcedefinition_applications.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/04_customresourcedefinition_applications.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/08_customresourcedefinition_applications.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/04_customresourcedefinition_applications.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/09_customresourcedefinition_applicationsets.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/05_customresourcedefinition_applicationsets.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/09_customresourcedefinition_applicationsets.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/05_customresourcedefinition_applicationsets.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/10_customresourcedefinition_appprojects.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/06_customresourcedefinition_appprojects.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/10_customresourcedefinition_appprojects.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/06_customresourcedefinition_appprojects.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/11_customresourcedefinition_argocdexports.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/07_customresourcedefinition_argocdexports.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/11_customresourcedefinition_argocdexports.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/07_customresourcedefinition_argocdexports.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/12_customresourcedefinition_argocds.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/08_customresourcedefinition_argocds.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/12_customresourcedefinition_argocds.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/08_customresourcedefinition_argocds.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/13_deployment_argocd-operator-controller-manager.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/09_deployment_argocd-operator-controller-manager.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/13_deployment_argocd-operator-controller-manager.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/09_deployment_argocd-operator-controller-manager.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/01_role_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/10_role_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/01_role_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/10_role_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/02_rolebinding_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/11_rolebinding_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/02_rolebinding_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/11_rolebinding_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/05_service_argocd-operator-controller-manager-metrics-service.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/12_service_argocd-operator-controller-manager-metrics-service.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/05_service_argocd-operator-controller-manager-metrics-service.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/12_service_argocd-operator-controller-manager-metrics-service.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/00_serviceaccount_argocd-operator-controller-manager.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/13_serviceaccount_argocd-operator-controller-manager.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/00_serviceaccount_argocd-operator-controller-manager.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/own-namespace/13_serviceaccount_argocd-operator-controller-manager.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/07_clusterrole_argocd-operator-metrics-reader.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/00_clusterrole_argocd-operator-metrics-reader.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/07_clusterrole_argocd-operator-metrics-reader.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/00_clusterrole_argocd-operator-metrics-reader.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/03_clusterrole_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/01_clusterrole_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/03_clusterrole_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/01_clusterrole_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/04_clusterrolebinding_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/02_clusterrolebinding_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/04_clusterrolebinding_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/02_clusterrolebinding_argocd-operator.v0-1dhiybrldl1gyksid1dk2dqjsc72psdybc7iyvse5gpx.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/06_configmap_argocd-operator-manager-config.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/03_configmap_argocd-operator-manager-config.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/06_configmap_argocd-operator-manager-config.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/03_configmap_argocd-operator-manager-config.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/08_customresourcedefinition_applications.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/04_customresourcedefinition_applications.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/08_customresourcedefinition_applications.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/04_customresourcedefinition_applications.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/09_customresourcedefinition_applicationsets.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/05_customresourcedefinition_applicationsets.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/09_customresourcedefinition_applicationsets.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/05_customresourcedefinition_applicationsets.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/10_customresourcedefinition_appprojects.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/06_customresourcedefinition_appprojects.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/10_customresourcedefinition_appprojects.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/06_customresourcedefinition_appprojects.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/11_customresourcedefinition_argocdexports.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/07_customresourcedefinition_argocdexports.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/11_customresourcedefinition_argocdexports.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/07_customresourcedefinition_argocdexports.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/12_customresourcedefinition_argocds.argoproj.io.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/08_customresourcedefinition_argocds.argoproj.io.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/12_customresourcedefinition_argocds.argoproj.io.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/08_customresourcedefinition_argocds.argoproj.io.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/13_deployment_argocd-operator-controller-manager.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/09_deployment_argocd-operator-controller-manager.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/13_deployment_argocd-operator-controller-manager.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/09_deployment_argocd-operator-controller-manager.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/01_role_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/10_role_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/01_role_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/10_role_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/02_rolebinding_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/11_rolebinding_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/02_rolebinding_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/11_rolebinding_argocd-operator.v0-22gmilmgp91wu25is5i2ec598hni8owq3l71bbkl7iz3.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/05_service_argocd-operator-controller-manager-metrics-service.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/12_service_argocd-operator-controller-manager-metrics-service.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/05_service_argocd-operator-controller-manager-metrics-service.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/12_service_argocd-operator-controller-manager-metrics-service.yaml diff --git a/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/00_serviceaccount_argocd-operator-controller-manager.yaml b/test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/13_serviceaccount_argocd-operator-controller-manager.yaml similarity index 100% rename from test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/00_serviceaccount_argocd-operator-controller-manager.yaml rename to test/convert/expected-manifests/argocd-operator.v0.6.0/single-namespace/13_serviceaccount_argocd-operator-controller-manager.yaml diff --git a/test/convert/generate-manifests.go b/test/convert/generate-manifests.go index aa0ce0982..36d859585 100644 --- a/test/convert/generate-manifests.go +++ b/test/convert/generate-manifests.go @@ -1,11 +1,14 @@ package main import ( + "cmp" "fmt" "os" "path/filepath" + "slices" "strings" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/convert" @@ -75,7 +78,7 @@ func generateManifests(outputPath, bundleDir, installNamespace, watchNamespace s } if err := func() error { - for idx, obj := range plain.Objects { + for idx, obj := range slices.SortedFunc(slices.Values(plain.Objects), orderByKindNamespaceName) { kind := obj.GetObjectKind().GroupVersionKind().Kind fileName := fmt.Sprintf("%02d_%s_%s.yaml", idx, strings.ToLower(kind), obj.GetName()) data, err := yaml.Marshal(obj) @@ -95,3 +98,11 @@ func generateManifests(outputPath, bundleDir, installNamespace, watchNamespace s return nil } + +func orderByKindNamespaceName(a client.Object, b client.Object) int { + return cmp.Or( + cmp.Compare(a.GetObjectKind().GroupVersionKind().Kind, b.GetObjectKind().GroupVersionKind().Kind), + cmp.Compare(a.GetNamespace(), b.GetNamespace()), + cmp.Compare(a.GetName(), b.GetName()), + ) +}