mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-12 21:40:29 +00:00
Merge pull request #48309 from MrHohn/e2e-fix-ingress-tag
Automatic merge from submit-queue [e2e-ingress] Get node tag from instance under GKE **What this PR does / why we need it**: Making ingress CI green again. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #48167 **Special notes for your reviewer**: /assign @nicksardo **Release note**: ```release-note NONE ```
This commit is contained in:
@@ -124,6 +124,16 @@ func SetInstanceTags(cloudConfig CloudConfig, instanceName, zone string, tags []
|
||||
return resTags.Items
|
||||
}
|
||||
|
||||
// GetNodeTags gets k8s node tag from one of the nodes
|
||||
func GetNodeTags(c clientset.Interface, cloudConfig CloudConfig) []string {
|
||||
nodes := GetReadySchedulableNodesOrDie(c)
|
||||
if len(nodes.Items) == 0 {
|
||||
Logf("GetNodeTags: Found 0 node.")
|
||||
return []string{}
|
||||
}
|
||||
return GetInstanceTags(cloudConfig, nodes.Items[0].Name).Items
|
||||
}
|
||||
|
||||
// GetInstancePrefix returns the INSTANCE_PREFIX env we set for e2e cluster.
|
||||
// From cluster/gce/config-test.sh, master name is set up using below format:
|
||||
// MASTER_NAME="${INSTANCE_PREFIX}-master"
|
||||
|
||||
Reference in New Issue
Block a user