From bc107a7e20005d6818ee02869e20d5460ff2370d Mon Sep 17 00:00:00 2001 From: Luke Kysow <1034429+lkysow@users.noreply.github.com> Date: Mon, 31 Aug 2020 11:45:29 -0700 Subject: [PATCH] Update docs for CRDs --- api/v1alpha1/servicedefaults_types.go | 17 +++++++++----- api/v1alpha1/types.go | 1 + .../consul.hashicorp.com_servicedefaults.yaml | 22 ++++++++++++------- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/api/v1alpha1/servicedefaults_types.go b/api/v1alpha1/servicedefaults_types.go index b243d393f6..328314d968 100644 --- a/api/v1alpha1/servicedefaults_types.go +++ b/api/v1alpha1/servicedefaults_types.go @@ -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 @@ -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"` } diff --git a/api/v1alpha1/types.go b/api/v1alpha1/types.go index 30f09be4b5..ed5bddc7cb 100644 --- a/api/v1alpha1/types.go +++ b/api/v1alpha1/types.go @@ -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"` } diff --git a/config/crd/bases/consul.hashicorp.com_servicedefaults.yaml b/config/crd/bases/consul.hashicorp.com_servicedefaults.yaml index c1cbb35564..675a345fbe 100644 --- a/config/crd/bases/consul.hashicorp.com_servicedefaults.yaml +++ b/config/crd/bases/consul.hashicorp.com_servicedefaults.yaml @@ -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 @@ -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: