From 371f95c63f37b228512c6ba0e0c52d3d261e56f1 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 bb391343e4e..d46ad96f3f6 100644 --- a/yamls/kind.yaml.j2 +++ b/yamls/kind.yaml.j2 @@ -1,11 +1,18 @@ {% set nodeTag = "v1.21.14" -%} +{%- 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 }} kubeadmConfigPatches: - | kind: ClusterConfiguration