mirror of https://github.com/easzlab/kubeasz.git
fix aggregator proxy client cert issue
parent
2006eb6a5c
commit
d66a5ef5ba
|
@ -24,6 +24,19 @@
|
|||
-config={{ ca_dir }}/ca-config.json \
|
||||
-profile=kubernetes kubernetes-csr.json | {{ bin_dir }}/cfssljson -bare kubernetes"
|
||||
|
||||
# 创建aggregator proxy相关证书
|
||||
- name: 创建 aggregator proxy证书签名请求
|
||||
template: src=aggregator-proxy-csr.json.j2 dest={{ ca_dir }}/aggregator-proxy-csr.json
|
||||
when: p.stat.isreg is not defined
|
||||
|
||||
- name: 创建 aggregator-proxy证书和私钥
|
||||
when: p.stat.isreg is not defined
|
||||
shell: "cd {{ ca_dir }} && {{ bin_dir }}/cfssl gencert \
|
||||
-ca={{ ca_dir }}/ca.pem \
|
||||
-ca-key={{ ca_dir }}/ca-key.pem \
|
||||
-config={{ ca_dir }}/ca-config.json \
|
||||
-profile=kubernetes aggregator-proxy-csr.json | {{ bin_dir }}/cfssljson -bare aggregator-proxy"
|
||||
|
||||
- name: 创建 token.csv
|
||||
template: src=token.csv.j2 dest={{ ca_dir }}/token.csv
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"CN": "aggregator",
|
||||
"hosts": [],
|
||||
"key": {
|
||||
"algo": "rsa",
|
||||
"size": 2048
|
||||
},
|
||||
"names": [
|
||||
{
|
||||
"C": "CN",
|
||||
"ST": "HangZhou",
|
||||
"L": "XS",
|
||||
"O": "k8s",
|
||||
"OU": "System"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -39,8 +39,8 @@ ExecStart={{ bin_dir }}/kube-apiserver \
|
|||
--requestheader-extra-headers-prefix=X-Remote-Extra- \
|
||||
--requestheader-group-headers=X-Remote-Group \
|
||||
--requestheader-username-headers=X-Remote-User \
|
||||
--proxy-client-cert-file={{ ca_dir }}/admin.pem \
|
||||
--proxy-client-key-file={{ ca_dir }}/admin-key.pem \
|
||||
--proxy-client-cert-file={{ ca_dir }}/aggregator-proxy.pem \
|
||||
--proxy-client-key-file={{ ca_dir }}/aggregator-proxy-key.pem \
|
||||
--enable-aggregator-routing=true \
|
||||
--v=2
|
||||
Restart=on-failure
|
||||
|
|
|
@ -39,8 +39,8 @@ ExecStart={{ bin_dir }}/kube-apiserver \
|
|||
--requestheader-extra-headers-prefix=X-Remote-Extra- \
|
||||
--requestheader-group-headers=X-Remote-Group \
|
||||
--requestheader-username-headers=X-Remote-User \
|
||||
--proxy-client-cert-file={{ ca_dir }}/admin.pem \
|
||||
--proxy-client-key-file={{ ca_dir }}/admin-key.pem \
|
||||
--proxy-client-cert-file={{ ca_dir }}/aggregator-proxy.pem \
|
||||
--proxy-client-key-file={{ ca_dir }}/aggregator-proxy-key.pem \
|
||||
--enable-aggregator-routing=true \
|
||||
--v=2
|
||||
Restart=on-failure
|
||||
|
|
Loading…
Reference in New Issue