fix: 用 TCP connect 验证 k3s ClusterIP
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
- `status` 必须同时证明 WireGuard handshake、worker host proxy、server/agent systemd、两个 Ready node、worker InternalIP 和旧 server 退役。
|
||||
- `smoke --confirm` 必须把 Job 定向调度到 worker,并验证集群 DNS 和 Kubernetes ClusterIP;成功后删除 Job。
|
||||
- smoke 等待必须使用短 `kubectl get` 轮询,禁止让单次 `trans` 挂住等待 Job 条件。
|
||||
- smoke 访问 Kubernetes API 必须使用 Pod 挂载的 ServiceAccount token 与 CA,不能依赖匿名 `/healthz`。
|
||||
- 基础 smoke 通过完整服务 FQDN 和 Kubernetes API `ClusterIP:443` TCP connect 验证 DNS 与 Service 数据面,不把容器 TLS 客户端能力混入判定。
|
||||
- Secret 输出只显示 sourceRef、presence、key 名和 fingerprint,不显示值。
|
||||
## Hyper-V Ubuntu Provider VM
|
||||
|
||||
|
||||
@@ -468,12 +468,7 @@ spec:
|
||||
- -ec
|
||||
- |
|
||||
nslookup kubernetes.default.svc.cluster.local.
|
||||
token="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"
|
||||
wget -qO- \
|
||||
--no-check-certificate \
|
||||
--header="Authorization: Bearer $token" \
|
||||
--timeout=15 \
|
||||
"https://\${KUBERNETES_SERVICE_HOST}:\${KUBERNETES_SERVICE_PORT_HTTPS}/healthz" | grep -q '^ok$'
|
||||
nc -z -w 15 "\${KUBERNETES_SERVICE_HOST}" "\${KUBERNETES_SERVICE_PORT_HTTPS}"
|
||||
echo D601_RUNTIME_SMOKE_OK
|
||||
`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user