Documentation ¶
Overview ¶
Definitions for Output Snapshots
Index ¶
- Variables
- func NewBuilder(ctx context.Context, name string) *builder
- type Builder
- type LabeledAuthorizationPolicySet
- type LabeledConfigMapSet
- type LabeledDestinationRuleSet
- type LabeledEnvoyFilterSet
- type LabeledGatewaySet
- type LabeledIssuedCertificateSet
- type LabeledPodBounceDirectiveSet
- type LabeledServiceEntrySet
- 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
Functions ¶
func NewBuilder ¶
Types ¶
type Builder ¶
type Builder interface { // add IssuedCertificates to the collected outputs AddIssuedCertificates(issuedCertificates ...*certificates_mesh_gloo_solo_io_v1alpha2.IssuedCertificate) // get the collected IssuedCertificates GetIssuedCertificates() certificates_mesh_gloo_solo_io_v1alpha2_sets.IssuedCertificateSet // add PodBounceDirectives to the collected outputs AddPodBounceDirectives(podBounceDirectives ...*certificates_mesh_gloo_solo_io_v1alpha2.PodBounceDirective) // get the collected PodBounceDirectives GetPodBounceDirectives() certificates_mesh_gloo_solo_io_v1alpha2_sets.PodBounceDirectiveSet // add XdsConfigs to the collected outputs AddXdsConfigs(xdsConfigs ...*xds_agent_enterprise_mesh_gloo_solo_io_v1alpha1.XdsConfig) // get the collected XdsConfigs GetXdsConfigs() xds_agent_enterprise_mesh_gloo_solo_io_v1alpha1_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 AuthorizationPolicies to the collected outputs AddAuthorizationPolicies(authorizationPolicies ...*security_istio_io_v1beta1.AuthorizationPolicy) // get the collected AuthorizationPolicies GetAuthorizationPolicies() security_istio_io_v1beta1_sets.AuthorizationPolicySet // add ConfigMaps to the collected outputs AddConfigMaps(configMaps ...*v1.ConfigMap) // get the collected ConfigMaps GetConfigMaps() v1_sets.ConfigMapSet // 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 // return the difference between the snapshot in this builder's and another Delta(newSnap Builder) output.SnapshotDelta }
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 LabeledConfigMapSet ¶ added in v0.10.4
type LabeledConfigMapSet interface { // returns the set of Labels shared by this ConfigMapSet Labels() map[string]string // returns the set of ConfigMapes with the given labels Set() v1_sets.ConfigMapSet // converts the set to a generic format which can be applied by the Snapshot.Apply functions Generic() output.ResourceList }
LabeledConfigMapSet represents a set of configMaps which share a common set of labels. These labels are used to find diffs between ConfigMapSets.
func NewLabeledConfigMapSet ¶ added in v0.10.4
func NewLabeledConfigMapSet(set v1_sets.ConfigMapSet, labels map[string]string) (LabeledConfigMapSet, 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_v1alpha2_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_v1alpha2_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_v1alpha2_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_v1alpha2_sets.PodBounceDirectiveSet, labels map[string]string) (LabeledPodBounceDirectiveSet, 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 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_v1alpha1_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_v1alpha1_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 AuthorizationPolicies with a given set of labels AuthorizationPolicies() []LabeledAuthorizationPolicySet // return the set of ConfigMaps with a given set of labels ConfigMaps() []LabeledConfigMapSet // 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) }
the snapshot of output resources produced by a translation
func NewLabelPartitionedSnapshot ¶
func NewLabelPartitionedSnapshot( name, labelKey string, issuedCertificates certificates_mesh_gloo_solo_io_v1alpha2_sets.IssuedCertificateSet, podBounceDirectives certificates_mesh_gloo_solo_io_v1alpha2_sets.PodBounceDirectiveSet, xdsConfigs xds_agent_enterprise_mesh_gloo_solo_io_v1alpha1_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, authorizationPolicies security_istio_io_v1beta1_sets.AuthorizationPolicySet, configMaps v1_sets.ConfigMapSet, 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_v1alpha2_sets.IssuedCertificateSet, podBounceDirectives certificates_mesh_gloo_solo_io_v1alpha2_sets.PodBounceDirectiveSet, xdsConfigs xds_agent_enterprise_mesh_gloo_solo_io_v1alpha1_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, authorizationPolicies security_istio_io_v1beta1_sets.AuthorizationPolicySet, configMaps v1_sets.ConfigMapSet, 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, authorizationPolicies []LabeledAuthorizationPolicySet, configMaps []LabeledConfigMapSet, clusters ...string, ) Snapshot