istio

package
v0.0.26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

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)
}

type Workload

type Workload struct {
	// leave name empty to select ALL workloads in the namespace
	Labels    map[string]string
	Namespace string
	Kind      string
}

the target workload to deploy the filter to can select all workloads in a namespace

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL