From b71dc9edc61ebbb24c64684faae6b6c2210cb9ae Mon Sep 17 00:00:00 2001 From: Ashwin Venkatesh Date: Mon, 9 Nov 2020 15:14:08 -0500 Subject: [PATCH] Add field descriptions for Service Intentions CRD (#678) * Add field descriptions for Service Intentions CRD --- templates/crd-serviceintentions.yaml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/templates/crd-serviceintentions.yaml b/templates/crd-serviceintentions.yaml index 60e049d63a..d747f9a6fa 100644 --- a/templates/crd-serviceintentions.yaml +++ b/templates/crd-serviceintentions.yaml @@ -48,60 +48,81 @@ spec: description: ServiceIntentionsSpec defines the desired state of ServiceIntentions properties: destination: + description: Destination is the intention destination that will have the authorization granted to. properties: name: + description: Name is the destination of all intentions defined in this config entry. This may be set to the wildcard character (*) to match all services that don't otherwise have intentions defined. type: string namespace: + description: Namespace specifies the namespace the config entry will apply to. This may be set to the wildcard character (*) to match all services in all namespaces that don't otherwise have intentions defined. type: string type: object sources: + description: Sources is the list of all intention sources and the authorization granted to those sources. The order of this list does not matter, but out of convenience Consul will always store this reverse sorted by intention precedence, as that is the order that they will be evaluated at enforcement time. items: properties: action: - description: IntentionAction is the action that the intention represents. This can be "allow" or "deny" to allowlist or denylist intentions. + description: Action is required for an L4 intention, and should be set to one of "allow" or "deny" for the action that should be taken if this intention matches a request. type: string description: + description: Description for the intention. This is not used by Consul, but is presented in API responses to assist tooling. type: string name: + description: Name is the source of the intention. This is the name of a Consul service. The service doesn't need to be registered. type: string namespace: + description: Namespace is the namespace for the Name parameter. type: string permissions: + description: Permissions is the list of all additional L7 attributes that extend the intention match criteria. Permission precedence is applied top to bottom. For any given request the first permission to match in the list is terminal and stops further evaluation. As with L4 intentions, traffic that fails to match any of the provided permissions in this intention will be subject to the default intention behavior is defined by the default ACL policy. This should be omitted for an L4 intention as it is mutually exclusive with the Action field. items: properties: action: - description: IntentionAction is the action that the intention represents. This can be "allow" or "deny" to allowlist or denylist intentions. + description: Action is one of "allow" or "deny" for the action that should be taken if this permission matches a request. type: string http: + description: HTTP is a set of HTTP-specific authorization criteria. properties: header: + description: Header is a set of criteria that can match on HTTP request headers. If more than one is configured all must match for the overall match to apply. items: properties: exact: + description: Exact matches if the header with the given name is this value. type: string invert: + description: Invert inverts the logic of the match. type: boolean name: + description: Name is the name of the header to match. type: string prefix: + description: Prefix matches if the header with the given name has this prefix. type: string present: + description: Present matches if the header with the given name is present with any value. type: boolean regex: + description: Regex matches if the header with the given name matches this pattern. type: string suffix: + description: Suffix matches if the header with the given name has this suffix. type: string type: object type: array methods: + description: Methods is a list of HTTP methods for which this match applies. If unspecified all HTTP methods are matched. If provided the names must be a valid method. items: type: string type: array pathExact: + description: PathExact is the exact path to match on the HTTP request path. type: string pathPrefix: + description: PathPrefix is the path prefix to match on the HTTP request path. type: string pathRegex: + description: PathRegex is the regular expression to match on the HTTP request path. type: string type: object type: object