Skip to content

AutoDiscoverProvider leads to wrong result #2920

@akesser

Description

@akesser

The code in pkg/controller/utils/discovery.go in the function autodetectFromGroup results in wrong results.

We run tigera-operater on EKS and the installation uses: kubernetesProvider: EKS but we observed the following error:

Installation spec.kubernetesProvider 'EKS' does not match auto-detected value 'GKE'

We found out that the code

if g.Name == "networking.gke.io" {
	// Running on GKE.
	return operatorv1.ProviderGKE, nil
}

is responsible for our Problem. We are using fqdnnetworkpolicies in the group networking.gke.io and therefore autodetectFromGroup results in the wrong value.

Expected Behavior

Tigera Operator should detect the correct cluster type

Current Behavior

tigera-operator blives to be in GKE and complains about the kubernetesProvider: EKS setting in the installation

Possible Solution

Allow to disable AutoDiscoverProvider by using a ENV variable or a argument for the operator

Steps to Reproduce (for bugs)

  1. install fqdnnetworkpolicies.networking.gke.io on a EKS cluster
  2. start tigera-operator

Context

Your Environment

  • Operating System and version:
  • Link to your project (optional):

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions