Skip to content

Commit

Permalink
UPSTREAM: <carry>: emit event when readyz goes true
Browse files Browse the repository at this point in the history
openshift-rebase(v1.24):source=2fac715cabd
  • Loading branch information
deads2k authored and soltysh committed Aug 22, 2022
1 parent e3d97da commit c1c3dfd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/controlplane/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ func (c *Controller) RunKubernetesService(ch chan struct{}) {
return code == http.StatusOK, nil
}, ch)

kubeAPIServerEmitEventFn(corev1.EventTypeWarning, "KubeAPIReadyz", "readyz=true")

wait.NonSlidingUntil(func() {
// Service definition is not reconciled after first
// run, ports and type will be corrected only during
Expand Down
1 change: 1 addition & 0 deletions pkg/controlplane/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget)
GenericAPIServer: s,
ClusterAuthenticationInfo: c.ExtraConfig.ClusterAuthenticationInfo,
}
kubeAPIServerEmitEventFn = m.GenericAPIServer.Eventf

// install legacy rest storage

Expand Down
5 changes: 5 additions & 0 deletions pkg/controlplane/patch.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package controlplane

var kubeAPIServerEmitEventFn EventSinkFunc = nil

type EventSinkFunc func(eventType, reason, messageFmt string, args ...interface{})

0 comments on commit c1c3dfd

Please sign in to comment.