Skip to content
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

Merged
merged 3 commits into from
Sep 30, 2019

Conversation

ironcladlou
Copy link
Contributor

@ironcladlou ironcladlou commented Sep 24, 2019

Depends on kubernetes-sigs/controller-runtime#588.

TODO

  • Verify correctness of the regenerated CRD manifests

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 24, 2019
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 24, 2019
@@ -442,22 +88,23 @@ spec:
hostNetwork:
description: hostNetwork holds parameters for the HostNetwork endpoint
publishing strategy. Present only if type is HostNetwork.
nullable: true
Copy link

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks suspicious.

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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?

Copy link
Contributor

@Miciah Miciah Sep 26, 2019

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks suspicious

Copy link
Contributor

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."

Copy link
Contributor Author

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks suspicious.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @Miciah

Copy link
Contributor Author

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?

Copy link
Contributor Author

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suspicious.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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).

Copy link
Contributor Author

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@ironcladlou ironcladlou changed the title WIP: dep: bump to kubernetes 1.16 dep: bump to kubernetes 1.16 Sep 24, 2019
@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Sep 24, 2019
@ironcladlou
Copy link
Contributor Author

@Miciah updated to incorporate openshift/api#440 and openshift/api#438, PTAL

@ironcladlou
Copy link
Contributor Author

Waiting on openshift/library-go#531 to pick up openshift/api#442.

required:
- availableReplicas
- selector
- domain
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Miciah hmmm

Copy link
Contributor

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...?

Copy link
Contributor Author

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.

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 25, 2019
@ironcladlou
Copy link
Contributor Author

@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.

@Miciah
Copy link
Contributor

Miciah commented Sep 30, 2019

We need to sort out openshift/api#445 as well as #301 (comment) (concerning status.availableReplicas, status.selector, and status.domain), but we can get those in a follow-up.
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 30, 2019
@openshift-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants