Documentation ¶
Overview ¶
Definitions for Output Snapshots
Index ¶
- Variables
- func NewBuilder(ctx context.Context, name string) *builder
- type Builder
- type LabeledAuthorizationPolicySet
- type LabeledDestinationRuleSet
- type LabeledEnvoyFilterSet
- type LabeledGatewaySet
- type LabeledIssuedCertificateSet
- type LabeledPodBounceDirectiveSet
- type LabeledRateLimitConfigSet
- type LabeledServiceEntrySet
- type LabeledSidecarSet
- type LabeledVirtualServiceSet
- type LabeledXdsConfigSet
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
var MissingRequiredLabelError = func(labelKey, resourceKind string, obj ezkube.ResourceId) error { return eris.Errorf("expected label %v not on labels of %v %v", labelKey, resourceKind, sets.Key(obj)) }
this error can occur if constructing a Partitioned Snapshot from a resource that is missing the partition label
var SnapshotGVKs = []schema.GroupVersionKind{ schema.GroupVersionKind{ Group: "certificates.mesh.gloo.solo.io", Version: "v1", Kind: "IssuedCertificate", }, schema.GroupVersionKind{ Group: "certificates.mesh.gloo.solo.io", Version: "v1", Kind: "PodBounceDirective", }, schema.GroupVersionKind{ Group: "xds.agent.enterprise.mesh.gloo.solo.io", Version: "v1beta1", Kind: "XdsConfig", }, schema.GroupVersionKind{ Group: "networking.istio.io", Version: "v1alpha3", Kind: "DestinationRule", }, schema.GroupVersionKind{ Group: "networking.istio.io", Version: "v1alpha3", Kind: "EnvoyFilter", }, schema.GroupVersionKind{ Group: "networking.istio.io", Version: "v1alpha3", Kind: "Gateway", }, schema.GroupVersionKind{ Group: "networking.istio.io", Version: "v1alpha3", Kind: "ServiceEntry", }, schema.GroupVersionKind{ Group: "networking.istio.io", Version: "v1alpha3", Kind: "VirtualService", }, schema.GroupVersionKind{ Group: "networking.istio.io", Version: "v1alpha3", Kind: "Sidecar", }, schema.GroupVersionKind{ Group: "security.istio.io", Version: "v1beta1", Kind: "AuthorizationPolicy", }, schema.GroupVersionKind{ Group: "ratelimit.solo.io", Version: "v1alpha1", Kind: "RateLimitConfig", }, }
SnapshotGVKs is a list of the GVKs included in this snapshot
Functions ¶
func NewBuilder ¶
Types ¶
type Builder ¶
type Builder interface { // add IssuedCertificates to the collected outputs AddIssuedCertificates(issuedCertificates ...*certificates_mesh_gloo_solo_io_v1.IssuedCertificate) // get the collected IssuedCertificates GetIssuedCertificates() certificates_mesh_gloo_solo_io_v1_sets.IssuedCertificateSet // add PodBounceDirectives to the collected outputs AddPodBounceDirectives(podBounceDirectives ...*certificates_mesh_gloo_solo_io_v1.PodBounceDirective) // get the collected PodBounceDirectives GetPodBounceDirectives() certificates_mesh_gloo_solo_io_v1_sets.PodBounceDirectiveSet // add XdsConfigs to the collected outputs AddXdsConfigs(xdsConfigs ...*xds_agent_enterprise_mesh_gloo_solo_io_v1beta1.XdsConfig) // get the collected XdsConfigs GetXdsConfigs() xds_agent_enterprise_mesh_gloo_solo_io_v1beta1_sets.XdsConfigSet // add DestinationRules to the collected outputs AddDestinationRules(destinationRules ...*networking_istio_io_v1alpha3.DestinationRule) // get the collected DestinationRules GetDestinationRules() networking_istio_io_v1alpha3_sets.DestinationRuleSet // add EnvoyFilters to the collected outputs AddEnvoyFilters(envoyFilters ...*networking_istio_io_v1alpha3.EnvoyFilter) // get the collected EnvoyFilters GetEnvoyFilters() networking_istio_io_v1alpha3_sets.EnvoyFilterSet // add Gateways to the collected outputs AddGateways(gateways ...*networking_istio_io_v1alpha3.Gateway) // get the collected Gateways GetGateways() networking_istio_io_v1alpha3_sets.GatewaySet // add ServiceEntries to the collected outputs AddServiceEntries(serviceEntries ...*networking_istio_io_v1alpha3.ServiceEntry) // get the collected ServiceEntries GetServiceEntries() networking_istio_io_v1alpha3_sets.ServiceEntrySet // add VirtualServices to the collected outputs AddVirtualServices(virtualServices ...*networking_istio_io_v1alpha3.VirtualService) // get the collected VirtualServices GetVirtualServices() networking_istio_io_v1alpha3_sets.VirtualServiceSet // add Sidecars to the collected outputs AddSidecars(sidecars ...*networking_istio_io_v1alpha3.Sidecar) // get the collected Sidecars GetSidecars() networking_istio_io_v1alpha3_sets.SidecarSet // add AuthorizationPolicies to the collected outputs AddAuthorizationPolicies(authorizationPolicies ...*security_istio_io_v1beta1.AuthorizationPolicy) // get the collected AuthorizationPolicies GetAuthorizationPolicies() security_istio_io_v1beta1_sets.AuthorizationPolicySet // add RateLimitConfigs to the collected outputs AddRateLimitConfigs(rateLimitConfigs ...*ratelimit_solo_io_v1alpha1.RateLimitConfig) // get the collected RateLimitConfigs GetRateLimitConfigs() ratelimit_solo_io_v1alpha1_sets.RateLimitConfigSet // build the collected outputs into a label-partitioned snapshot BuildLabelPartitionedSnapshot(labelKey string) (Snapshot, error) // build the collected outputs into a snapshot with a single partition BuildSinglePartitionedSnapshot(snapshotLabels map[string]string) (Snapshot, error) // add a cluster to the collected clusters. // this can be used to collect clusters for use with MultiCluster snapshots. AddCluster(cluster string) // returns the set of clusters currently stored in this builder Clusters() []string // merge all the resources from another Builder into this one Merge(other Builder) // create a clone of this builder (deepcopying all resources) Clone() Builder // convert this snapshot to its generic form Generic() resource.ClusterSnapshot // iterate over the objects contained in the snapshot ForEachObject(handleObject func(cluster string, gvk schema.GroupVersionKind, obj resource.TypedObject)) }
the output Builder uses a builder pattern to allow iteratively collecting outputs before producing a final snapshot
type LabeledAuthorizationPolicySet ¶
type LabeledAuthorizationPolicySet interface { // returns the set of Labels shared by this AuthorizationPolicySet Labels() map[string]string // returns the set of AuthorizationPolicyes with the given labels Set() security_istio_io_v1beta1_sets.AuthorizationPolicySet // converts the set to a generic format which can be applied by the Snapshot.Apply functions Generic() output.ResourceList }
LabeledAuthorizationPolicySet represents a set of authorizationPolicies which share a common set of labels. These labels are used to find diffs between AuthorizationPolicySets.
func NewLabeledAuthorizationPolicySet ¶
func NewLabeledAuthorizationPolicySet(set security_istio_io_v1beta1_sets.AuthorizationPolicySet, labels map[string]string) (LabeledAuthorizationPolicySet, error)
type LabeledDestinationRuleSet ¶
type LabeledDestinationRuleSet interface { // returns the set of Labels shared by this DestinationRuleSet Labels() map[string]string // returns the set of DestinationRulees with the given labels Set() networking_istio_io_v1alpha3_sets.DestinationRuleSet // converts the set to a generic format which can be applied by the Snapshot.Apply functions Generic() output.ResourceList }
LabeledDestinationRuleSet represents a set of destinationRules which share a common set of labels. These labels are used to find diffs between DestinationRuleSets.
func NewLabeledDestinationRuleSet ¶
func NewLabeledDestinationRuleSet(set networking_istio_io_v1alpha3_sets.DestinationRuleSet, labels map[string]string) (LabeledDestinationRuleSet, error)
type LabeledEnvoyFilterSet ¶
type LabeledEnvoyFilterSet interface { // returns the set of Labels shared by this EnvoyFilterSet Labels() map[string]string // returns the set of EnvoyFilteres with the given labels Set() networking_istio_io_v1alpha3_sets.EnvoyFilterSet // converts the set to a generic format which can be applied by the Snapshot.Apply functions Generic() output.ResourceList }
LabeledEnvoyFilterSet represents a set of envoyFilters which share a common set of labels. These labels are used to find diffs between EnvoyFilterSets.
func NewLabeledEnvoyFilterSet ¶
func NewLabeledEnvoyFilterSet(set networking_istio_io_v1alpha3_sets.EnvoyFilterSet, labels map[string]string) (LabeledEnvoyFilterSet, error)
type LabeledGatewaySet ¶
type LabeledGatewaySet interface { // returns the set of Labels shared by this GatewaySet Labels() map[string]string // returns the set of Gatewayes with the given labels Set() networking_istio_io_v1alpha3_sets.GatewaySet // converts the set to a generic format which can be applied by the Snapshot.Apply functions Generic() output.ResourceList }
LabeledGatewaySet represents a set of gateways which share a common set of labels. These labels are used to find diffs between GatewaySets.
func NewLabeledGatewaySet ¶
func NewLabeledGatewaySet(set networking_istio_io_v1alpha3_sets.GatewaySet, labels map[string]string) (LabeledGatewaySet, error)
type LabeledIssuedCertificateSet ¶
type LabeledIssuedCertificateSet interface { // returns the set of Labels shared by this IssuedCertificateSet Labels() map[string]string // returns the set of IssuedCertificatees with the given labels Set() certificates_mesh_gloo_solo_io_v1_sets.IssuedCertificateSet // converts the set to a generic format which can be applied by the Snapshot.Apply functions Generic() output.ResourceList }
LabeledIssuedCertificateSet represents a set of issuedCertificates which share a common set of labels. These labels are used to find diffs between IssuedCertificateSets.
func NewLabeledIssuedCertificateSet ¶
func NewLabeledIssuedCertificateSet(set certificates_mesh_gloo_solo_io_v1_sets.IssuedCertificateSet, labels map[string]string) (LabeledIssuedCertificateSet, error)
type LabeledPodBounceDirectiveSet ¶
type LabeledPodBounceDirectiveSet interface { // returns the set of Labels shared by this PodBounceDirectiveSet Labels() map[string]string // returns the set of PodBounceDirectivees with the given labels Set() certificates_mesh_gloo_solo_io_v1_sets.PodBounceDirectiveSet // converts the set to a generic format which can be applied by the Snapshot.Apply functions Generic() output.ResourceList }
LabeledPodBounceDirectiveSet represents a set of podBounceDirectives which share a common set of labels. These labels are used to find diffs between PodBounceDirectiveSets.
func NewLabeledPodBounceDirectiveSet ¶
func NewLabeledPodBounceDirectiveSet(set certificates_mesh_gloo_solo_io_v1_sets.PodBounceDirectiveSet, labels map[string]string) (LabeledPodBounceDirectiveSet, error)
type LabeledRateLimitConfigSet ¶ added in v1.1.0
type LabeledRateLimitConfigSet interface { // returns the set of Labels shared by this RateLimitConfigSet Labels() map[string]string // returns the set of RateLimitConfiges with the given labels Set() ratelimit_solo_io_v1alpha1_sets.RateLimitConfigSet // converts the set to a generic format which can be applied by the Snapshot.Apply functions Generic() output.ResourceList }
LabeledRateLimitConfigSet represents a set of rateLimitConfigs which share a common set of labels. These labels are used to find diffs between RateLimitConfigSets.
func NewLabeledRateLimitConfigSet ¶ added in v1.1.0
func NewLabeledRateLimitConfigSet(set ratelimit_solo_io_v1alpha1_sets.RateLimitConfigSet, labels map[string]string) (LabeledRateLimitConfigSet, error)
type LabeledServiceEntrySet ¶
type LabeledServiceEntrySet interface { // returns the set of Labels shared by this ServiceEntrySet Labels() map[string]string // returns the set of ServiceEntryes with the given labels Set() networking_istio_io_v1alpha3_sets.ServiceEntrySet // converts the set to a generic format which can be applied by the Snapshot.Apply functions Generic() output.ResourceList }
LabeledServiceEntrySet represents a set of serviceEntries which share a common set of labels. These labels are used to find diffs between ServiceEntrySets.
func NewLabeledServiceEntrySet ¶
func NewLabeledServiceEntrySet(set networking_istio_io_v1alpha3_sets.ServiceEntrySet, labels map[string]string) (LabeledServiceEntrySet, error)
type LabeledSidecarSet ¶ added in v1.1.0
type LabeledSidecarSet interface { // returns the set of Labels shared by this SidecarSet Labels() map[string]string // returns the set of Sidecares with the given labels Set() networking_istio_io_v1alpha3_sets.SidecarSet // converts the set to a generic format which can be applied by the Snapshot.Apply functions Generic() output.ResourceList }
LabeledSidecarSet represents a set of sidecars which share a common set of labels. These labels are used to find diffs between SidecarSets.
func NewLabeledSidecarSet ¶ added in v1.1.0
func NewLabeledSidecarSet(set networking_istio_io_v1alpha3_sets.SidecarSet, labels map[string]string) (LabeledSidecarSet, error)
type LabeledVirtualServiceSet ¶
type LabeledVirtualServiceSet interface { // returns the set of Labels shared by this VirtualServiceSet Labels() map[string]string // returns the set of VirtualServicees with the given labels Set() networking_istio_io_v1alpha3_sets.VirtualServiceSet // converts the set to a generic format which can be applied by the Snapshot.Apply functions Generic() output.ResourceList }
LabeledVirtualServiceSet represents a set of virtualServices which share a common set of labels. These labels are used to find diffs between VirtualServiceSets.
func NewLabeledVirtualServiceSet ¶
func NewLabeledVirtualServiceSet(set networking_istio_io_v1alpha3_sets.VirtualServiceSet, labels map[string]string) (LabeledVirtualServiceSet, error)
type LabeledXdsConfigSet ¶ added in v0.10.4
type LabeledXdsConfigSet interface { // returns the set of Labels shared by this XdsConfigSet Labels() map[string]string // returns the set of XdsConfiges with the given labels Set() xds_agent_enterprise_mesh_gloo_solo_io_v1beta1_sets.XdsConfigSet // converts the set to a generic format which can be applied by the Snapshot.Apply functions Generic() output.ResourceList }
LabeledXdsConfigSet represents a set of xdsConfigs which share a common set of labels. These labels are used to find diffs between XdsConfigSets.
func NewLabeledXdsConfigSet ¶ added in v0.10.4
func NewLabeledXdsConfigSet(set xds_agent_enterprise_mesh_gloo_solo_io_v1beta1_sets.XdsConfigSet, labels map[string]string) (LabeledXdsConfigSet, error)
type Snapshot ¶
type Snapshot interface { // return the set of IssuedCertificates with a given set of labels IssuedCertificates() []LabeledIssuedCertificateSet // return the set of PodBounceDirectives with a given set of labels PodBounceDirectives() []LabeledPodBounceDirectiveSet // return the set of XdsConfigs with a given set of labels XdsConfigs() []LabeledXdsConfigSet // return the set of DestinationRules with a given set of labels DestinationRules() []LabeledDestinationRuleSet // return the set of EnvoyFilters with a given set of labels EnvoyFilters() []LabeledEnvoyFilterSet // return the set of Gateways with a given set of labels Gateways() []LabeledGatewaySet // return the set of ServiceEntries with a given set of labels ServiceEntries() []LabeledServiceEntrySet // return the set of VirtualServices with a given set of labels VirtualServices() []LabeledVirtualServiceSet // return the set of Sidecars with a given set of labels Sidecars() []LabeledSidecarSet // return the set of AuthorizationPolicies with a given set of labels AuthorizationPolicies() []LabeledAuthorizationPolicySet // return the set of RateLimitConfigs with a given set of labels RateLimitConfigs() []LabeledRateLimitConfigSet // apply the snapshot to the local cluster, garbage collecting stale resources ApplyLocalCluster(ctx context.Context, clusterClient client.Client, errHandler output.ErrorHandler) // apply resources from the snapshot across multiple clusters, garbage collecting stale resources ApplyMultiCluster(ctx context.Context, multiClusterClient multicluster.Client, errHandler output.ErrorHandler) // serialize the entire snapshot as JSON MarshalJSON() ([]byte, error) // convert this snapshot to its generic form Generic() resource.ClusterSnapshot // iterate over the objects contained in the snapshot ForEachObject(handleObject func(cluster string, gvk schema.GroupVersionKind, obj resource.TypedObject)) }
the snapshot of output resources produced by a translation
func NewLabelPartitionedSnapshot ¶
func NewLabelPartitionedSnapshot( name, labelKey string, issuedCertificates certificates_mesh_gloo_solo_io_v1_sets.IssuedCertificateSet, podBounceDirectives certificates_mesh_gloo_solo_io_v1_sets.PodBounceDirectiveSet, xdsConfigs xds_agent_enterprise_mesh_gloo_solo_io_v1beta1_sets.XdsConfigSet, destinationRules networking_istio_io_v1alpha3_sets.DestinationRuleSet, envoyFilters networking_istio_io_v1alpha3_sets.EnvoyFilterSet, gateways networking_istio_io_v1alpha3_sets.GatewaySet, serviceEntries networking_istio_io_v1alpha3_sets.ServiceEntrySet, virtualServices networking_istio_io_v1alpha3_sets.VirtualServiceSet, sidecars networking_istio_io_v1alpha3_sets.SidecarSet, authorizationPolicies security_istio_io_v1beta1_sets.AuthorizationPolicySet, rateLimitConfigs ratelimit_solo_io_v1alpha1_sets.RateLimitConfigSet, clusters ...string, ) (Snapshot, error)
automatically partitions the input resources by the presence of the provided label.
func NewSinglePartitionedSnapshot ¶
func NewSinglePartitionedSnapshot( name string, snapshotLabels map[string]string, issuedCertificates certificates_mesh_gloo_solo_io_v1_sets.IssuedCertificateSet, podBounceDirectives certificates_mesh_gloo_solo_io_v1_sets.PodBounceDirectiveSet, xdsConfigs xds_agent_enterprise_mesh_gloo_solo_io_v1beta1_sets.XdsConfigSet, destinationRules networking_istio_io_v1alpha3_sets.DestinationRuleSet, envoyFilters networking_istio_io_v1alpha3_sets.EnvoyFilterSet, gateways networking_istio_io_v1alpha3_sets.GatewaySet, serviceEntries networking_istio_io_v1alpha3_sets.ServiceEntrySet, virtualServices networking_istio_io_v1alpha3_sets.VirtualServiceSet, sidecars networking_istio_io_v1alpha3_sets.SidecarSet, authorizationPolicies security_istio_io_v1beta1_sets.AuthorizationPolicySet, rateLimitConfigs ratelimit_solo_io_v1alpha1_sets.RateLimitConfigSet, clusters ...string, ) (Snapshot, error)
simplified constructor for a snapshot with a single label partition (i.e. all resources share a single set of labels).
func NewSnapshot ¶
func NewSnapshot( name string, issuedCertificates []LabeledIssuedCertificateSet, podBounceDirectives []LabeledPodBounceDirectiveSet, xdsConfigs []LabeledXdsConfigSet, destinationRules []LabeledDestinationRuleSet, envoyFilters []LabeledEnvoyFilterSet, gateways []LabeledGatewaySet, serviceEntries []LabeledServiceEntrySet, virtualServices []LabeledVirtualServiceSet, sidecars []LabeledSidecarSet, authorizationPolicies []LabeledAuthorizationPolicySet, rateLimitConfigs []LabeledRateLimitConfigSet, clusters ...string, ) Snapshot