-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add check for coredns deployment
- Loading branch information
1 parent
1cf57db
commit 7792578
Showing
3 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//go:build e2e | ||
|
||
// Copyright 2024 Nutanix. All rights reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package e2e | ||
|
||
import ( | ||
"context" | ||
|
||
appsv1 "k8s.io/api/apps/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" | ||
"sigs.k8s.io/cluster-api/test/framework" | ||
) | ||
|
||
type WaitForCoreDNSToBeReadyInWorkloadClusterInput struct { | ||
WorkloadCluster *clusterv1.Cluster | ||
ClusterProxy framework.ClusterProxy | ||
DeploymentIntervals []interface{} | ||
} | ||
|
||
func WaitForCoreDNSToBeReadyInWorkloadCluster( | ||
ctx context.Context, | ||
input WaitForCoreDNSToBeReadyInWorkloadClusterInput, | ||
) { | ||
workloadClusterClient := input.ClusterProxy.GetWorkloadCluster( | ||
ctx, input.WorkloadCluster.Namespace, input.WorkloadCluster.Name, | ||
).GetClient() | ||
|
||
WaitForDeploymentsAvailable(ctx, framework.WaitForDeploymentsAvailableInput{ | ||
Getter: workloadClusterClient, | ||
Deployment: &appsv1.Deployment{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: "coredns", | ||
Namespace: metav1.NamespaceSystem, | ||
}, | ||
}, | ||
}, input.DeploymentIntervals...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters