Skip to content

Commit cb2d063

Browse files
committed
gce: allow TCP metrics ports in GCE firewall for Calico CNI
1 parent 3d2208a commit cb2d063

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

pkg/model/gcemodel/firewall.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ func (b *FirewallModelBuilder) Build(c *fi.CloudupModelBuilderContext) error {
149149
if b.NetworkingIsCalico() {
150150
t.Allowed = append(t.Allowed, "ipip")
151151
t.Allowed = append(t.Allowed, fmt.Sprintf("tcp:%d", wellknownports.BGP))
152+
t.Allowed = append(t.Allowed, fmt.Sprintf("tcp:%d", wellknownports.KubeControllerManagerMetricsPort))
153+
t.Allowed = append(t.Allowed, fmt.Sprintf("tcp:%d", wellknownports.KubeSchedulerMetricsPort))
154+
t.Allowed = append(t.Allowed, fmt.Sprintf("tcp:%d", wellknownports.KubeProxyMetricsPort))
155+
t.Allowed = append(t.Allowed, fmt.Sprintf("tcp:%d", wellknownports.EtcdMetricsPort))
152156
}
153157
if b.NetworkingIsCilium() {
154158
t.Allowed = append(t.Allowed, fmt.Sprintf("udp:%d", wellknownports.VxlanUDP))

tests/e2e/scenarios/scalability/run-test.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,19 @@ set -x
1919

2020
make test-e2e-install
2121

22-
REPO_ROOT=$(git rev-parse --show-toplevel)
22+
if [[ "${FORCE_BUILD_KOPS:-}" == "true" && -n "${GCP_PROJECT:-}" ]]; then
23+
echo "Building and uploading kops to dynamic staging bucket inside ${GCP_PROJECT}"
24+
GCS_BUCKET="gs://${GCP_PROJECT}-kops-staging"
25+
gcloud storage buckets create "${GCS_BUCKET}" --project="${GCP_PROJECT}" --location=us-east1 || true
26+
export GCS_LOCATION="${GCS_BUCKET}"
27+
make gcs-publish-ci
28+
KOPS_BASE_URL=$(cat .build/upload/latest-ci.txt)
29+
export KOPS_BASE_URL
30+
echo "Staged local kops build at KOPS_BASE_URL=${KOPS_BASE_URL}"
31+
export PATH="${GOPATH}/src/k8s.io/kops/.build/dist/linux/\$(go env GOARCH):${PATH}"
32+
fi
33+
34+
REPO_ROOT=\$(git rev-parse --show-toplevel)
2335
if [[ -z "${K8S_VERSION:-}" ]]; then
2436
K8S_VERSION=https://storage.googleapis.com/k8s-release-dev/ci/latest.txt
2537
fi
@@ -163,9 +175,11 @@ KUBETEST2_ARGS+=("--pre-test-cmd=${REPO_ROOT}/tests/e2e/scenarios/scalability/pr
163175
if [[ -n "${KUBE_FEATURE_GATES:-}" ]]; then
164176
KUBETEST2_ARGS+=("--kubernetes-feature-gates=${KUBE_FEATURE_GATES}")
165177
fi
166-
if [[ "${JOB_TYPE}" == "presubmit" && "${REPO_OWNER}/${REPO_NAME}" == "kubernetes/kops" ]]; then
178+
if [[ "${FORCE_BUILD_KOPS:-}" == "true" ]]; then
179+
KUBETEST2_ARGS+=("--kops-binary-path=${GOPATH}/src/k8s.io/kops/.build/dist/linux/\$(go env GOARCH)/kops")
180+
elif [[ "${JOB_TYPE}" == "presubmit" && "${REPO_OWNER}/${REPO_NAME}" == "kubernetes/kops" ]]; then
167181
KUBETEST2_ARGS+=("--build")
168-
KUBETEST2_ARGS+=("--kops-binary-path=${GOPATH}/src/k8s.io/kops/.build/dist/linux/$(go env GOARCH)/kops")
182+
KUBETEST2_ARGS+=("--kops-binary-path=${GOPATH}/src/k8s.io/kops/.build/dist/linux/\$(go env GOARCH)/kops")
169183
elif [[ "${JOB_TYPE}" == "presubmit" && "${REPO_OWNER}/${REPO_NAME}" == "kubernetes/kubernetes" ]]; then
170184
KUBETEST2_ARGS+=("--build")
171185
KUBETEST2_ARGS+=("--build-kubernetes=true")
@@ -184,6 +198,9 @@ if [[ "${CLOUD_PROVIDER}" == "gce" ]]; then
184198
else
185199
KUBETEST2_ARGS+=("--boskos-resource-type=${BOSKOS_RESOURCE_TYPE:-scalability-project}")
186200
fi
201+
if [[ -n "${STAGE_LOCATION:-}" ]]; then
202+
KUBETEST2_ARGS+=("--stage-location=${STAGE_LOCATION}")
203+
fi
187204
KUBETEST2_ARGS+=("--control-plane-instance-group-overrides=spec.rootVolume.type=hyperdisk-balanced")
188205
KUBETEST2_ARGS+=("--control-plane-instance-group-overrides=spec.rootVolume.iops=10000")
189206
KUBETEST2_ARGS+=("--control-plane-instance-group-overrides=spec.rootVolume.throughput=1000")

0 commit comments

Comments
 (0)