Documentation ¶
Index ¶
Constants ¶
View Source
const ( ServerName = "envoy.filters.http.ext_proc" ServerDefaultPort = 3001 DefaultMetadataNamespace = "lbac" DefaultPolicySubKey = "policies" DefaultStateSubKey = "state" DefaultStateNamespace = "namespace" DefaultStateKey = "key" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Policies ¶
type Policies []Policy
Policies is a list of Policy.
func RawPolicyToPolicy ¶
RawPolicyToPolicy converts a raw policy to a policy.
type Policy ¶
type Policy struct { // Name is a human-readable name for the policy. Name string `json:"name"` // CELExpression is a CEL expression that must evaluate to true for the policy to be applied. CELExpression string `json:"expression"` // Selectors is a list of matchers to be injected into the request as part of the policy if the CELExpression evaluates to true. Selectors []Selector `json:"selectors"` }
Policy is a list of CEL expressions and matchers. If all the CELExpressions evaluate to true the Selectors are injected into the request.
type RawPolicy ¶
type RawPolicy struct { Name string `json:"name"` // CELExpression is a CEL expression that must evaluate to true for the policy to be applied. CELExpression string `json:"expression"` // Selectors is a list of label selectors/matcher in string format to be injected into the request as part of the policy. Selectors []RawSelector `json:"selectors"` }
RawPolicy is a list of CEL expressions and matchers in string form.
type RawSelector ¶
type RawSelector struct { // LabelSelector is the label selector that will be applied if all the selectors in the ConditionalSelector are true. LabelSelector string `json:"label_selector"` // ConditionalSelector is a list of selectors that must all evaluate to true for the Selector to be applied. // This is optional and if not present the Selector will be applied if the CELExpression evaluates to true. ConditionalSelector *string `json:"conditional_selector,omitempty"` }
RawSelector is a list of selectors in string form.
type Selector ¶
type Selector struct { // LabelSelector is the label selector that will be applied if all the selectors in the ConditionalSelector are true. LabelSelector []*labels.Matcher `json:"label_selector"` // ConditionalSelector is a list of selectors that must all evaluate to true for the Selector to be applied. // This is optional and if not present the Selector will be applied if the CELExpression evaluates to true. ConditionalSelector []*labels.Matcher `json:"conditional_selector,omitempty"` }
Click to show internal directories.
Click to hide internal directories.