Documentation
¶
Index ¶
Constants ¶
View Source
const (
WorkloadTypeDeployment = "deployment"
WorkloadTypeDaemonSet = "daemonset"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
Name string
Namespace string
}
reference to the wasme cache we need to update the configmap
type Provider ¶
type Provider struct {
Ctx context.Context
KubeClient kubernetes.Interface
Client ezkube.Ensurer
// pulls the image descriptor so we can get the
// name of the file created by the cache
Puller pull.ImagePuller
// the target workload to deploy the filter
Workload Workload
// reference to the wasme cache
Cache Cache
// set owner references on created Filters with this parent object
// if it's nil, they will not have an owner reference set
ParentObject ezkube.Object
// Callback to the caller when for when the istio provider
// updates a workload.
// err != nil in the case that update failed
OnWorkload func(workloadMeta metav1.ObjectMeta, err error)
// namespace of the istio control plane
// Provider will use this to determine the installed version of istio
// for abi compatibility
// defaults to istio-system
IstioNamespace string
// if non-zero, wait for cache events to be populated with this timeout before
// creating istio EnvoyFilters.
// set to zero to skip the check
WaitForCacheTimeout time.Duration
}
func NewProvider ¶
func NewProvider(ctx context.Context, kubeClient kubernetes.Interface, client ezkube.Ensurer, puller pull.ImagePuller, workload Workload, cache Cache, parentObject ezkube.Object, onWorkload func(workloadMeta metav1.ObjectMeta, err error), istioNamespace string, cacheTimeout time.Duration) (*Provider, error)
func (*Provider) ApplyFilter ¶
func (p *Provider) ApplyFilter(filter *v1.FilterSpec) error
applies the filter to all selected workloads and updates the image cache configmap
func (*Provider) RemoveFilter ¶
func (p *Provider) RemoveFilter(filter *v1.FilterSpec) error
removes the filter from all selected workloads in selected namespaces
type VersionInspector ¶
type VersionInspector interface {
GetIstioVersion() (string, error)
}
Click to show internal directories.
Click to hide internal directories.