From d8d4e913052e919af75e395f37934711e2d9e178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A5=96=E5=BB=BA?= Date: Thu, 8 Dec 2022 10:15:09 +0800 Subject: [PATCH] kind: support to specify api server address/port (#2134) --- yamls/kind.yaml.j2 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/yamls/kind.yaml.j2 b/yamls/kind.yaml.j2 index 5143b4914d1..3566b45bdae 100644 --- a/yamls/kind.yaml.j2 +++ b/yamls/kind.yaml.j2 @@ -1,11 +1,18 @@ {% set nodeTag = "v1.22.15" -%} +{%- if api_server_address is not defined -%} + {%- set api_server_address = "127.0.0.1" -%} +{%- endif -%} +{%- if api_server_port is not defined -%} + {%- set api_server_port = 0 -%} +{%- endif -%} kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 networking: kubeProxyMode: {{ kube_proxy_mode }} disableDefaultCNI: true ipFamily: {{ ip_family }} - apiServerAddress: 127.0.0.1 + apiServerAddress: {{ api_server_address }} + apiServerPort: {{ api_server_port }} {%- if ip_family is equalto "ipv4" %} podSubnet: "10.16.0.0/16" serviceSubnet: "10.96.0.0/12"