Skip to content

Rebase to ingest fix for Route CR defaulting disparities.#1192

Closed
benluddy wants to merge 4 commits intoopenshift:mainfrom
benluddy:ocpbugs-4189-route-defaulting-disparity
Closed

Rebase to ingest fix for Route CR defaulting disparities.#1192
benluddy wants to merge 4 commits intoopenshift:mainfrom
benluddy:ocpbugs-4189-route-defaulting-disparity

Conversation

@benluddy
Copy link
Contributor

@benluddy benluddy commented Dec 13, 2022

To be replaced by an OCP rebase once admission changes have merged.

When serialized in the request as the empty string, spec.to.kind is defaulted to "Service".

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     kind: ""
>     name: hello-microshift
> EOF
route.route.openshift.io/hello-microshift created
$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  annotations:
    openshift.io/host.generated: "true"
  creationTimestamp: "2022-12-13T16:47:57Z"
  generation: 1
  name: hello-microshift
  namespace: default
  resourceVersion: "333208"
  uid: 2b77318d-806e-4ac4-b93d-d2e352129595
spec:
  host: hello-microshift-default.apps.microshift.example.com
  to:
    kind: Service
    name: hello-microshift
    weight: 100
  wildcardPolicy: None

When spec.tls is serialized in the request as an empty object, spec.tls.termination defaults to "edge":

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     name: hello-microshift
>   tls: {}
> EOF
route.route.openshift.io/hello-microshift created
$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  annotations:
    openshift.io/host.generated: "true"
  creationTimestamp: "2022-12-13T16:49:32Z"
  generation: 1
  name: hello-microshift
  namespace: default
  resourceVersion: "333263"
  uid: c2ded194-1c5a-43b2-840c-6b245f07655f
spec:
  host: hello-microshift-default.apps.microshift.example.com
  tls:
    termination: edge
  to:
    kind: Service
    name: hello-microshift
    weight: 100
  wildcardPolicy: None

Uppercase value "Edge" for spec.tls.termination is converted to "edge":

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     name: hello-microshift
>   tls:
>     termination: Edge
> EOF
route.route.openshift.io/hello-microshift created
$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  annotations:
    openshift.io/host.generated: "true"
  creationTimestamp: "2022-12-13T16:51:16Z"
  generation: 1
  name: hello-microshift
  namespace: default
  resourceVersion: "333295"
  uid: 0cf79a40-3ad4-47a6-9acd-68ba0095cf22
spec:
  host: hello-microshift-default.apps.microshift.example.com
  tls:
    termination: edge
  to:
    kind: Service
    name: hello-microshift
    weight: 100
  wildcardPolicy: None

When serialized in the request as "", spec.wildcardPolicy defaults to "None":

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     name: hello-microshift
>   wildcardPolicy: ""
> EOF
route.route.openshift.io/hello-microshift created
$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  annotations:
    openshift.io/host.generated: "true"
  creationTimestamp: "2022-12-13T16:53:50Z"
  generation: 1
  name: hello-microshift
  namespace: default
  resourceVersion: "333344"
  uid: 22e55670-691e-4f6c-9c7b-64534a1a2044
spec:
  host: hello-microshift-default.apps.microshift.example.com
  to:
    kind: Service
    name: hello-microshift
    weight: 100
  wildcardPolicy: None

@openshift-ci-robot
Copy link

@benluddy: This pull request references Jira Issue OCPBUGS-4189, which is invalid:

  • expected the bug to target the "4.13.0" version, but it targets "4.12.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

To be replaced by an OCP rebase once admission changes have merged.

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.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Dec 13, 2022
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 13, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 13, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 13, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benluddy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 13, 2022
@openshift-ci-robot
Copy link

@benluddy: This pull request references Jira Issue OCPBUGS-4189, which is invalid:

  • expected the bug to target the "4.13.0" version, but it targets "4.12.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

To be replaced by an OCP rebase once admission changes have merged.

When serialized in the request as the empty string, spec.to.kind is defaulted to "Service".

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     kind: ""
>     name: hello-microshift
> EOF
route.route.openshift.io/hello-microshift created
$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
 annotations:
   openshift.io/host.generated: "true"
 creationTimestamp: "2022-12-13T16:47:57Z"
 generation: 1
 name: hello-microshift
 namespace: default
 resourceVersion: "333208"
 uid: 2b77318d-806e-4ac4-b93d-d2e352129595
spec:
 host: hello-microshift-default.apps.microshift.example.com
 to:
   kind: Service
   name: hello-microshift
   weight: 100
 wildcardPolicy: None

When spec.tls is serialized in the request as an empty object, spec.tls.termination defaults to "edge":

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     name: hello-microshift
>   tls: {}
> EOF
route.route.openshift.io/hello-microshift created
$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
 annotations:
   openshift.io/host.generated: "true"
 creationTimestamp: "2022-12-13T16:49:32Z"
 generation: 1
 name: hello-microshift
 namespace: default
 resourceVersion: "333263"
 uid: c2ded194-1c5a-43b2-840c-6b245f07655f
spec:
 host: hello-microshift-default.apps.microshift.example.com
 tls:
   termination: edge
 to:
   kind: Service
   name: hello-microshift
   weight: 100
 wildcardPolicy: None

Uppercase value "Edge" for spec.tls.termination is converted to "edge":

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     name: hello-microshift
>   tls:
>     termination: Edge
> EOF
route.route.openshift.io/hello-microshift created
[vagrant@microshift ~]$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
 annotations:
   openshift.io/host.generated: "true"
 creationTimestamp: "2022-12-13T16:51:16Z"
 generation: 1
 name: hello-microshift
 namespace: default
 resourceVersion: "333295"
 uid: 0cf79a40-3ad4-47a6-9acd-68ba0095cf22
spec:
 host: hello-microshift-default.apps.microshift.example.com
 tls:
   termination: edge
 to:
   kind: Service
   name: hello-microshift
   weight: 100
 wildcardPolicy: None

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.

1 similar comment
@openshift-ci-robot
Copy link

@benluddy: This pull request references Jira Issue OCPBUGS-4189, which is invalid:

  • expected the bug to target the "4.13.0" version, but it targets "4.12.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

To be replaced by an OCP rebase once admission changes have merged.

When serialized in the request as the empty string, spec.to.kind is defaulted to "Service".

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     kind: ""
>     name: hello-microshift
> EOF
route.route.openshift.io/hello-microshift created
$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
 annotations:
   openshift.io/host.generated: "true"
 creationTimestamp: "2022-12-13T16:47:57Z"
 generation: 1
 name: hello-microshift
 namespace: default
 resourceVersion: "333208"
 uid: 2b77318d-806e-4ac4-b93d-d2e352129595
spec:
 host: hello-microshift-default.apps.microshift.example.com
 to:
   kind: Service
   name: hello-microshift
   weight: 100
 wildcardPolicy: None

When spec.tls is serialized in the request as an empty object, spec.tls.termination defaults to "edge":

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     name: hello-microshift
>   tls: {}
> EOF
route.route.openshift.io/hello-microshift created
$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
 annotations:
   openshift.io/host.generated: "true"
 creationTimestamp: "2022-12-13T16:49:32Z"
 generation: 1
 name: hello-microshift
 namespace: default
 resourceVersion: "333263"
 uid: c2ded194-1c5a-43b2-840c-6b245f07655f
spec:
 host: hello-microshift-default.apps.microshift.example.com
 tls:
   termination: edge
 to:
   kind: Service
   name: hello-microshift
   weight: 100
 wildcardPolicy: None

Uppercase value "Edge" for spec.tls.termination is converted to "edge":

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     name: hello-microshift
>   tls:
>     termination: Edge
> EOF
route.route.openshift.io/hello-microshift created
[vagrant@microshift ~]$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
 annotations:
   openshift.io/host.generated: "true"
 creationTimestamp: "2022-12-13T16:51:16Z"
 generation: 1
 name: hello-microshift
 namespace: default
 resourceVersion: "333295"
 uid: 0cf79a40-3ad4-47a6-9acd-68ba0095cf22
spec:
 host: hello-microshift-default.apps.microshift.example.com
 tls:
   termination: edge
 to:
   kind: Service
   name: hello-microshift
   weight: 100
 wildcardPolicy: None

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.

@benluddy benluddy force-pushed the ocpbugs-4189-route-defaulting-disparity branch from 6b77de3 to 9add5b8 Compare December 15, 2022 21:53
@benluddy
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link

@benluddy: This pull request references Jira Issue OCPBUGS-4189, which is invalid:

  • expected the bug to target the "4.13.0" version, but it targets "4.12.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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.

@benluddy benluddy changed the title OCPBUGS-4189: Proof PR to demonstrate Route CR defaulting fix. OCPBUGS-4189: Rebase to ingest fix forRoute CR defaulting disparities. Dec 15, 2022
@benluddy benluddy changed the title OCPBUGS-4189: Rebase to ingest fix forRoute CR defaulting disparities. OCPBUGS-4189: Rebase to ingest fix for Route CR defaulting disparities. Dec 15, 2022
@benluddy benluddy marked this pull request as ready for review December 15, 2022 21:58
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 15, 2022
@benluddy
Copy link
Contributor Author

bot things

This looks like a misconfiguration given that microshift's main branch is still tracking release-4.12, right?

/retitle Rebase to ingest fix for Route CR defaulting disparities.

@openshift-ci openshift-ci bot changed the title OCPBUGS-4189: Rebase to ingest fix for Route CR defaulting disparities. Rebase to ingest fix for Route CR defaulting disparities. Dec 15, 2022
@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Dec 15, 2022
@openshift-ci-robot
Copy link

@benluddy: No Jira bug is referenced in the title of this pull request.
To reference a bug, add 'OCPBUGS-XXX:' to the title of this pull request and request another bug refresh with /jira refresh.

Details

In response to this:

To be replaced by an OCP rebase once admission changes have merged.

When serialized in the request as the empty string, spec.to.kind is defaulted to "Service".

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     kind: ""
>     name: hello-microshift
> EOF
route.route.openshift.io/hello-microshift created
$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
 annotations:
   openshift.io/host.generated: "true"
 creationTimestamp: "2022-12-13T16:47:57Z"
 generation: 1
 name: hello-microshift
 namespace: default
 resourceVersion: "333208"
 uid: 2b77318d-806e-4ac4-b93d-d2e352129595
spec:
 host: hello-microshift-default.apps.microshift.example.com
 to:
   kind: Service
   name: hello-microshift
   weight: 100
 wildcardPolicy: None

When spec.tls is serialized in the request as an empty object, spec.tls.termination defaults to "edge":

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     name: hello-microshift
>   tls: {}
> EOF
route.route.openshift.io/hello-microshift created
$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
 annotations:
   openshift.io/host.generated: "true"
 creationTimestamp: "2022-12-13T16:49:32Z"
 generation: 1
 name: hello-microshift
 namespace: default
 resourceVersion: "333263"
 uid: c2ded194-1c5a-43b2-840c-6b245f07655f
spec:
 host: hello-microshift-default.apps.microshift.example.com
 tls:
   termination: edge
 to:
   kind: Service
   name: hello-microshift
   weight: 100
 wildcardPolicy: None

Uppercase value "Edge" for spec.tls.termination is converted to "edge":

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     name: hello-microshift
>   tls:
>     termination: Edge
> EOF
route.route.openshift.io/hello-microshift created
$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
 annotations:
   openshift.io/host.generated: "true"
 creationTimestamp: "2022-12-13T16:51:16Z"
 generation: 1
 name: hello-microshift
 namespace: default
 resourceVersion: "333295"
 uid: 0cf79a40-3ad4-47a6-9acd-68ba0095cf22
spec:
 host: hello-microshift-default.apps.microshift.example.com
 tls:
   termination: edge
 to:
   kind: Service
   name: hello-microshift
   weight: 100
 wildcardPolicy: None

When serialized in the request as "", spec.wildcardPolicy defaults to "None":

$ cat <<EOF | oc apply -f-
> apiVersion: route.openshift.io/v1
> kind: Route
> metadata:
>   name: hello-microshift
> spec:
>   to:
>     name: hello-microshift
>   wildcardPolicy: ""
> EOF
route.route.openshift.io/hello-microshift created
$ oc get route hello-microshift -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
 annotations:
   openshift.io/host.generated: "true"
 creationTimestamp: "2022-12-13T16:53:50Z"
 generation: 1
 name: hello-microshift
 namespace: default
 resourceVersion: "333344"
 uid: 22e55670-691e-4f6c-9c7b-64534a1a2044
spec:
 host: hello-microshift-default.apps.microshift.example.com
 to:
   kind: Service
   name: hello-microshift
   weight: 100
 wildcardPolicy: None

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.

@benluddy
Copy link
Contributor Author

/cc @fzdarsky

@openshift-ci openshift-ci bot requested a review from fzdarsky December 15, 2022 22:03
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 15, 2022

@benluddy: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

@pmtk
Copy link
Member

pmtk commented Dec 16, 2022

We merged a rebase PR with (almost; I think this does not include arm images) the same content - I think this can be closed, can you confirm @benluddy?

@benluddy
Copy link
Contributor Author

/hold

That should do it, but I'll recompile and test to be entirely sure.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 16, 2022
@benluddy
Copy link
Contributor Author

Yes, checked the same smoke tests using a nightly from today and they worked fine. Thanks!

/close

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 16, 2022
@openshift-merge-robot
Copy link
Contributor

@benluddy: PR needs rebase.

Details

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.

@openshift-ci openshift-ci bot closed this Dec 16, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 16, 2022

@benluddy: Closed this PR.

Details

In response to this:

Yes, checked the same smoke tests using a nightly from today and they worked fine. Thanks!

/close

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.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants