Skip to content

Commit

Permalink
fix Certificate spec
Browse files Browse the repository at this point in the history
  • Loading branch information
csuzhangxc committed Jul 19, 2023
1 parent 84b4ad2 commit 574305c
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ spec:
secretName: ns1-cluster-client-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- client auth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ spec:
secretName: ns1-pd-cluster-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- server auth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ spec:
secretName: ns1-tidb-client-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB Client"
usages:
- client auth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ spec:
secretName: ns1-tidb-cluster-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- server auth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ spec:
secretName: ns1-tidb-server-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB Server"
usages:
- server auth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ spec:
secretName: ns1-tikv-cluster-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- server auth
Expand Down
4 changes: 2 additions & 2 deletions examples/selfsigned-tls/tidb-client-cert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ spec:
subject:
organizationalUnits:
- "TiDB Operator"
organization:
- "PingCAP"
organizations:
- PingCAP
duration: "8760h" # 364 days
# If you want verify server cert Common Name (e.g. --ssl-verify-server-cert
# flag in MySQL CLI), you must configure the HostName you used to connect the
Expand Down
4 changes: 2 additions & 2 deletions examples/selfsigned-tls/tidb-server-cert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ spec:
subject:
organizationalUnits:
- "TiDB Operator"
organization:
- "PingCAP"
organizations:
- PingCAP
duration: "8760h" # 364 days
# If you want verify server cert Common Name (e.g. --ssl-verify-server-cert
# flag in MySQL CLI), you must configure the HostName you used to connect the
Expand Down
5 changes: 3 additions & 2 deletions tests/e2e/br/utils/tls/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ spec:
secretName: {{ .SecretName }}
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "{{ .CN }}"
{{- if .Usages }}
usages:
Expand Down
75 changes: 45 additions & 30 deletions tests/e2e/tidbcluster/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ spec:
secretName: {{ .ClusterName }}-tidb-server-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB Server"
usages:
- server auth
Expand Down Expand Up @@ -110,8 +111,9 @@ spec:
secretName: {{ .ClusterName }}-tidb-client-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB Client"
usages:
- client auth
Expand All @@ -131,8 +133,9 @@ spec:
secretName: {{ .ClusterName }}-pd-cluster-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- server auth
Expand Down Expand Up @@ -166,8 +169,9 @@ spec:
secretName: {{ .ClusterName }}-tikv-cluster-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- server auth
Expand Down Expand Up @@ -199,8 +203,9 @@ spec:
secretName: {{ .ClusterName }}-tidb-cluster-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- server auth
Expand Down Expand Up @@ -232,8 +237,9 @@ spec:
secretName: {{ .ClusterName }}-cluster-client-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- client auth
Expand All @@ -251,8 +257,9 @@ spec:
secretName: {{ .ClusterName }}-pump-cluster-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- server auth
Expand All @@ -278,8 +285,9 @@ spec:
secretName: {{ .ClusterName }}-drainer-cluster-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- server auth
Expand All @@ -305,8 +313,9 @@ spec:
secretName: {{ .ClusterName }}-tiflash-cluster-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- server auth
Expand Down Expand Up @@ -338,8 +347,9 @@ spec:
secretName: {{ .ClusterName }}-ticdc-cluster-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- server auth
Expand Down Expand Up @@ -373,8 +383,9 @@ spec:
secretName: {{ .ClusterName }}-{{ .Component }}-tls
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB Client"
usages:
- client auth
Expand All @@ -394,8 +405,9 @@ spec:
secretName: {{ .ClusterName }}-mysql-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "MySQL Server"
usages:
- server auth
Expand All @@ -421,8 +433,9 @@ spec:
secretName: {{ .ClusterName }}-dm-master-cluster-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- server auth
Expand Down Expand Up @@ -454,8 +467,9 @@ spec:
secretName: {{ .ClusterName }}-dm-worker-cluster-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- server auth
Expand Down Expand Up @@ -487,8 +501,9 @@ spec:
secretName: {{ .ClusterName }}-dm-client-secret
duration: 8760h # 365d
renewBefore: 360h # 15d
organization:
- PingCAP
subject:
organizations:
- PingCAP
commonName: "TiDB"
usages:
- client auth
Expand Down

0 comments on commit 574305c

Please sign in to comment.