Skip to content

Commit

Permalink
checkcrd function rename for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
networkop committed Jan 13, 2022
1 parent c8a3543 commit 264d1f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func newKubeController(ctx context.Context, c *kubernetes.Clientset, gw *gateway
gwClient: gw,
}

if checkGatewayCRDs(ctx, gw) {
if existGatewayCRDs(ctx, gw) {
if resource := lookupResource("HTTPRoute"); resource != nil {
gatewayController := cache.NewSharedIndexInformer(
&cache.ListWatch{
Expand Down Expand Up @@ -156,7 +156,7 @@ func (gw *Gateway) RunKubeController(ctx context.Context) error {

}

func checkGatewayCRDs(ctx context.Context, c *gatewayClient.Clientset) bool {
func existGatewayCRDs(ctx context.Context, c *gatewayClient.Clientset) bool {

_, err := c.GatewayV1alpha2().Gateways("").List(ctx, metav1.ListOptions{})
if meta.IsNoMatchError(err) || runtime.IsNotRegisteredError(err) || errors.IsNotFound(err) {
Expand Down

0 comments on commit 264d1f9

Please sign in to comment.