Skip to content

Commit

Permalink
samples/v1: Rename files to use the default run-level for updates
Browse files Browse the repository at this point in the history
Like 9e3e820 (Console CRDs: Rename files to use the default
run-level for updates, 2023-08-02, openshift#1541) and 9aa8b74
(helm/v1beta1: Rename files to use the default run-level for updates,
2023-08-03, openshift#1544), but now for the CustomResourceDefinition deployed
by the samples operator [1].  As in the previous changes, the outgoing
filename failed to match the
0000_<runlevel>_<dash-separated-component>_<manifest_filename>
template [2], and there is no reason that the CRD needs bumping at
run-level 10 during updates.  I'm using a 00_ prefix to sort before
the other samples manifests [3], so there's no relative change in
update order between those resources; this commit just shifts update
CRD reconciliation vs. other, non-samples resources managed by the
cluster-version operator.

Checking history, there doesn't seem to be any motivation for the
original 0000_10_ prefix for this manifest:

  $ git --no-pager log -1 3139ff9
  commit 3139ff9 (origin/pr/513)
  Author: gabemontero <[email protected]>
  Date:   Mon Nov 11 14:02:54 2019 -0500

      generate CRD yaml

Generated with:

  $ mv samples/v1/0000_10_samplesconfig.crd.yaml samples/v1/00_samplesconfig.crd.yaml
  $ sed -i 's/0000_10_/00_/' samples/v1/stable.config.testsuite.yaml
  $ git add -A samples

[1]: https://github.com/openshift/cluster-samples-operator/blob/684b8c7f1cf6aaf9fb4f2bcffe91cde7eae07347/Dockerfile#L10
[2]: https://github.com/openshift/enhancements/blob/cafeb5c3cba7f8c9e261b2aabffa92e34dd76be6/dev-guide/cluster-version-operator/dev/operators.md#what-is-the-order-that-resources-get-createdupdated-in
[3]: https://github.com/openshift/cluster-samples-operator/tree/684b8c7f1cf6aaf9fb4f2bcffe91cde7eae07347/manifests
  • Loading branch information
wking committed Aug 3, 2023
1 parent 08ec5d2 commit 7f616b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
File renamed without changes.
2 changes: 1 addition & 1 deletion samples/v1/stable.config.testsuite.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] Config"
crd: 0000_10_samplesconfig.crd.yaml
crd: 00_samplesconfig.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal Config
Expand Down

0 comments on commit 7f616b3

Please sign in to comment.