Skip to content
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

API for client cert #2984

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions api/v1alpha1/envoyproxy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
)

const (
Expand Down Expand Up @@ -86,6 +87,20 @@ type EnvoyProxySpec struct {
//
// +optional
Shutdown *ShutdownConfig `json:"shutdown,omitempty"`

// TLS is the TLS configuration for the Envoy proxy to use when connecting to
// backend services and external services, such as ExtAuth, ALS, OpenTelemetry, etc.
// +optional
TLS *EnvoyTLSConfig `json:"tls,omitempty"`
zirain marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we call this ClientTLS ?

Copy link
Member Author

@zhaohuabing zhaohuabing Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guydc mentioned he wants to add some server-side settings later. If that's the case, then it would be better to use a more generalized name.

}

// EnvoyTLSConfig describes the TLS configuration for Envoy Proxy.
type EnvoyTLSConfig struct {
// ClientCertRef defines the reference to a Kubernetes Secret that contains
// the client certificate and private key for Envoy to use when connecting to
// backend services and external services, such as ExtAuth, ALS, OpenTelemetry, etc.
// +optional
ClientCertRef *gwapiv1.SecretObjectReference `json:"clientCertRef,omitempty"`
zhaohuabing marked this conversation as resolved.
Show resolved Hide resolved
zhaohuabing marked this conversation as resolved.
Show resolved Hide resolved
}

type ProxyTelemetry struct {
Expand Down
25 changes: 25 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -6975,6 +6975,53 @@ spec:
- provider
type: object
type: object
tls:
description: TLS is the TLS configuration for the Envoy proxy to use
when connecting to backend services and external services, such
as ExtAuth, ALS, OpenTelemetry, etc.
properties:
clientCertRef:
description: ClientCertRef defines the reference to a Kubernetes
Secret that contains the client certificate and private key
for Envoy to use when connecting to backend services and external
services, such as ExtAuth, ALS, OpenTelemetry, etc.
properties:
group:
default: ""
description: Group is the group of the referent. For example,
"gateway.networking.k8s.io". When unspecified or empty string,
core API group is inferred.
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
kind:
default: Secret
description: Kind is kind of the referent. For example "Secret".
maxLength: 63
minLength: 1
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
type: string
name:
description: Name is the name of the referent.
maxLength: 253
minLength: 1
type: string
namespace:
description: "Namespace is the namespace of the referenced
object. When unspecified, the local namespace is inferred.
\n Note that when a namespace different than the local namespace
is specified, a ReferenceGrant object is required in the
referent namespace to allow that namespace's owner to accept
the reference. See the ReferenceGrant documentation for
details. \n Support: Core"
maxLength: 63
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
type: string
required:
- name
type: object
type: object
type: object
status:
description: EnvoyProxyStatus defines the actual state of EnvoyProxy.
Expand Down
15 changes: 15 additions & 0 deletions site/content/en/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ _Appears in:_
| `extraArgs` | _string array_ | false | ExtraArgs defines additional command line options that are provided to Envoy. More info: https://www.envoyproxy.io/docs/envoy/latest/operations/cli#command-line-options Note: some command line options are used internally(e.g. --log-level) so they cannot be provided here. |
| `mergeGateways` | _boolean_ | false | MergeGateways defines if Gateway resources should be merged onto the same Envoy Proxy Infrastructure. Setting this field to true would merge all Gateway Listeners under the parent Gateway Class. This means that the port, protocol and hostname tuple must be unique for every listener. If a duplicate listener is detected, the newer listener (based on timestamp) will be rejected and its status will be updated with a "Accepted=False" condition. |
| `shutdown` | _[ShutdownConfig](#shutdownconfig)_ | false | Shutdown defines configuration for graceful envoy shutdown process. |
| `tls` | _[EnvoyTLSConfig](#envoytlsconfig)_ | false | TLS is the TLS configuration for the Envoy proxy to use when connecting to backend services and external services, such as ExtAuth, ALS, OpenTelemetry, etc. |



Expand All @@ -972,6 +973,20 @@ _Appears in:_



#### EnvoyTLSConfig



EnvoyTLSConfig describes the TLS configuration for Envoy Proxy.

_Appears in:_
- [EnvoyProxySpec](#envoyproxyspec)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `clientCertRef` | _[SecretObjectReference](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.SecretObjectReference)_ | false | ClientCertRef defines the reference to a Kubernetes Secret that contains the client certificate and private key for Envoy to use when connecting to backend services and external services, such as ExtAuth, ALS, OpenTelemetry, etc. |


#### ExtAuth


Expand Down
Loading