Skip to content

Commit

Permalink
Add field descriptions for Service Intentions CRD (hashicorp#678)
Browse files Browse the repository at this point in the history
* Add field descriptions for Service Intentions CRD
  • Loading branch information
thisisnotashwin authored Nov 9, 2020
1 parent 88e5b73 commit b71dc9e
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions templates/crd-serviceintentions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b71dc9e

Please sign in to comment.