-
Notifications
You must be signed in to change notification settings - Fork 581
operator/v1: Move KubeStorageVersionMigrator CRD to run-level 50 #1601
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
operator/v1: Move KubeStorageVersionMigrator CRD to run-level 50 #1601
Conversation
|
Hello @wking! Some important instructions when contributing to openshift/api: |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wking The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
93383a8 to
99b7aca
Compare
af93229 to
df6b19d
Compare
72bc94e to
5c506ed
Compare
65b4303 to
f80d681
Compare
4a48fe0 to
c2e991f
Compare
Addressing [1]:
error running generator schemacheck on group operator.openshift.io:
could not run schemacheck generator for group/version operator.openshift.io/v1:
error in 0000_50_cluster-kube-storage-version-migrator-operator_00_config.crd.yaml: ListsMustHaveSSATags: crd/kubestorageversionmigrators.operator.openshift.io version/v1 field/^.status.generations must set x-kubernetes-list-type
error in 0000_50_cluster-kube-storage-version-migrator-operator_00_config.crd.yaml: ListsMustHaveSSATags: crd/kubestorageversionmigrators.operator.openshift.io version/v1 field/^.status.conditions must set x-kubernetes-list-type
The conditions labels are suggested by
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go:
// Condition contains details for one aspect of the current state of this API Resource.
// ---
// This struct is intended for direct use as an array at the field path .status.conditions. For example,
//
// type FooStatus struct{
// // Represents the observations of a foo's current state.
// // Known .status.conditions.type are: "Available", "Progressing", and "Degraded"
// // +patchMergeKey=type
// // +patchStrategy=merge
// // +listType=map
// // +listMapKey=type
// Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
I'd initially declared generations atomic, because I can't think of
how patch-merging would work for that property, but David suggested
using tuples formed by (group, resource, namespace, name) [2].
[1]: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_api/1601/pull-ci-openshift-api-master-verify-crd-schema/1706986191397588992#1:build-log.txt%3A6118-6121
[2]: openshift#1601 (comment)
a10c798 to
c2be41d
Compare
The outgoing run level 40 is from file creation in 8802379 (add KubeStorageVersionMigrator crd.yaml, 2019-10-29, openshift#503), but that commit does not give a motivation for selecting level 40. Moving to level 50 will align this manifest with the other migrator manifests: $ oc adm release extract --to manifests quay.io/openshift-release-dev/ocp-release:4.14.0-rc.2-x86_64 $ ls manifests/*kube-storage-version-migrator* manifests/0000_40_kube-storage-version-migrator-operator_00_config.crd.yaml manifests/0000_50_cluster-kube-storage-version-migrator-operator_01_storage_migration_crd.yaml manifests/0000_50_cluster-kube-storage-version-migrator-operator_01_storage_state_crd.yaml manifests/0000_50_cluster-kube-storage-version-migrator-operator_02_namespace.yaml manifests/0000_50_cluster-kube-storage-version-migrator-operator_03_configmap.yaml manifests/0000_50_cluster-kube-storage-version-migrator-operator_04_serviceaccount.yaml manifests/0000_50_cluster-kube-storage-version-migrator-operator_05_roles.yaml manifests/0000_50_cluster-kube-storage-version-migrator-operator_06_operatorconfig.yaml manifests/0000_50_cluster-kube-storage-version-migrator-operator_07_deployment-ibm-cloud-managed.yaml manifests/0000_50_cluster-kube-storage-version-migrator-operator_07_deployment.yaml manifests/0000_50_cluster-kube-storage-version-migrator-operator_08_service.yaml manifests/0000_50_cluster-kube-storage-version-migrator-operator_09_clusteroperator.yaml catching up with openshift/cluster-kube-storage-version-migrator-operator@626f35773607 (manifests: remove special runlevel, 2021-10-21, openshift/cluster-kube-storage-version-migrator-operator#70). By consolidating, we remove the only remaining level-40 manifest, saving some time by shifting that manifest to the highly-parallel default level 50. The new filename will require a small tweak to the Dockerfile's [1]: COPY vendor/github.com/openshift/api/operator/v1/*_kube-storage-version-migrator-operator_*.yaml* /manifests but that can happen when we vendor-bump the operator to pull in this change. [1]: https://github.com/openshift/cluster-kube-storage-version-migrator-operator/blob/332cb1cd0f9a00c03e3f9d400ae8483abd03036c/images/ci/Dockerfile#L10C38-L10C98
c2be41d to
0be1199
Compare
Addressing [1]:
error running generator schemacheck on group operator.openshift.io:
could not run schemacheck generator for group/version operator.openshift.io/v1:
error in 0000_50_cluster-kube-storage-version-migrator-operator_00_config.crd.yaml: ListsMustHaveSSATags: crd/kubestorageversionmigrators.operator.openshift.io version/v1 field/^.status.generations must set x-kubernetes-list-type
error in 0000_50_cluster-kube-storage-version-migrator-operator_00_config.crd.yaml: ListsMustHaveSSATags: crd/kubestorageversionmigrators.operator.openshift.io version/v1 field/^.status.conditions must set x-kubernetes-list-type
The conditions labels are suggested by
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go:
// Condition contains details for one aspect of the current state of this API Resource.
// ---
// This struct is intended for direct use as an array at the field path .status.conditions. For example,
//
// type FooStatus struct{
// // Represents the observations of a foo's current state.
// // Known .status.conditions.type are: "Available", "Progressing", and "Degraded"
// // +patchMergeKey=type
// // +patchStrategy=merge
// // +listType=map
// // +listMapKey=type
// Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
I'd initially declared generations atomic, because I can't think of
how patch-merging would work for that property, but David suggested
using tuples formed by (group, resource, namespace, name) [2].
[1]: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_api/1601/pull-ci-openshift-api-master-verify-crd-schema/1706986191397588992#1:build-log.txt%3A6118-6121
[2]: openshift#1601 (comment)
00bfe8a to
17465da
Compare
Addressing [1]:
error running generator schemacheck on group operator.openshift.io:
could not run schemacheck generator for group/version operator.openshift.io/v1:
error in 0000_50_cluster-kube-storage-version-migrator-operator_00_config.crd.yaml: ListsMustHaveSSATags: crd/kubestorageversionmigrators.operator.openshift.io version/v1 field/^.status.generations must set x-kubernetes-list-type
error in 0000_50_cluster-kube-storage-version-migrator-operator_00_config.crd.yaml: ListsMustHaveSSATags: crd/kubestorageversionmigrators.operator.openshift.io version/v1 field/^.status.conditions must set x-kubernetes-list-type
The conditions labels are suggested by
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go:
// Condition contains details for one aspect of the current state of this API Resource.
// ---
// This struct is intended for direct use as an array at the field path .status.conditions. For example,
//
// type FooStatus struct{
// // Represents the observations of a foo's current state.
// // Known .status.conditions.type are: "Available", "Progressing", and "Degraded"
// // +patchMergeKey=type
// // +patchStrategy=merge
// // +listType=map
// // +listMapKey=type
// Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
I'd initially declared generations atomic, because I can't think of
how patch-merging would work for that property, but David suggested
using tuples formed by (group, resource, namespace, name) [2].
[1]: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_api/1601/pull-ci-openshift-api-master-verify-crd-schema/1706986191397588992#1:build-log.txt%3A6118-6121
[2]: openshift#1601 (comment)
…enerationStatus I'm copying the OperatorCondition docs over from vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go's Condition type. We need them for type, now that OperatorStatus is using that as a map key, to avoid [1]: unable to create CRD instances: unable to create CRD "openshiftcontrollermanagers.operator.openshift.io": CustomResourceDefinition.apiextensions.k8s.io "openshiftcontrollermanagers.operator.openshift.io" is invalid: [spec.validation.openAPIV3Schema.properties[status].properties[conditions].items.properties[type].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property, spec.validation.openAPIV3Schema.properties[status].properties[generations].items.properties[group].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property, spec.validation.openAPIV3Schema.properties[status].properties[generations].items.properties[resource].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property, spec.validation.openAPIV3Schema.properties[status].properties[generations].items.properties[namespace].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property, spec.validation.openAPIV3Schema.properties[status].properties[generations].items.properties[name].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property] and similar. And while I was copying over the Godocs and Kubebuilder flags for the type property, it seemed like I might as well do the others too, but David felt that the risk of breaking operators was too large, so for now I'm just bringing in the required-ness and not the pattern and max-length constraints. And for now I'm only touching the properties used as map keys. [1]: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_api/1601/pull-ci-openshift-api-master-integration/1708925642487107584
17465da to
d0cd4a0
Compare
|
@wking: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
|
@wking: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
|
@openshift-bot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
The outgoing run level 40 is from file creation in 8802379 (#503), but that commit does not give a motivation for selecting level 40. Moving to level 50 will align this manifest with the other migrator manifests:
catching up with openshift/cluster-kube-storage-version-migrator-operator@626f35773607 (openshift/cluster-kube-storage-version-migrator-operator#70). By consolidating, we remove the only remaining level-40 manifest, saving some time by shifting that manifest to the highly-parallel default level 50.
The new filename will require a small tweak to the
Dockerfile's:but that can happen when we vendor-bump the operator to pull in this change.