-
Notifications
You must be signed in to change notification settings - Fork 191
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
dep: bump to kubernetes 1.16 #301
dep: bump to kubernetes 1.16 #301
Conversation
@@ -442,22 +88,23 @@ spec: | |||
hostNetwork: | |||
description: hostNetwork holds parameters for the HostNetwork endpoint | |||
publishing strategy. Present only if type is HostNetwork. | |||
nullable: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes the schema weaker. Probably you have a // +kubebuilder:nullable=true
tag or so in the API types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in openshift/api#438
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed here.
properties: | ||
scope: | ||
description: scope indicates the scope at which the load balancer | ||
is exposed. Possible values are "External" and "Internal". The | ||
default is "External". | ||
type: string | ||
required: | ||
- scope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks suspicious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4.1 didn't have scope
, so it cannot be required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's required in the 4.2 branch... https://github.com/openshift/cluster-ingress-operator/blob/release-4.2/manifests/00-custom-resource-definition.yaml#L455
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Miciah https://github.com/openshift/cluster-ingress-operator/blob/release-4.2/manifests/00-custom-resource-definition.yaml#L455 does this mean we need to change 4.2 before release? Is there a problem that has gone unnoticed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this would be a problem. I can understand how we would have missed this for spec.endpointPublishingStrategy.scope
: spec.endpointPublishingStrategy
is optional, and the operator-created default ingresscontroller does not specify it. However, I wonder why we have not seen problems with status.endpointPublishingStrategy.scope
during upgrade tests. I'll launch a 4.1 cluster, set spec.endpointPublishingStrategy
with null spec.endpointPublishingStrategy.scope
, upgrade the cluster to 4.2, and report back what happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Miciah based on your upgrade testing, seems like this is going to be okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, the changing required
value did not seem to have any effect: I performed the steps I laid out in my previous comment and saw no errors in the operator logs or command output when the upgraded ingress operator reconciled the old IngressController resource that had spec.endpointPublishingStrategy
but not spec.endpointPublishingStrategy.scope
set and when I tried to update the resource using oc annotate
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Facepalm: endpointPublishingStrategy.loadBalancer
is optional, so endpointPublishingStrategy.loadBalancer.scope
can be required. I erroneously wrote endpointPublishingStrategy.scope
instead of endpointPublishingStrategy.loadBalancer.scope
earlier. I think 4.2 is fine to make scope
required, and we should keep it required in 4.3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openshift/api#446 will decide the fate of this field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -481,8 +128,6 @@ spec: | |||
networking, and is not explicitly published. The user must manually | |||
publish the ingress controller." | |||
type: string | |||
required: | |||
- type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks suspicious
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added +optional
when I added +unionDiscriminator
in openshift/api@2024105#diff-85d84174432a6d2df99d107129e012f8R246, but maybe I shouldn't have. https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/20190325-unions.md#go-tags says, "// +unionDiscriminator
before a field means that this field is the discriminator for the union. Only one field per structure can have this prefix. This field HAS TO be a string, and CAN be optional."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Miciah what do you propose we do here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know of a reason why this field should be marked as optional (it came up during review: openshift/api#312 (comment), but I do not see a reason given why it should be optional). spec.endpointPublishingStrategy
is optional, so I believe type
does not need to be so. If it is not too late to do so, I would like to remove +optional
. The question that was raised in the discussion about the +nullable
markers applies here: Since the old generated CRD does not reflect the markers, is it safe to remove them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like with nullable, how about open a PR and let's get the discussion centralized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -705,9 +361,6 @@ spec: | |||
type: string | |||
type: | |||
type: string | |||
required: | |||
- type | |||
- status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks suspicious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @Miciah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sttts Isn't this from https://github.com/openshift/api/blob/master/operator/v1/types.go#L148? They aren't omit empty
and aren't explicitly marked required (the package default is optional). Is something wrong with the shared OperatorCondition struct's markers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussion in openshift/api#445
properties: | ||
scope: | ||
description: scope indicates the scope at which the load balancer | ||
is exposed. Possible values are "External" and "Internal". The | ||
default is "External". | ||
type: string | ||
required: | ||
- scope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suspicious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Status mirrored from spec... should it follow the same validation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this should be optional and the requiredness was possibly a mistake. See #301 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Miciah based on your upgrade testing, seems like this is going to be okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
893677b
to
cdc36f9
Compare
@Miciah updated to incorporate openshift/api#440 and openshift/api#438, PTAL |
Waiting on openshift/library-go#531 to pick up openshift/api#442. |
cdc36f9
to
3e34532
Compare
required: | ||
- availableReplicas | ||
- selector | ||
- domain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Miciah hmmm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in status
, so I don't know that we care...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to think about this one. Maybe @deads2k can help or knows who can.
3e34532
to
1e17863
Compare
@Miciah I think I got this all cleaned up with the exception of openshift/api#445 which we can address in a followup as necessary. PTAL. |
We need to sort out openshift/api#445 as well as #301 (comment) (concerning |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ironcladlou, Miciah The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Depends on kubernetes-sigs/controller-runtime#588.
TODO