Skip to content

Commit

Permalink
New certificate layout for tiproxy (#5825)
Browse files Browse the repository at this point in the history
  • Loading branch information
ideascf authored Nov 8, 2024
1 parent cb47ac5 commit 699ac5d
Show file tree
Hide file tree
Showing 5 changed files with 273 additions and 97 deletions.
22 changes: 22 additions & 0 deletions docs/api-references/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -23522,6 +23522,13 @@ int32
</tr>
</tbody>
</table>
<h3 id="tiproxycertlayout">TiProxyCertLayout</h3>
<p>
(<em>Appears on:</em>
<a href="#tiproxyspec">TiProxySpec</a>)
</p>
<p>
</p>
<h3 id="tiproxyconfigwraper">TiProxyConfigWraper</h3>
<p>
(<em>Appears on:</em>
Expand Down Expand Up @@ -23710,6 +23717,21 @@ used by TiProxy to check health status.</p>
</tr>
<tr>
<td>
<code>certLayout</code></br>
<em>
<a href="#tiproxycertlayout">
TiProxyCertLayout
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>TiProxyCertLayout is the certificate layout of TiProxy that determines how tidb-operator mount cert secrets
and how configure TLS configurations for tiproxy.</p>
</td>
</tr>
<tr>
<td>
<code>baseImage</code></br>
<em>
string
Expand Down
2 changes: 2 additions & 0 deletions manifests/crd/v1/pingcap.com_tidbclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24312,6 +24312,8 @@ spec:
baseImage:
default: pingcap/tiproxy
type: string
certLayout:
type: string
claims:
items:
properties:
Expand Down
7 changes: 7 additions & 0 deletions pkg/apis/pingcap/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions pkg/apis/pingcap/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ const (
StartScriptV2FeatureFlagPreferPDAddressesOverDiscovery = "PreferPDAddressesOverDiscovery"
)

type TiProxyCertLayout string

const (
TiProxyCertLayoutLegacy TiProxyCertLayout = ""
// TiProxyCertLayoutV1 is a refined version of legacy layout. It's more intuitive and more flexible.
TiProxyCertLayoutV1 TiProxyCertLayout = "v1"
)

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Expand Down Expand Up @@ -932,6 +940,11 @@ type TiProxySpec struct {
// +optional
TLSClientSecretName *string `json:"tlsClientSecretName,omitempty"`

// TiProxyCertLayout is the certificate layout of TiProxy that determines how tidb-operator mount cert secrets
// and how configure TLS configurations for tiproxy.
// +optional
CertLayout TiProxyCertLayout `json:"certLayout,omitempty"`

// Base image of the component, image tag is now allowed during validation
// +kubebuilder:default=pingcap/tiproxy
// +optional
Expand Down
Loading

0 comments on commit 699ac5d

Please sign in to comment.