Skip to content

Commit 9e3e820

Browse files
committed
Console CRDs: Rename files to use the default run-level for updates
It's unclear what the motivation was for their existing runlevels, with the API filenames landing without much context: $ git --no-pager log --oneline operator/v1/0000_70_console-operator.crd.yaml | tail -n1 862dd2f Add console-operator CRD and generate from types $ git --no-pager log -1 --format='%h %B' --stat=80 862dd2f 862dd2f Add console-operator CRD and generate from types operator/v1/0000_70_console-operator.crd.yaml | 195 ++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) $ git --no-pager log --oneline helm/*.crd.yaml | tail -n1 a4be43c Added ability to configure Helm chart repository accessible within cluster $ git --no-pager log -1 --format='%h %B' --stat=80 a4be43c a4be43c Added ability to configure Helm chart repository accessible within cluster * Introduced `HelmChartRepository` top-level CR modelled according to chartrepo.Entry from https://github.com/helm/helm/blob/master/pkg/repo/chartrepo.go#L42 * The corresponding enchancement: openshift/enhancements/pull/175 Makefile | 3 +- hack/update-deepcopy.sh | 2 +- hack/verify-crds.sh | 1 + .../0000_10-helm-chart-repository.crd.yaml | 138 +++++++++++++++++++ helm/v1alpha1/doc.go | 8 ++ helm/v1alpha1/register.go | 38 ++++++ helm/v1alpha1/types_helm.go | 108 +++++++++++++++ helm/v1alpha1/zz_generated.deepcopy.go | 152 +++++++++++++++++++++ 8 files changed, 448 insertions(+), 2 deletions(-) $ git --no-pager log --oneline helm/v1beta1/0000_10-project-helm-chart-repository.crd.yaml | tail -n1 8fe639f helm: add a new namespaced CRD for helm $ git --no-pager log -1 --format='%h %B' --stat=80 8fe639f 8fe639f helm: add a new namespaced CRD for helm As part of the process to support namespace-scoped Helm repositories for non-admin users, this PR adds a new namespace-scoped CRD definition named `projecthelmchartrepositories.helm.openshift.io`. Closes: https://issues.redhat.com/browse/HELM-258 Signed-off-by: Allen Bai <abai@redhat.com> .../0000_10-project-helm-chart-repository.crd.yaml | 130 +++++++++++++++++++++ helm/v1beta1/register.go | 2 + ...ypes_helm.go => types_helm_chart_repository.go} | 0 .../v1beta1/types_project_helm_chart_repository.go | 92 +++++++++++++++ helm/v1beta1/zz_generated.deepcopy.go | 119 +++++++++++++++++++ 5 files changed, 343 insertions(+) Removing the explicit runlevels will allow these resources to go in with the other console resources in the default runlevel 50 [1,2]. Significantly, the outgoing 0000_70_console-operator.crd.yaml hadn't matched the 0000_<runlevel>_<dash-separated-component>_<manifest_filename> template [1], and by sorting lexically between other level-70 manifests: $ oc adm release extract --to manifests quay.io/openshift-release-dev/ocp-release:4.14.0-ec.4-x86_64 $ ls manifests | grep -1 0000_70_console-operator.crd.yaml 0000_70_cluster-network-operator_05_clusteroperator.yaml 0000_70_console-operator.crd.yaml 0000_70_dns-operator_00-cluster-role.yaml it had been pushing the network and DNS manifests together into one large task-node. With this change removing the unparsable attempt at a runlevel, the network and DNS manifests will be able to apply on updates via two parallel task-nodes. I'm prefixing most of them with '00_' now to get them near the front of the other level-50 console manifests. For example, manifests/01-helm.yaml is declaring a HelmChartRepository resource [3], so we want it to sort after the HelmChartRepository CustomResourceDefinition within the console task-node. But I'm prefixing ConsolePlugin with '90_' to sort it towards the back, after 07-operator.yaml [4], because the operator is what serves the /crdconvert webhook defined in that CRD [5]. Generated with: $ rename 's/0000_[0-9][0-9]_/00_/' console/*/*.yaml helm/*/*.yaml operator/*/*console-operator*.yaml $ sed -i 's/0000_[0-9][0-9]_/00_/' console/*/*testsuite.yaml helm/*/*.testsuite.yaml $ sed -i 's/0000_[0-9][0-9]_\(.*console-operator\)/00_\1/' operator/*/*testsuite.yaml $ rename 's/00_/90_/' console/*/*consoleplugin*.yaml $ sed -i 's/00_/90_/' console/*/*consoleplugin*testsuite.yaml $ git add -A console helm operator [1]: https://github.com/openshift/enhancements/blob/cafeb5c3cba7f8c9e261b2aabffa92e34dd76be6/dev-guide/cluster-version-operator/dev/operators.md#what-is-the-order-that-resources-get-createdupdated-in [2]: https://github.com/openshift/oc/blob/13225e00caf1ad2d3603e1d1cc8651833f2effcb/pkg/cli/admin/release/new.go#L1412-L1416 [3]: https://github.com/openshift/console-operator/blob/cb08a319271b2f4676d1faae96a5ab10440facb0/manifests/01-helm.yaml [4]: https://github.com/openshift/console-operator/blob/cb08a319271b2f4676d1faae96a5ab10440facb0/manifests/07-operator.yaml [5]: https://issues.redhat.com//browse/OCPBUGS-15834
1 parent ab49804 commit 9e3e820

20 files changed

+10
-10
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

console/v1/stable.consoleclidownload.testsuite.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
22
name: "[Stable] ConsoleCLIDownload"
3-
crd: 0000_10_consoleclidownload.crd.yaml
3+
crd: 00_consoleclidownload.crd.yaml
44
tests:
55
onCreate:
66
- name: Should be able to create a minimal ConsoleCLIDownload

console/v1/stable.consoleexternalloglink.testsuite.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
22
name: "[Stable] ConsoleExternalLogLink"
3-
crd: 0000_10_consoleexternalloglink.crd.yaml
3+
crd: 00_consoleexternalloglink.crd.yaml
44
tests:
55
onCreate:
66
- name: Should be able to create a minimal ConsoleExternalLogLink

0 commit comments

Comments
 (0)