Skip to content

Commit 10f1b53

Browse files
committed
chore(workflow): change k8s api env
1 parent 908dc9d commit 10f1b53

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

_scripts/install.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,17 +264,22 @@ function check_metallb {
264264

265265
function install_network() {
266266
echo -e "\\033[32m---> Start installing network...\\033[0m"
267-
api_server_address=(`ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p'`)
267+
kubernetes_service_host=(`kubectl get svc kubernetes -o jsonpath='{$.spec.clusterIP}'`)
268+
kubernetes_service_port=(`kubectl get svc kubernetes -o jsonpath='{$.spec.ports[0].port}'`)
268269
helm install cilium $CHARTS_URL/cilium \
270+
--set endpointHealthChecking.enabled=false \
271+
--set healthChecking=false \
269272
--set operator.replicas=1 \
270273
--set bpf.masquerade=true \
271274
--set bandwidthManager.enabled=true \
272275
--set bandwidthManager.bbr=true \
273276
--set kubeProxyReplacement=strict \
274277
--set hubble.enabled=false \
275278
--set hostPort.enabled=true \
276-
--set k8sServiceHost=${KUBE_API_SERVER_ADDRESS:-$api_server_address} \
277-
--set k8sServicePort=${KUBE_API_SERVER_PORT:-"6443"} \
279+
--set k8sServiceHost=${KUBERNETES_SERVICE_HOST:-$kubernetes_service_host} \
280+
--set k8sServicePort=${KUBERNETES_SERVICE_PORT:-$kubernetes_service_port} \
281+
--set prometheus.enabled=true \
282+
--set operator.prometheus.enabled=true \
278283
--namespace kube-system --wait
279284
echo -e "\\033[32m---> Network installed!\\033[0m"
280285
}

src/quickstart/install-workflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ DRYCC_ADMIN_PASSWORD | Required item, specify drycc's
192192
CERT_MANAGER_ENABLED | Whether to use automatic certificate. It is `true` by default
193193
CHANNEL | By default, `stable` channel will be installed. You can also specify `testing`
194194
CONTAINERD_FILE | The `config.yaml` file path used by containerd
195-
KUBE_API_SERVER_ADDRESS | Set with the IP address of the loadbalancer that was in front of kube-apiserver, The default is the IP address of the current node
196-
KUBE_API_SERVER_PORT | Set with the PORT of the loadbalancer that was in front of kube-apiserver, which is `6443` by default
195+
KUBERNETES_SERVICE_HOST | Set with the IP address of the loadbalancer that was in front of kube-apiserver, The default is the IP address of the current node
196+
KUBERNETES_SERVICE_PORT | Set with the PORT of the loadbalancer that was in front of kube-apiserver, which is `6443` by default
197197
METALLB_CONFIG_FILE | The metallb config file path, layer 2 network is used by default
198198
INSTALL_DRYCC_MIRROR | Specify the accelerated mirror location. Currently, only `cn` is supported
199199
BUILDER_REPLICAS | Number of builder replicas to deploy

0 commit comments

Comments
 (0)