Documentation
¶
Overview ¶
+kubebuilder:object:generate=true
Index ¶
- Constants
- Variables
- type ClusterMatch
- type ClusterMod
- type Conf
- type HTTPFilterMatch
- type HTTPFilterMod
- type ListenerMatch
- type ListenerMod
- type MeshProxyPatch
- type MeshProxyPatchResource
- func (t *MeshProxyPatchResource) Deprecations() []string
- func (t *MeshProxyPatchResource) Descriptor() model.ResourceTypeDescriptor
- func (t *MeshProxyPatchResource) GetMeta() model.ResourceMeta
- func (t *MeshProxyPatchResource) GetSpec() model.ResourceSpec
- func (t *MeshProxyPatchResource) GetStatus() model.ResourceStatus
- func (t *MeshProxyPatchResource) SetMeta(m model.ResourceMeta)
- func (t *MeshProxyPatchResource) SetSpec(spec model.ResourceSpec) error
- func (t *MeshProxyPatchResource) SetStatus(model.ResourceStatus) error
- func (t *MeshProxyPatchResource) Validate() error
- type MeshProxyPatchResourceList
- func (l *MeshProxyPatchResourceList) AddItem(r model.Resource) error
- func (l *MeshProxyPatchResourceList) GetItemType() model.ResourceType
- func (l *MeshProxyPatchResourceList) GetItems() []model.Resource
- func (l *MeshProxyPatchResourceList) GetPagination() *model.Pagination
- func (l *MeshProxyPatchResourceList) NewItem() model.Resource
- func (l *MeshProxyPatchResourceList) SetPagination(p model.Pagination)
- type ModOperation
- type Modification
- type NetworkFilterMatch
- type NetworkFilterMod
- type VirtualHostMatch
- type VirtualHostMod
Constants ¶
const ( NameFilterBeforeErr = "must be defined. You need to pick a filter before which this one will be added" NameFilterAfterErr = "must be defined. You need to pick a filter after which this one will be added" )
const (
MeshProxyPatchType model.ResourceType = "MeshProxyPatch"
)
Variables ¶
var MeshProxyPatchResourceTypeDescriptor = model.ResourceTypeDescriptor{ Name: MeshProxyPatchType, Resource: NewMeshProxyPatchResource(), ResourceList: &MeshProxyPatchResourceList{}, Scope: model.ScopeMesh, KDSFlags: model.GlobalToZonesFlag | model.ZoneToGlobalFlag | model.SyncedAcrossZonesFlag, WsPath: "meshproxypatches", KumactlArg: "meshproxypatch", KumactlListArg: "meshproxypatches", AllowToInspect: true, IsPolicy: true, IsDestination: false, IsExperimental: false, SingularDisplayName: "Mesh Proxy Patch", PluralDisplayName: "Mesh Proxy Patches", IsPluginOriginated: true, IsTargetRefBased: true, HasToTargetRef: false, HasFromTargetRef: false, HasRulesTargetRef: false, HasStatus: false, AllowedOnSystemNamespaceOnly: false, IsReferenceableInTo: false, ShortName: "mpp", IsFromAsRules: false, }
Functions ¶
This section is empty.
Types ¶
type ClusterMatch ¶
type ClusterMatch struct {
// Origin is the name of the component or plugin that generated the resource.
//
// Here is the list of well-known origins:
// inbound - resources generated for handling incoming traffic.
// outbound - resources generated for handling outgoing traffic.
// transparent - resources generated for transparent proxy functionality.
// prometheus - resources generated when Prometheus metrics are enabled.
// direct-access - resources generated for Direct Access functionality.
// ingress - resources generated for Zone Ingress.
// egress - resources generated for Zone Egress.
// gateway - resources generated for MeshGateway.
//
// The list is not complete, because policy plugins can introduce new resources.
// For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
Origin *string `json:"origin,omitempty"`
// Name of the cluster to match.
Name *string `json:"name,omitempty"`
}
ClusterMatch is a set of conditions on cluster resource.
func (*ClusterMatch) DeepCopy ¶
func (in *ClusterMatch) DeepCopy() *ClusterMatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMatch.
func (*ClusterMatch) DeepCopyInto ¶
func (in *ClusterMatch) DeepCopyInto(out *ClusterMatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterMod ¶
type ClusterMod struct {
// Match is a set of conditions that have to be matched for modification operation to happen.
Match *ClusterMatch `json:"match,omitempty"`
// Operation to execute on matched cluster.
// +kubebuilder:validation:Enum=Add;Remove;Patch
Operation ModOperation `json:"operation"`
// Value of xDS resource in YAML format to add or patch.
Value *string `json:"value,omitempty"`
// JsonPatches specifies list of jsonpatches to apply to on Envoy's Cluster
// resource
JsonPatches *[]common_api.JsonPatchBlock `json:"jsonPatches,omitempty"`
}
ClusterMod is a modification of Envoy's Cluster resource.
func (*ClusterMod) DeepCopy ¶
func (in *ClusterMod) DeepCopy() *ClusterMod
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMod.
func (*ClusterMod) DeepCopyInto ¶
func (in *ClusterMod) DeepCopyInto(out *ClusterMod)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Conf ¶
type Conf struct {
// AppendModifications is a list of modifications applied on the selected proxy.
AppendModifications *[]Modification `json:"appendModifications,omitempty"`
}
func (*Conf) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conf.
func (*Conf) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPFilterMatch ¶
type HTTPFilterMatch struct {
// Origin is the name of the component or plugin that generated the resource.
//
// Here is the list of well-known origins:
// inbound - resources generated for handling incoming traffic.
// outbound - resources generated for handling outgoing traffic.
// transparent - resources generated for transparent proxy functionality.
// prometheus - resources generated when Prometheus metrics are enabled.
// direct-access - resources generated for Direct Access functionality.
// ingress - resources generated for Zone Ingress.
// egress - resources generated for Zone Egress.
// gateway - resources generated for MeshGateway.
//
// The list is not complete, because policy plugins can introduce new resources.
// For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
Origin *string `json:"origin,omitempty"`
// Name of the HTTP filter. For example "envoy.filters.http.local_ratelimit"
Name *string `json:"name,omitempty"`
// Name of the listener to match.
ListenerName *string `json:"listenerName,omitempty"`
// Listener tags available in Listener#Metadata#FilterMetadata[io.kuma.tags]
ListenerTags *map[string]string `json:"listenerTags,omitempty"`
}
HTTPFilterMatch is a set of conditions that have to be matched for modification operation to happen.
func (*HTTPFilterMatch) DeepCopy ¶
func (in *HTTPFilterMatch) DeepCopy() *HTTPFilterMatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPFilterMatch.
func (*HTTPFilterMatch) DeepCopyInto ¶
func (in *HTTPFilterMatch) DeepCopyInto(out *HTTPFilterMatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPFilterMod ¶
type HTTPFilterMod struct {
// Match is a set of conditions that have to be matched for modification operation to happen.
Match *HTTPFilterMatch `json:"match,omitempty"`
// Operation to execute on matched listener.
// +kubebuilder:validation:Enum=Remove;Patch;AddFirst;AddBefore;AddAfter;AddLast
Operation ModOperation `json:"operation"`
// Value of xDS resource in YAML format to add or patch.
Value *string `json:"value,omitempty"`
// JsonPatches specifies list of jsonpatches to apply to on Envoy's
// HTTP Filter available in HTTP Connection Manager in a Listener resource.
JsonPatches *[]common_api.JsonPatchBlock `json:"jsonPatches,omitempty"`
}
HTTPFilterMod is a modification of Envoy HTTP Filter available in HTTP Connection Manager in a Listener resource.
func (*HTTPFilterMod) DeepCopy ¶
func (in *HTTPFilterMod) DeepCopy() *HTTPFilterMod
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPFilterMod.
func (*HTTPFilterMod) DeepCopyInto ¶
func (in *HTTPFilterMod) DeepCopyInto(out *HTTPFilterMod)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ListenerMatch ¶
type ListenerMatch struct {
// Origin is the name of the component or plugin that generated the resource.
//
// Here is the list of well-known origins:
// inbound - resources generated for handling incoming traffic.
// outbound - resources generated for handling outgoing traffic.
// transparent - resources generated for transparent proxy functionality.
// prometheus - resources generated when Prometheus metrics are enabled.
// direct-access - resources generated for Direct Access functionality.
// ingress - resources generated for Zone Ingress.
// egress - resources generated for Zone Egress.
// gateway - resources generated for MeshGateway.
//
// The list is not complete, because policy plugins can introduce new resources.
// For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
Origin *string `json:"origin,omitempty"`
// Name of the listener to match.
Name *string `json:"name,omitempty"`
// Tags available in Listener#Metadata#FilterMetadata[io.kuma.tags]
Tags *map[string]string `json:"tags,omitempty"`
}
ListenerMatch is a set of conditions that have to be matched for modification operation to happen.
func (*ListenerMatch) DeepCopy ¶
func (in *ListenerMatch) DeepCopy() *ListenerMatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenerMatch.
func (*ListenerMatch) DeepCopyInto ¶
func (in *ListenerMatch) DeepCopyInto(out *ListenerMatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ListenerMod ¶
type ListenerMod struct {
// Match is a set of conditions that have to be matched for modification operation to happen.
Match *ListenerMatch `json:"match,omitempty"`
// Operation to execute on matched listener.
// +kubebuilder:validation:Enum=Add;Remove;Patch
Operation ModOperation `json:"operation"`
// Value of xDS resource in YAML format to add or patch.
Value *string `json:"value,omitempty"`
// JsonPatches specifies list of jsonpatches to apply to on Envoy's Listener
// resource
JsonPatches *[]common_api.JsonPatchBlock `json:"jsonPatches,omitempty"`
}
ListenerMod is a modification of Envoy's Listener resource.
func (*ListenerMod) DeepCopy ¶
func (in *ListenerMod) DeepCopy() *ListenerMod
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenerMod.
func (*ListenerMod) DeepCopyInto ¶
func (in *ListenerMod) DeepCopyInto(out *ListenerMod)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MeshProxyPatch ¶
type MeshProxyPatch struct {
// TargetRef is a reference to the resource the policy takes an effect on.
// The resource could be either a real store object or virtual resource
// defined inplace.
TargetRef *common_api.TargetRef `json:"targetRef,omitempty"`
// Default is a configuration specific to the group of destinations
// referenced in 'targetRef'.
Default Conf `json:"default"`
}
MeshProxyPatch is a policy that lets you patch standard Envoy configuration generated by Kuma Control Plane.
func (*MeshProxyPatch) DeepCopy ¶
func (in *MeshProxyPatch) DeepCopy() *MeshProxyPatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MeshProxyPatch.
func (*MeshProxyPatch) DeepCopyInto ¶
func (in *MeshProxyPatch) DeepCopyInto(out *MeshProxyPatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MeshProxyPatch) GetDefault ¶
func (x *MeshProxyPatch) GetDefault() interface{}
func (*MeshProxyPatch) GetPolicyItem ¶
func (x *MeshProxyPatch) GetPolicyItem() core_model.PolicyItem
func (*MeshProxyPatch) GetTargetRef ¶
func (x *MeshProxyPatch) GetTargetRef() common_api.TargetRef
type MeshProxyPatchResource ¶
type MeshProxyPatchResource struct {
Meta model.ResourceMeta
Spec *MeshProxyPatch
}
func NewMeshProxyPatchResource ¶
func NewMeshProxyPatchResource() *MeshProxyPatchResource
func (*MeshProxyPatchResource) Deprecations ¶ added in v2.10.9
func (t *MeshProxyPatchResource) Deprecations() []string
func (*MeshProxyPatchResource) Descriptor ¶
func (t *MeshProxyPatchResource) Descriptor() model.ResourceTypeDescriptor
func (*MeshProxyPatchResource) GetMeta ¶
func (t *MeshProxyPatchResource) GetMeta() model.ResourceMeta
func (*MeshProxyPatchResource) GetSpec ¶
func (t *MeshProxyPatchResource) GetSpec() model.ResourceSpec
func (*MeshProxyPatchResource) GetStatus ¶
func (t *MeshProxyPatchResource) GetStatus() model.ResourceStatus
func (*MeshProxyPatchResource) SetMeta ¶
func (t *MeshProxyPatchResource) SetMeta(m model.ResourceMeta)
func (*MeshProxyPatchResource) SetSpec ¶
func (t *MeshProxyPatchResource) SetSpec(spec model.ResourceSpec) error
func (*MeshProxyPatchResource) SetStatus ¶
func (t *MeshProxyPatchResource) SetStatus(model.ResourceStatus) error
func (*MeshProxyPatchResource) Validate ¶
func (t *MeshProxyPatchResource) Validate() error
type MeshProxyPatchResourceList ¶
type MeshProxyPatchResourceList struct {
Items []*MeshProxyPatchResource
Pagination model.Pagination
}
func (*MeshProxyPatchResourceList) AddItem ¶
func (l *MeshProxyPatchResourceList) AddItem(r model.Resource) error
func (*MeshProxyPatchResourceList) GetItemType ¶
func (l *MeshProxyPatchResourceList) GetItemType() model.ResourceType
func (*MeshProxyPatchResourceList) GetItems ¶
func (l *MeshProxyPatchResourceList) GetItems() []model.Resource
func (*MeshProxyPatchResourceList) GetPagination ¶
func (l *MeshProxyPatchResourceList) GetPagination() *model.Pagination
func (*MeshProxyPatchResourceList) NewItem ¶
func (l *MeshProxyPatchResourceList) NewItem() model.Resource
func (*MeshProxyPatchResourceList) SetPagination ¶
func (l *MeshProxyPatchResourceList) SetPagination(p model.Pagination)
type ModOperation ¶
type ModOperation string
ModOperation is modification operation on Envoy's resource.
const ( // ModOpAdd adds a new resource. ModOpAdd ModOperation = "Add" // ModOpRemove removes an existing resource. ModOpRemove ModOperation = "Remove" // ModOpPatch modifies an existing resource. ModOpPatch ModOperation = "Patch" // ModOpAddFirst adds a resources as a first resource in the list. // Only applicable to NetworkFilter and HTTPFilter. ModOpAddFirst ModOperation = "AddFirst" // ModOpAddLast adds a resources as a last resource in the list. // Only applicable to NetworkFilter and HTTPFilter. ModOpAddLast ModOperation = "AddLast" // ModOpAddBefore adds a resources before existing resource in the list. // If existing resource does not exist, the new resource won't be added. // Only applicable to NetworkFilter and HTTPFilter. ModOpAddBefore ModOperation = "AddBefore" // ModOpAddAfter adds a resources after existing resource in the list. // If existing resource does not exist, the new resource won't be added. // Only applicable to NetworkFilter and HTTPFilter. ModOpAddAfter ModOperation = "AddAfter" )
type Modification ¶
type Modification struct {
// Cluster is a modification of Envoy's Cluster resource.
Cluster *ClusterMod `json:"cluster,omitempty"`
// Listener is a modification of Envoy's Listener resource.
Listener *ListenerMod `json:"listener,omitempty"`
// NetworkFilter is a modification of Envoy Listener's filter.
NetworkFilter *NetworkFilterMod `json:"networkFilter,omitempty"`
// HTTPFilter is a modification of Envoy HTTP Filter
// available in HTTP Connection Manager in a Listener resource.
HTTPFilter *HTTPFilterMod `json:"httpFilter,omitempty"`
// VirtualHost is a modification of Envoy's VirtualHost
// referenced in HTTP Connection Manager in a Listener resource.
VirtualHost *VirtualHostMod `json:"virtualHost,omitempty"`
}
func (*Modification) DeepCopy ¶
func (in *Modification) DeepCopy() *Modification
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Modification.
func (*Modification) DeepCopyInto ¶
func (in *Modification) DeepCopyInto(out *Modification)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkFilterMatch ¶
type NetworkFilterMatch struct {
// Origin is the name of the component or plugin that generated the resource.
//
// Here is the list of well-known origins:
// inbound - resources generated for handling incoming traffic.
// outbound - resources generated for handling outgoing traffic.
// transparent - resources generated for transparent proxy functionality.
// prometheus - resources generated when Prometheus metrics are enabled.
// direct-access - resources generated for Direct Access functionality.
// ingress - resources generated for Zone Ingress.
// egress - resources generated for Zone Egress.
// gateway - resources generated for MeshGateway.
//
// The list is not complete, because policy plugins can introduce new resources.
// For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
Origin *string `json:"origin,omitempty"`
// Name of the network filter. For example "envoy.filters.network.ratelimit"
Name *string `json:"name,omitempty"`
// Name of the listener to match.
ListenerName *string `json:"listenerName,omitempty"`
// Listener tags available in Listener#Metadata#FilterMetadata[io.kuma.tags]
ListenerTags *map[string]string `json:"listenerTags,omitempty"`
}
NetworkFilterMatch is a set of conditions that have to be matched for modification operation to happen.
func (*NetworkFilterMatch) DeepCopy ¶
func (in *NetworkFilterMatch) DeepCopy() *NetworkFilterMatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkFilterMatch.
func (*NetworkFilterMatch) DeepCopyInto ¶
func (in *NetworkFilterMatch) DeepCopyInto(out *NetworkFilterMatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkFilterMod ¶
type NetworkFilterMod struct {
// Match is a set of conditions that have to be matched for modification operation to happen.
Match *NetworkFilterMatch `json:"match,omitempty"`
// Operation to execute on matched listener.
// +kubebuilder:validation:Enum=Remove;Patch;AddFirst;AddBefore;AddAfter;AddLast
Operation ModOperation `json:"operation"`
// Value of xDS resource in YAML format to add or patch.
Value *string `json:"value,omitempty"`
// JsonPatches specifies list of jsonpatches to apply to on Envoy Listener's
// filter.
JsonPatches *[]common_api.JsonPatchBlock `json:"jsonPatches,omitempty"`
}
NetworkFilterMod is a modification of Envoy Listener's filter.
func (*NetworkFilterMod) DeepCopy ¶
func (in *NetworkFilterMod) DeepCopy() *NetworkFilterMod
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkFilterMod.
func (*NetworkFilterMod) DeepCopyInto ¶
func (in *NetworkFilterMod) DeepCopyInto(out *NetworkFilterMod)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualHostMatch ¶
type VirtualHostMatch struct {
// Origin is the name of the component or plugin that generated the resource.
//
// Here is the list of well-known origins:
// inbound - resources generated for handling incoming traffic.
// outbound - resources generated for handling outgoing traffic.
// transparent - resources generated for transparent proxy functionality.
// prometheus - resources generated when Prometheus metrics are enabled.
// direct-access - resources generated for Direct Access functionality.
// ingress - resources generated for Zone Ingress.
// egress - resources generated for Zone Egress.
// gateway - resources generated for MeshGateway.
//
// The list is not complete, because policy plugins can introduce new resources.
// For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
Origin *string `json:"origin,omitempty"`
// Name of the VirtualHost to match.
Name *string `json:"name,omitempty"`
// Name of the RouteConfiguration resource to match.
RouteConfigurationName *string `json:"routeConfigurationName,omitempty"`
}
VirtualHostMatch is a set of conditions that have to be matched for modification operation to happen.
func (*VirtualHostMatch) DeepCopy ¶
func (in *VirtualHostMatch) DeepCopy() *VirtualHostMatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualHostMatch.
func (*VirtualHostMatch) DeepCopyInto ¶
func (in *VirtualHostMatch) DeepCopyInto(out *VirtualHostMatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualHostMod ¶
type VirtualHostMod struct {
// Match is a set of conditions that have to be matched for modification operation to happen.
// +kuma:nolint // https://github.com/kumahq/kuma/issues/14107
Match *VirtualHostMatch `json:"match"`
// Operation to execute on matched listener.
// +kubebuilder:validation:Enum=Add;Remove;Patch
Operation ModOperation `json:"operation"`
// Value of xDS resource in YAML format to add or patch.
Value *string `json:"value,omitempty"`
// JsonPatches specifies list of jsonpatches to apply to on Envoy's
// VirtualHost resource
JsonPatches *[]common_api.JsonPatchBlock `json:"jsonPatches,omitempty"`
}
VirtualHostMod is a modification of Envoy's VirtualHost referenced in HTTP Connection Manager in a Listener resource.
func (*VirtualHostMod) DeepCopy ¶
func (in *VirtualHostMod) DeepCopy() *VirtualHostMod
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualHostMod.
func (*VirtualHostMod) DeepCopyInto ¶
func (in *VirtualHostMod) DeepCopyInto(out *VirtualHostMod)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.