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

OCPBUGS-18248: Prevent GatewayClass from getting recreated #975

Conversation

gcs278
Copy link
Contributor

@gcs278 gcs278 commented Sep 13, 2023

Add PILOT_ENABLE_GATEWAY_API_GATEWAYCLASS_CONTROLLER=false to SMCP PILOT ENV variables to disable the GatewayClass Controller in OSSM. This will prevent OSSM from recreating the openshift-default GatewayClass.

pkg/operator/controller/gatewayclass/servicemeshcontrolplane.go: Add PILOT_ENABLE_GATEWAY_API_GATEWAYCLASS_CONTROLLER=false to SMCP.

Add PILOT_ENABLE_GATEWAY_API_GATEWAYCLASS_CONTROLLER=false to SMCP PILOT
ENV variables to disable the GatewayClass Controller in OSSM. This will
prevent OSSM from recreating the openshift-default GatewayClass.

`pkg/operator/controller/gatewayclass/servicemeshcontrolplane.go`: Add
PILOT_ENABLE_GATEWAY_API_GATEWAYCLASS_CONTROLLER=false to SMCP.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 13, 2023
@openshift-ci-robot
Copy link
Contributor

@gcs278: This pull request references Jira Issue OCPBUGS-18248, which is invalid:

  • expected the bug to target the "4.15.0" version, but no target version was set

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.

In response to this:

Add PILOT_ENABLE_GATEWAY_API_GATEWAYCLASS_CONTROLLER=false to SMCP PILOT ENV variables to disable the GatewayClass Controller in OSSM. This will prevent OSSM from recreating the openshift-default GatewayClass.

pkg/operator/controller/gatewayclass/servicemeshcontrolplane.go: Add PILOT_ENABLE_GATEWAY_API_GATEWAYCLASS_CONTROLLER=false to SMCP.

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 Sep 13, 2023
@gcs278
Copy link
Contributor Author

gcs278 commented Sep 13, 2023

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Sep 13, 2023
@openshift-ci-robot
Copy link
Contributor

@gcs278: This pull request references Jira Issue OCPBUGS-18248, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

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.

@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 Sep 13, 2023
@gcs278
Copy link
Contributor Author

gcs278 commented Sep 13, 2023

/hold
Looks like 2.4.3 isn't out yet, of which I need for the fix in https://issues.redhat.com/browse/OSSM-4627. Rather than mess with daily builds, I'm going to hold until 2.4.3 is GA.

@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 Sep 13, 2023
@gcs278
Copy link
Contributor Author

gcs278 commented Sep 20, 2023

2.4.3 was just released. So I tested this manually and it works well:

[gspence@gspence-thinkpadp1gen3 cluster-ingress-operator]$ oc create -f -<<'EOF'
apiVersion: gateway.networking.k8s.io/v1beta1
kind: GatewayClass
metadata:
  name: openshift-default
spec:
  controllerName: openshift.io/gateway-controller
EOF
gatewayclass.gateway.networking.k8s.io/openshift-default created

# I waited 1-2 minutes
[gspence@gspence-thinkpadp1gen3 cluster-ingress-operator]$ oc get smcp -n openshift-ingress
error: the server doesn't have a resource type "smcp"
[gspence@gspence-thinkpadp1gen3 cluster-ingress-operator]$ oc get smcp -n openshift-ingress
error: the server doesn't have a resource type "smcp"
NAME                READY   STATUS            PROFILES      VERSION   AGE
openshift-gateway   5/5     ComponentsReady   ["default"]   2.4.3     40s
[gspence@gspence-thinkpadp1gen3 cluster-ingress-operator]$ oc get deployment -n openshift-ingress
NAME                       READY   UP-TO-DATE   AVAILABLE   AGE
istio-ingressgateway       1/1     1            1           44s
istiod-openshift-gateway   1/1     1            1           56s
router-default             2/2     2            2           42m
[gspence@gspence-thinkpadp1gen3 cluster-ingress-operator]$ oc delete gatewayclasses.gateway.networking.k8s.io openshift-default 
gatewayclass.gateway.networking.k8s.io "openshift-default" deleted

# I waited another 5 minutes or so and kept checking
[gspence@gspence-thinkpadp1gen3 cluster-ingress-operator]$ oc get gatewayclasses.gateway.networking.k8s.io 
No resources found
[gspence@gspence-thinkpadp1gen3 cluster-ingress-operator]$ oc get gatewayclasses.gateway.networking.k8s.io 
No resources found

# The SMCP was deleted
[gspence@gspence-thinkpadp1gen3 cluster-ingress-operator]$ oc get smcp -n openshift-ingress 
No resources found in openshift-ingress namespace.

# The gateway class isn't getting recreated
[gspence@gspence-thinkpadp1gen3 cluster-ingress-operator]$ oc get gatewayclass
No resources found

@gcs278
Copy link
Contributor Author

gcs278 commented Sep 20, 2023

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 20, 2023
@Miciah
Copy link
Contributor

Miciah commented Sep 26, 2023

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 26, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 26, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 26, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 26, 2023

@gcs278: all tests passed!

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.

@openshift-merge-robot openshift-merge-robot merged commit ed6306f into openshift:master Sep 26, 2023
14 checks passed
@openshift-ci-robot
Copy link
Contributor

@gcs278: Jira Issue OCPBUGS-18248: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-18248 has been moved to the MODIFIED state.

In response to this:

Add PILOT_ENABLE_GATEWAY_API_GATEWAYCLASS_CONTROLLER=false to SMCP PILOT ENV variables to disable the GatewayClass Controller in OSSM. This will prevent OSSM from recreating the openshift-default GatewayClass.

pkg/operator/controller/gatewayclass/servicemeshcontrolplane.go: Add PILOT_ENABLE_GATEWAY_API_GATEWAYCLASS_CONTROLLER=false to SMCP.

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-merge-robot
Copy link
Contributor

Fix included in accepted release 4.15.0-0.nightly-2023-09-27-073353

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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants