-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
集群apiserver证书支持直接配置IP和域名 #3002
集群apiserver证书支持直接配置IP和域名 #3002
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL
bcs-ops/readme.md
Outdated
| 环境变量 | 默认值 | 说明 | | ||
| ------------------------- | --------------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `ENABLE_APISERVER_HA` | `false` | apiserver ha 模式,默认关闭。 | | ||
| `APISERVER_HA_MODE` | `bcs-apiserver-proxy` | 模式选择,支持 [bcs-apiserver-proxy](https://github.com/TencentBlueKing/bk-bcs/blob/625be3183d99ee3500123016a6dea99d78165565/docs/features/bcs-apiserver-proxy/bcs-apiserver-proxy.md#L1), [kube-vip](https://kube-vip.io/), external | |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
|| utils::log "ERROR" "failed to ${op_type} ${vips} ${path}" | ||
fi | ||
|
||
utils::log "OK" "${op_type} ${vips} ${path}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
op_type 为 list 的时候,vips 没有值。或者赋值的时候使用 ${3:-""} 默认空值。
bcs-ops/functions/k8s.sh
Outdated
add) | ||
for vip in ${vips//,/ };do | ||
if [[ -n "${vip}" ]];then | ||
yq e -i '(select(.apiServer != null)|.apiServer.certSANs) += ["'${vip}'"]' ${path} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用 unique 去重。https://mikefarah.gitbook.io/yq/operators/unique
bcs-ops/k8s/render_kubeadm
Outdated
@@ -316,6 +318,8 @@ safe_source() { | |||
fi | |||
} | |||
|
|||
safe_source "${ROOT_DIR}/functions/k8s.sh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
放到 line 325 的 source_files
内。
集群apiserver证书支持直接配置IP和域名