diff --git a/ci/aws/aws-cluster.lokocfg.envsubst b/ci/aws/aws-cluster.lokocfg.envsubst index 91322da8e..6d40f6e7c 100644 --- a/ci/aws/aws-cluster.lokocfg.envsubst +++ b/ci/aws/aws-cluster.lokocfg.envsubst @@ -65,6 +65,8 @@ EOF oidc {} } +component "metrics-server" {} + component "openebs-operator" {} # openebs-storage-class component should always be the last to be installed @@ -98,8 +100,6 @@ component "contour" { service_type = "NodePort" } -component "metrics-server" {} - component "cert-manager" { email = "$EMAIL" service_monitor = true diff --git a/ci/packet/packet-cluster.lokocfg.envsubst b/ci/packet/packet-cluster.lokocfg.envsubst index 2be1e134e..1fbf060ad 100644 --- a/ci/packet/packet-cluster.lokocfg.envsubst +++ b/ci/packet/packet-cluster.lokocfg.envsubst @@ -59,6 +59,8 @@ EOF oidc {} } +component "metrics-server" {} + component "openebs-operator" {} # openebs-storage-class component should always be the last to be installed @@ -93,8 +95,6 @@ component "metallb" { service_monitor = true } -component "metrics-server" {} - component "cert-manager" { email = "$EMAIL" service_monitor = true diff --git a/pkg/components/metrics-server/component.go b/pkg/components/metrics-server/component.go index a0ef246e8..903e28c68 100644 --- a/pkg/components/metrics-server/component.go +++ b/pkg/components/metrics-server/component.go @@ -93,5 +93,17 @@ func (c *component) Metadata() components.Metadata { return components.Metadata{ Name: name, Namespace: c.Namespace, + Helm: components.HelmMetadata{ + // metrics-server provides Kubernetes API Resource, so when it is unavailable, it may + // cause Kubernetes clients to fail creating the client objects, as the client discovery + // will be returning the following error: + // + // failed to create Kubernetes client: unable to retrieve the complete list of server APIs: + // metrics.k8s.io/v1beta1: the server is currently unable to handle the request + // + // Adding wait will ensure, that metrics API is available before proceeding with installation + // of other components. + Wait: true, + }, } } diff --git a/test/ingress/aws/aws_test.go b/test/ingress/aws/aws_test.go index 28fdab518..7b3580448 100644 --- a/test/ingress/aws/aws_test.go +++ b/test/ingress/aws/aws_test.go @@ -34,6 +34,7 @@ import ( const ( retryIntervalSeconds = 5 maxRetries = 60 + httpTimeout = 4 * time.Second ) func TestAWSIngress(t *testing.T) { @@ -57,6 +58,8 @@ func TestAWSIngress(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.Ingress, func(t *testing.T) { + t.Parallel() + client := testutil.CreateKubeClient(t) i, err := client.NetworkingV1beta1().Ingresses("httpbin").Get(context.TODO(), "httpbin", metav1.GetOptions{}) @@ -134,6 +137,7 @@ idWw1VrejtwclobqNMVtG3EiPUIpJGpbMcJgbiLSmKkrvQtGng== } return &http.Client{ + Timeout: httpTimeout, Transport: &http.Transport{ TLSClientConfig: &tls.Config{ RootCAs: rootCAs,