-
Notifications
You must be signed in to change notification settings - Fork 190
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
USHIFT-2444: Router enable/disable #3095
Conversation
@pacevedom: This pull request references USHIFT-2444 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
/hold |
/hold cancel |
/hold |
fc32f9e
to
2ef56cd
Compare
/hold cancel |
packaging/microshift/config.yaml
Outdated
@@ -20,6 +20,8 @@ etcd: | |||
ingress: | |||
routeAdmissionPolicy: | |||
namespaceOwnership: InterNamespaceAllowed | |||
# Default router status, can be Enabled or Disabled. | |||
status: Enabled |
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.
Why do we have a comment for this field, but not the one above it? This is auto-generated, right?
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.
Addressed in #3148
/retest |
@@ -128,6 +128,23 @@ func startIngressController(ctx context.Context, cfg *config.Config, kubeconfigP | |||
cm = "components/openshift-router/configmap.yaml" | |||
servingKeypairSecret = "components/openshift-router/serving-certificate.yaml" | |||
) | |||
|
|||
if cfg.Ingress.Status == config.StatusRemoved { |
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.
Do you think a log would be useful here or already existing logs are enough?
I see there's log in the Handler but it doesn't say what it does (aka whether it's an applier or deleter).
There are some recorders in library-go but do they log to stdout or it's only k8s events?
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.
Good question. Right before deleting you may see this:
Apr 04 12:48:33 microshift-dev microshift[241561]: infrastructure-services-manager I0404 12:48:33.898763 241561 rbac.go:198] Handling rbac components/openshift-router/cluster-role-binding.yaml
Apr 04 12:48:33 microshift-dev microshift[241561]: infrastructure-services-manager I0404 12:48:33.911522 241561 recorder_logging.go:44] &Event{ObjectMeta:{dummy.17c30e08b64532ab dummy 0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] [] []},InvolvedObject:ObjectReference{Kind:Pod,Namespace:dummy,Name:dummy,UID:,APIVersion:v1,ResourceVersion:,FieldPath:,},Reason:ClusterRoleBindingDeleted,Message:Deleted ClusterRoleBinding.rbac.authorization.k8s.io/openshift-ingress-router,Source:EventSource{Component:,Host:,},FirstTimestamp:2024-04-04 12:48:33.911435947 +0200 CEST m=+24.091934968,LastTimestamp:2024-04-04 12:48:33.911435947 +0200 CEST m=+24.091934968,Count:1,Type:Normal,EventTime:0001-01-01 00:00:00 +0000 UTC,Series:nil,Action:,Related:nil,ReportingController:,ReportingInstance:,}
Apr 04 12:48:33 microshift-dev microshift[241561]: infrastructure-services-manager I0404 12:48:33.912268 241561 rbac.go:198] Handling rbac components/openshift-router/cluster-role.yaml
Apr 04 12:48:33 microshift-dev microshift[241561]: infrastructure-services-manager I0404 12:48:33.916534 241561 recorder_logging.go:44] &Event{ObjectMeta:{dummy.17c30e08b691d022 dummy 0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] [] []},InvolvedObject:ObjectReference{Kind:Pod,Namespace:dummy,Name:dummy,UID:,APIVersion:v1,ResourceVersion:,FieldPath:,},Reason:ClusterRoleDeleted,Message:Deleted ClusterRole.rbac.authorization.k8s.io/openshift-ingress-router,Source:EventSource{Component:,Host:,},FirstTimestamp:2024-04-04 12:48:33.916456994 +0200 CEST m=+24.096956014,LastTimestamp:2024-04-04 12:48:33.916456994 +0200 CEST m=+24.096956014,Count:1,Type:Normal,EventTime:0001-01-01 00:00:00 +0000 UTC,Series:nil,Action:,Related:nil,ReportingController:,ReportingInstance:,}
Apr 04 12:48:33 microshift-dev microshift[241561]: infrastructure-services-manager I0404 12:48:33.916554 241561 rbac.go:198] Handling rbac components/openshift-router/cluster-role-aggregate-route.yaml
Apr 04 12:48:33 microshift-dev microshift[241561]: infrastructure-services-manager I0404 12:48:33.920654 241561 recorder_logging.go:44] &Event{ObjectMeta:{dummy.17c30e08b6d0e1e5 dummy 0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] [] []},InvolvedObject:ObjectReference{Kind:Pod,Namespace:dummy,Name:dummy,UID:,APIVersion:v1,ResourceVersion:,FieldPath:,},Reason:ClusterRoleDeleted,Message:Deleted ClusterRole.rbac.authorization.k8s.io/aggregate-route,Source:EventSource{Component:,Host:,},FirstTimestamp:2024-04-04 12:48:33.920590309 +0200 CEST m=+24.101089338,LastTimestamp:2024-04-04 12:48:33.920590309 +0200 CEST m=+24.101089338,Count:1,Type:Normal,EventTime:0001-01-01 00:00:00 +0000 UTC,Series:nil,Action:,Related:nil,ReportingController:,ReportingInstance:,}
Apr 04 12:48:33 microshift-dev microshift[241561]: infrastructure-services-manager I0404 12:48:33.920676 241561 rbac.go:198] Handling rbac components/openshift-router/cluster-role-system-router.yaml
Apr 04 12:48:33 microshift-dev microshift[241561]: infrastructure-services-manager I0404 12:48:33.924116 241561 recorder_logging.go:44] &Event{ObjectMeta:{dummy.17c30e08b705e295 dummy 0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] [] []},InvolvedObject:ObjectReference{Kind:Pod,Namespace:dummy,Name:dummy,UID:,APIVersion:v1,ResourceVersion:,FieldPath:,},Reason:ClusterRoleDeleted,Message:Deleted ClusterRole.rbac.authorization.k8s.io/system:router,Source:EventSource{Component:,Host:,},FirstTimestamp:2024-04-04 12:48:33.924063893 +0200 CEST m=+24.104562915,LastTimestamp:2024-04-04 12:48:33.924063893 +0200 CEST m=+24.104562915,Count:1,Type:Normal,EventTime:0001-01-01 00:00:00 +0000 UTC,Series:nil,Action:,Related:nil,ReportingController:,ReportingInstance:,}
Apr 04 12:48:33 microshift-dev microshift[241561]: infrastructure-services-manager I0404 12:48:33.924672 241561 core.go:144] Applying corev1 api components/openshift-router/namespace.yaml
Apr 04 12:48:33 microshift-dev microshift[241561]: infrastructure-services-manager I0404 12:48:33.929807 241561 recorder_logging.go:44] &Event{ObjectMeta:{dummy.17c30e08b75ca237 dummy 0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] [] []},InvolvedObject:ObjectReference{Kind:Pod,Namespace:dummy,Name:dummy,UID:,APIVersion:v1,ResourceVersion:,FieldPath:,},Reason:NamespaceDeleted,Message:Deleted Namespace/openshift-ingress,Source:EventSource{Component:,Host:,},FirstTimestamp:2024-04-04 12:48:33.929749047 +0200 CEST m=+24.110248060,LastTimestamp:2024-04-04 12:48:33.929749047 +0200 CEST m=+24.110248060,Count:1,Type:Normal,EventTime:0001-01-01 00:00:00 +0000 UTC,Series:nil,Action:,Related:nil,ReportingController:,ReportingInstance:,}
And then the whole process unravels and you may see logs from the deployment removal
Apr 04 12:48:43 microshift-dev microshift[241561]: kubelet I0404 12:48:43.885332 241561 kubelet.go:2445] "SyncLoop DELETE" source="api" pods=["openshift-ingress/router-default-6bbdd96d5-gcrjw"]
Apr 04 12:48:44 microshift-dev microshift[241561]: kube-controller-manager I0404 12:48:44.006699 241561 garbagecollector.go:688] "Deleting item" item="[discovery.k8s.io/v1/EndpointSlice, namespace: openshift-ingress, name: router-default-vkr4s, uid: f2d6e713-156d-4431-ac75-c33917be2636]" propagationPolicy="Background"
Apr 04 12:48:44 microshift-dev microshift[241561]: kube-controller-manager I0404 12:48:44.102360 241561 replica_set.go:676] "Finished syncing" kind="ReplicaSet" key="openshift-ingress/router-default-6bbdd96d5" duration="9.643µs"
Apr 04 12:49:14 microshift-dev microshift[241561]: kubelet I0404 12:49:14.493753 241561 kubelet.go:2461] "SyncLoop (PLEG): event for pod" pod="openshift-ingress/router-default-6bbdd96d5-gcrjw" event={"ID":"6f9354b8-441d-4769-8f83-d7656978163d","Type":"ContainerDied","Data":"f19347a7f94065fd2bb23d9beecc6909721021f00def8cd1dbbbe5aa97d6ee9f"}
Apr 04 12:49:15 microshift-dev microshift[241561]: kubelet I0404 12:49:15.565430 241561 kubelet.go:2445] "SyncLoop DELETE" source="api" pods=["openshift-ingress/router-default-6bbdd96d5-gcrjw"]
Apr 04 12:49:15 microshift-dev microshift[241561]: kubelet I0404 12:49:15.573106 241561 kubelet.go:2439] "SyncLoop REMOVE" source="api" pods=["openshift-ingress/router-default-6bbdd96d5-gcrjw"]
Would this be enough?
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pacevedom, pmtk 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 |
@pacevedom: 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. |
Which issue(s) this PR addresses:
Closes #