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

Update docs for CRDs #318

Merged
merged 1 commit into from
Aug 31, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
17 changes: 12 additions & 5 deletions api/v1alpha1/servicedefaults_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ import (

// ServiceDefaultsSpec defines the desired state of ServiceDefaults
type ServiceDefaultsSpec struct {
Protocol string `json:"protocol,omitempty"`
// Protocol sets the protocol of the service. This is used by Connect proxies for
// things like observability features and to unlock usage of the
// service-splitter and service-router config entries for a service.
Protocol string `json:"protocol,omitempty"`
// MeshGateway controls the default mesh gateway configuration for this service.
MeshGateway MeshGatewayConfig `json:"meshGateway,omitempty"`
Expose ExposeConfig `json:"expose,omitempty"`
ExternalSNI string `json:"externalSNI,omitempty"`
// Expose controls the default expose path configuration for Envoy.
Expose ExposeConfig `json:"expose,omitempty"`
// ExternalSNI is an optional setting that allows for the TLS SNI value
// to be changed to a non-connect value when federating with an external system.
ExternalSNI string `json:"externalSNI,omitempty"`
}

// ServiceDefaultsStatus defines the observed state of ServiceDefaults
Expand Down Expand Up @@ -81,14 +88,14 @@ type ExposePath struct {
// ListenerPort defines the port of the proxy's listener for exposed paths.
ListenerPort int `json:"listenerPort,omitempty"`

// Path is the path to expose through the proxy, ie. "/metrics."
// Path is the path to expose through the proxy, ie. "/metrics".
Path string `json:"path,omitempty"`

// LocalPathPort is the port that the service is listening on for the given path.
LocalPathPort int `json:"localPathPort,omitempty"`

// Protocol describes the upstream's service protocol.
// Valid values are "http" and "http2", defaults to "http"
// Valid values are "http" and "http2", defaults to "http".
Protocol string `json:"protocol,omitempty"`
}

Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
// services
type MeshGatewayConfig struct {
// Mode is the mode that should be used for the upstream connection.
// One of none, local, or remote.
Mode string `json:"mode,omitempty"`
}

Expand Down
22 changes: 14 additions & 8 deletions config/crd/bases/consul.hashicorp.com_servicedefaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ spec:
description: ServiceDefaultsSpec defines the desired state of ServiceDefaults
properties:
expose:
description: ExposeConfig describes HTTP paths to expose through Envoy
outside of Connect. Users can expose individual paths and/or all HTTP/GRPC
paths for checks.
description: Expose controls the default expose path configuration for
Envoy.
properties:
checks:
description: Checks defines whether paths associated with Consul
Expand All @@ -65,27 +64,34 @@ spec:
type: integer
path:
description: Path is the path to expose through the proxy,
ie. "/metrics."
ie. "/metrics".
type: string
protocol:
description: Protocol describes the upstream's service protocol.
Valid values are "http" and "http2", defaults to "http"
Valid values are "http" and "http2", defaults to "http".
type: string
type: object
type: array
type: object
externalSNI:
description: ExternalSNI is an optional setting that allows for the
TLS SNI value to be changed to a non-connect value when federating
with an external system.
type: string
meshGateway:
description: MeshGatewayConfig controls how Mesh Gateways are used for
upstream Connect services
description: MeshGateway controls the default mesh gateway configuration
for this service.
properties:
mode:
description: Mode is the mode that should be used for the upstream
connection.
connection. One of none, local, or remote.
type: string
type: object
protocol:
description: Protocol sets the protocol of the service. This is used
by Connect proxies for things like observability features and to unlock
usage of the service-splitter and service-router config entries for
a service.
type: string
type: object
status:
Expand Down