Skip to content

Commit 4ed1bce

Browse files
committed
tags
1 parent 6fe2dff commit 4ed1bce

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

tests/scripts/vars.env-example

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
11
# WARNING: This is an example - please copy this file to vars.env and complete appropriately for your environment
2-
RESOURCE_NAME=<the name of the resources to be created for testing (used for VM, firewall rule, router, nats config)>
32
TAG=<tag of the remote image>
43
PREFIX=<prefix of the remote image>
54
NGINX_PREFIX=<prefix of the remote nginx image>
65
NGINX_PLUS_PREFIX=<prefix of the remote nginx plus image>
7-
GKE_CLUSTER_NAME=<name of deployed GKE cluster>
8-
GKE_CLUSTER_ZONE=<zone where GKE cluster is deployed>
9-
GKE_CLUSTER_REGION=<region where GKE cluster is deployed>
10-
GKE_PROJECT=<GCP project>
11-
GKE_SVC_ACCOUNT=<service account with k8s admin permissions>
12-
GKE_NODES_SERVICE_ACCOUNT=<service account for the GKE nodes to assume>
13-
NETWORK_TAGS=<network tags>
146
NGF_REPO=<optional repo, by default nginxinc>
157
NGF_BRANCH=main
168
GINKGO_LABEL=<optional label to filter the tests, e.g. "performance">
179
GINKGO_FLAGS=<optional flags to pass to the go test command>
18-
SOURCE_IP_RANGE=<IPs that should be allowed SSH to the VM, e.g. 1.2.3.4/32 or $(curl -sS -4 icanhazip.com)/32>
19-
ADD_VM_IP_AUTH_NETWORKS=<if set to true, the script will add the VM IP to the list of the GKE cluster master authorized networks>
2010
PLUS_ENABLED=<enable nginx plus>
2111
NGF_VERSION=<version of NGF being tested. Defaults to value of TAG if not set>
22-
GKE_MACHINE_TYPE=<the node type for the gke cluster, defaults to e2-medium>
23-
GKE_NUM_NODES=<the number of nodes in the gke cluster, defaults to 3>

tests/tofu/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ resource "google_container_node_pool" "primary_nodes" {
6767
block-project-ssh-keys = "TRUE"
6868
disable-legacy-endpoints = "true"
6969
}
70+
tags = ["ngf-tests-${var.gke_cluster_name}-nodes"]
7071
shielded_instance_config {
7172
enable_secure_boot = true
7273
}
@@ -89,7 +90,7 @@ resource "google_compute_instance" "vm" {
8990
machine_type = "n2-standard-2"
9091
zone = local.google_zone
9192
allow_stopping_for_update = true
92-
tags = ["ngf-tests-vm"]
93+
tags = ["ngf-tests-${var.gke_cluster_name}-vm"]
9394

9495
boot_disk {
9596
initialize_params {

tests/tofu/network.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ resource "google_compute_firewall" "deny_exkubelet" {
4949

5050
}
5151

52+
resource "google_compute_firewall" "allow_inkublet" {
53+
name = "${var.gke_cluster_name}-allow-inkubelet"
54+
network = google_compute_network.vpc.self_link
55+
direction = "INGRESS"
56+
allow {
57+
protocol = "tcp"
58+
ports = ["10255"]
59+
}
60+
source_tags = ["ngf-tests-${var.gke_cluster_name}-nodes", "ngf-tests-${var.gke_cluster_name}-vm"]
61+
62+
}
63+
5264
resource "google_compute_address" "vpc-ip" {
5365
name = "${var.gke_cluster_name}-vpc-ip"
5466
address_type = "EXTERNAL"

0 commit comments

Comments
 (0)