import "istio.io/istio/operator/pkg/component"
Package component defines an in-memory representation of IstioOperator.<Feature>.<Component>. It provides functions for manipulating the component and rendering a manifest from it. See ../README.md for an architecture overview.
type BaseComponent struct { *CommonComponentFields }
BaseComponent is the base component.
func NewCRDComponent(opts *Options) *BaseComponent
NewCRDComponent creates a new BaseComponent and returns a pointer to it.
func (c *BaseComponent) ComponentName() name.ComponentName
ComponentName implements the IstioComponent interface.
func (c *BaseComponent) Enabled() bool
Enabled implements the IstioComponent interface.
func (c *BaseComponent) Namespace() string
Namespace implements the IstioComponent interface.
func (c *BaseComponent) RenderManifest() (string, error)
RenderManifest implements the IstioComponent interface.
func (c *BaseComponent) ResourceName() string
ResourceName implements the IstioComponent interface.
func (c *BaseComponent) Run() error
Run implements the IstioComponent interface.
type CNIComponent struct { *CommonComponentFields }
CNIComponent is the istio cni component.
func NewCNIComponent(opts *Options) *CNIComponent
NewCNIComponent creates a new NewCNIComponent and returns a pointer to it.
func (c *CNIComponent) ComponentName() name.ComponentName
ComponentName implements the IstioComponent interface.
func (c *CNIComponent) Enabled() bool
Enabled implements the IstioComponent interface.
func (c *CNIComponent) Namespace() string
Namespace implements the IstioComponent interface.
func (c *CNIComponent) RenderManifest() (string, error)
RenderManifest implements the IstioComponent interface.
func (c *CNIComponent) ResourceName() string
ResourceName implements the IstioComponent interface.
func (c *CNIComponent) Run() error
Run implements the IstioComponent interface.
type CommonComponentFields struct { *Options ComponentName name.ComponentName // resourceName is the name of all resources for this component. ResourceName string // contains filtered or unexported fields }
CommonComponentFields is a struct common to all components.
type EgressComponent struct { *CommonComponentFields }
EgressComponent is the egress gateway component.
func NewEgressComponent(resourceName string, index int, spec *v1alpha1.GatewaySpec, opts *Options) *EgressComponent
NewEgressComponent creates a new IngressComponent and returns a pointer to it.
func (c *EgressComponent) ComponentName() name.ComponentName
ComponentName implements the IstioComponent interface.
func (c *EgressComponent) Enabled() bool
Enabled implements the IstioComponent interface.
func (c *EgressComponent) Namespace() string
Namespace implements the IstioComponent interface.
func (c *EgressComponent) RenderManifest() (string, error)
RenderManifest implements the IstioComponent interface.
func (c *EgressComponent) ResourceName() string
ResourceName implements the IstioComponent interface.
func (c *EgressComponent) Run() error
Run implements the IstioComponent interface.
type IngressComponent struct { *CommonComponentFields }
IngressComponent is the ingress gateway component.
func NewIngressComponent(resourceName string, index int, spec *v1alpha1.GatewaySpec, opts *Options) *IngressComponent
NewIngressComponent creates a new IngressComponent and returns a pointer to it.
func (c *IngressComponent) ComponentName() name.ComponentName
ComponentName implements the IstioComponent interface.
func (c *IngressComponent) Enabled() bool
Enabled implements the IstioComponent interface.
func (c *IngressComponent) Namespace() string
Namespace implements the IstioComponent interface.
func (c *IngressComponent) RenderManifest() (string, error)
RenderManifest implements the IstioComponent interface.
func (c *IngressComponent) ResourceName() string
ResourceName implements the IstioComponent interface.
func (c *IngressComponent) Run() error
Run implements the IstioComponent interface.
type IstioComponent interface { // ComponentName returns the name of the component. ComponentName() name.ComponentName // ResourceName returns the name of the resources of the component. ResourceName() string // Namespace returns the namespace for the component. Namespace() string // Enabled reports whether the component is enabled. Enabled() bool // Run starts the component. Must me called before the component is used. Run() error // RenderManifest returns a string with the rendered manifest for the component. RenderManifest() (string, error) }
IstioComponent defines the interface for a component.
func NewCoreComponent(cn name.ComponentName, opts *Options) IstioComponent
NewCoreComponent creates a new IstioComponent with the given componentName and options.
type IstiodRemoteComponent struct { *CommonComponentFields }
IstiodRemoteComponent is the istiod remote component.
func NewIstiodRemoteComponent(opts *Options) *IstiodRemoteComponent
NewIstiodRemoteComponent creates a new NewIstiodRemoteComponent and returns a pointer to it.
func (c *IstiodRemoteComponent) ComponentName() name.ComponentName
ComponentName implements the IstioComponent interface.
func (c *IstiodRemoteComponent) Enabled() bool
Enabled implements the IstioComponent interface.
func (c *IstiodRemoteComponent) Namespace() string
Namespace implements the IstioComponent interface.
func (c *IstiodRemoteComponent) RenderManifest() (string, error)
RenderManifest implements the IstioComponent interface.
func (c *IstiodRemoteComponent) ResourceName() string
ResourceName implements the IstioComponent interface.
func (c *IstiodRemoteComponent) Run() error
Run implements the IstioComponent interface.
type Options struct { // installSpec is the global IstioOperatorSpec. InstallSpec *v1alpha1.IstioOperatorSpec // translator is the translator for this component. Translator *translate.Translator // Namespace is the namespace for this component. Namespace string }
Options defines options for a component.
type PilotComponent struct { *CommonComponentFields }
PilotComponent is the pilot component.
func NewPilotComponent(opts *Options) *PilotComponent
NewPilotComponent creates a new PilotComponent and returns a pointer to it.
func (c *PilotComponent) ComponentName() name.ComponentName
ComponentName implements the IstioComponent interface.
func (c *PilotComponent) Enabled() bool
Enabled implements the IstioComponent interface.
func (c *PilotComponent) Namespace() string
Namespace implements the IstioComponent interface.
func (c *PilotComponent) RenderManifest() (string, error)
RenderManifest implements the IstioComponent interface.
func (c *PilotComponent) ResourceName() string
ResourceName implements the IstioComponent interface.
func (c *PilotComponent) Run() error
Run implements the IstioComponent interface.
Package component imports 10 packages (graph) and is imported by 1 packages. Updated 2020-10-30. Refresh now. Tools for package owners.