Skip to content

Commit

Permalink
调整ca证书有效期等配置
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed Mar 30, 2019
1 parent eca8127 commit 92ea99e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
5 changes: 5 additions & 0 deletions roles/deploy/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# CA 证书相关参数
CA_EXPIRY: "876000h"
CERT_EXPIRY: "438000h"

# kubeconfig 配置参数
CLUSTER_NAME: "cluster1"
USER_NAME: "user1"
CONTEXT_NAME: "context1"

4 changes: 2 additions & 2 deletions roles/deploy/templates/ca-config.json.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"signing": {
"default": {
"expiry": "87600h"
"expiry": "{{ CERT_EXPIRY }}"
},
"profiles": {
"kubernetes": {
Expand All @@ -11,7 +11,7 @@
"server auth",
"client auth"
],
"expiry": "87600h"
"expiry": "{{ CERT_EXPIRY }}"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion roles/deploy/templates/ca-csr.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
}
],
"ca": {
"expiry": "131400h"
"expiry": "{{ CA_EXPIRY }}"
}
}
1 change: 0 additions & 1 deletion roles/etcd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
with_items:
- ca.pem
- ca-key.pem
- ca.csr
- ca-config.json
delegate_to: "{{ groups.deploy[0] }}"

Expand Down
1 change: 0 additions & 1 deletion roles/harbor/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
with_items:
- ca.pem
- ca-key.pem
- ca.csr
- ca-config.json
delegate_to: "{{ groups.deploy[0] }}"

Expand Down
1 change: 0 additions & 1 deletion roles/kube-master/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
- admin-key.pem
- ca.pem
- ca-key.pem
- ca.csr
- ca-config.json
delegate_to: "{{ groups.deploy[0] }}"

Expand Down
1 change: 0 additions & 1 deletion roles/kube-node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
with_items:
- ca.pem
- ca-key.pem
- ca.csr
- ca-config.json
delegate_to: "{{ groups.deploy[0] }}"

Expand Down

0 comments on commit 92ea99e

Please sign in to comment.