From 0acdc89d967f0330be76e826a23ecfd44c1304bd Mon Sep 17 00:00:00 2001 From: Zihong Zheng Date: Tue, 6 Jun 2017 17:27:07 -0700 Subject: [PATCH] Pipe in GCE master/node tags through flags for e2e test --- hack/ginkgo-e2e.sh | 2 ++ hack/verify-flags/known-flags.txt | 2 ++ test/e2e/framework/test_context.go | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/hack/ginkgo-e2e.sh b/hack/ginkgo-e2e.sh index 246b5ef945b..bb52e3702bb 100755 --- a/hack/ginkgo-e2e.sh +++ b/hack/ginkgo-e2e.sh @@ -150,6 +150,8 @@ export PATH=$(dirname "${e2e_test}"):"${PATH}" --node-instance-group="${NODE_INSTANCE_GROUP:-}" \ --prefix="${KUBE_GCE_INSTANCE_PREFIX:-e2e}" \ --network="${KUBE_GCE_NETWORK:-${KUBE_GKE_NETWORK:-e2e}}" \ + --node-tag="${NODE_TAG:-}" \ + --master-tag="${MASTER_TAG:-}" \ --federated-kube-context="${FEDERATION_KUBE_CONTEXT:-e2e-federation}" \ ${KUBE_CONTAINER_RUNTIME:+"--container-runtime=${KUBE_CONTAINER_RUNTIME}"} \ ${MASTER_OS_DISTRIBUTION:+"--master-os-distro=${MASTER_OS_DISTRIBUTION}"} \ diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index b504324bb95..991aa53aa75 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -452,6 +452,7 @@ manifest-url-header masquerade-all master-os-distro master-service-namespace +master-tag max-concurrency max-connection-bytes-per-sec maximum-dead-containers @@ -512,6 +513,7 @@ node-schedulable-timeout node-startup-grace-period node-status-update-frequency node-sync-period +node-tag no-headers no-headers non-masquerade-cidr diff --git a/test/e2e/framework/test_context.go b/test/e2e/framework/test_context.go index 07ed74b2822..5945867e395 100644 --- a/test/e2e/framework/test_context.go +++ b/test/e2e/framework/test_context.go @@ -143,6 +143,8 @@ type CloudConfig struct { ClusterTag string Network string ConfigFile string // for azure and openstack + NodeTag string + MasterTag string Provider cloudprovider.Interface } @@ -210,6 +212,8 @@ func RegisterClusterFlags() { flag.StringVar(&cloudConfig.NodeInstanceGroup, "node-instance-group", "", "Name of the managed instance group for nodes. Valid only for gce, gke or aws. If there is more than one group: comma separated list of groups.") flag.StringVar(&cloudConfig.Network, "network", "e2e", "The cloud provider network for this e2e cluster.") flag.IntVar(&cloudConfig.NumNodes, "num-nodes", -1, "Number of nodes in the cluster") + flag.StringVar(&cloudConfig.NodeTag, "node-tag", "", "Network tags used on node instances. Valid only for gce, gke") + flag.StringVar(&cloudConfig.MasterTag, "master-tag", "", "Network tags used on master instances. Valid only for gce, gke") flag.StringVar(&cloudConfig.ClusterTag, "cluster-tag", "", "Tag used to identify resources. Only required if provider is aws.") flag.StringVar(&cloudConfig.ConfigFile, "cloud-config-file", "", "Cloud config file. Only required if provider is azure.")