Documentation
¶
Overview ¶
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.
Index ¶
- type BaseComponent
- type CNIComponent
- type CommonComponentFields
- type EgressComponent
- type IngressComponent
- type IstioComponent
- type IstiodRemoteComponent
- func (c *IstiodRemoteComponent) ComponentName() name.ComponentName
- func (c *IstiodRemoteComponent) Enabled() bool
- func (c *IstiodRemoteComponent) Namespace() string
- func (c *IstiodRemoteComponent) RenderManifest() (string, error)
- func (c *IstiodRemoteComponent) ResourceName() string
- func (c *IstiodRemoteComponent) Run() error
- type Options
- type PilotComponent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseComponent ¶
type BaseComponent struct {
*CommonComponentFields
}
BaseComponent is the base component.
func NewCRDComponent ¶
func NewCRDComponent(opts *Options) *BaseComponent
NewCRDComponent creates a new BaseComponent and returns a pointer to it.
func (*BaseComponent) ComponentName ¶
func (c *BaseComponent) ComponentName() name.ComponentName
ComponentName implements the IstioComponent interface.
func (*BaseComponent) Enabled ¶
func (c *BaseComponent) Enabled() bool
Enabled implements the IstioComponent interface.
func (*BaseComponent) Namespace ¶
func (c *BaseComponent) Namespace() string
Namespace implements the IstioComponent interface.
func (*BaseComponent) RenderManifest ¶
func (c *BaseComponent) RenderManifest() (string, error)
RenderManifest implements the IstioComponent interface.
func (*BaseComponent) ResourceName ¶
func (c *BaseComponent) ResourceName() string
ResourceName implements the IstioComponent interface.
func (*BaseComponent) Run ¶
func (c *BaseComponent) Run() error
Run implements the IstioComponent interface.
type CNIComponent ¶
type CNIComponent struct {
*CommonComponentFields
}
CNIComponent is the istio cni component.
func NewCNIComponent ¶
func NewCNIComponent(opts *Options) *CNIComponent
NewCNIComponent creates a new NewCNIComponent and returns a pointer to it.
func (*CNIComponent) ComponentName ¶
func (c *CNIComponent) ComponentName() name.ComponentName
ComponentName implements the IstioComponent interface.
func (*CNIComponent) Enabled ¶
func (c *CNIComponent) Enabled() bool
Enabled implements the IstioComponent interface.
func (*CNIComponent) Namespace ¶
func (c *CNIComponent) Namespace() string
Namespace implements the IstioComponent interface.
func (*CNIComponent) RenderManifest ¶
func (c *CNIComponent) RenderManifest() (string, error)
RenderManifest implements the IstioComponent interface.
func (*CNIComponent) ResourceName ¶
func (c *CNIComponent) ResourceName() string
ResourceName implements the IstioComponent interface.
func (*CNIComponent) Run ¶
func (c *CNIComponent) Run() error
Run implements the IstioComponent interface.
type CommonComponentFields ¶
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 ¶
type EgressComponent struct {
*CommonComponentFields
}
EgressComponent is the egress gateway component.
func NewEgressComponent ¶
func NewEgressComponent(resourceName string, index int, spec *v1alpha1.GatewaySpec, opts *Options) *EgressComponent
NewEgressComponent creates a new IngressComponent and returns a pointer to it.
func (*EgressComponent) ComponentName ¶
func (c *EgressComponent) ComponentName() name.ComponentName
ComponentName implements the IstioComponent interface.
func (*EgressComponent) Enabled ¶
func (c *EgressComponent) Enabled() bool
Enabled implements the IstioComponent interface.
func (*EgressComponent) Namespace ¶
func (c *EgressComponent) Namespace() string
Namespace implements the IstioComponent interface.
func (*EgressComponent) RenderManifest ¶
func (c *EgressComponent) RenderManifest() (string, error)
RenderManifest implements the IstioComponent interface.
func (*EgressComponent) ResourceName ¶
func (c *EgressComponent) ResourceName() string
ResourceName implements the IstioComponent interface.
func (*EgressComponent) Run ¶
func (c *EgressComponent) Run() error
Run implements the IstioComponent interface.
type IngressComponent ¶
type IngressComponent struct {
*CommonComponentFields
}
IngressComponent is the ingress gateway component.
func NewIngressComponent ¶
func NewIngressComponent(resourceName string, index int, spec *v1alpha1.GatewaySpec, opts *Options) *IngressComponent
NewIngressComponent creates a new IngressComponent and returns a pointer to it.
func (*IngressComponent) ComponentName ¶
func (c *IngressComponent) ComponentName() name.ComponentName
ComponentName implements the IstioComponent interface.
func (*IngressComponent) Enabled ¶
func (c *IngressComponent) Enabled() bool
Enabled implements the IstioComponent interface.
func (*IngressComponent) Namespace ¶
func (c *IngressComponent) Namespace() string
Namespace implements the IstioComponent interface.
func (*IngressComponent) RenderManifest ¶
func (c *IngressComponent) RenderManifest() (string, error)
RenderManifest implements the IstioComponent interface.
func (*IngressComponent) ResourceName ¶
func (c *IngressComponent) ResourceName() string
ResourceName implements the IstioComponent interface.
func (*IngressComponent) Run ¶
func (c *IngressComponent) Run() error
Run implements the IstioComponent interface.
type IstioComponent ¶
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 ¶
func NewCoreComponent(cn name.ComponentName, opts *Options) IstioComponent
NewCoreComponent creates a new IstioComponent with the given componentName and options.
type IstiodRemoteComponent ¶
type IstiodRemoteComponent struct {
*CommonComponentFields
}
IstiodRemoteComponent is the istiod remote component.
func NewIstiodRemoteComponent ¶
func NewIstiodRemoteComponent(opts *Options) *IstiodRemoteComponent
NewIstiodRemoteComponent creates a new NewIstiodRemoteComponent and returns a pointer to it.
func (*IstiodRemoteComponent) ComponentName ¶
func (c *IstiodRemoteComponent) ComponentName() name.ComponentName
ComponentName implements the IstioComponent interface.
func (*IstiodRemoteComponent) Enabled ¶
func (c *IstiodRemoteComponent) Enabled() bool
Enabled implements the IstioComponent interface.
func (*IstiodRemoteComponent) Namespace ¶
func (c *IstiodRemoteComponent) Namespace() string
Namespace implements the IstioComponent interface.
func (*IstiodRemoteComponent) RenderManifest ¶
func (c *IstiodRemoteComponent) RenderManifest() (string, error)
RenderManifest implements the IstioComponent interface.
func (*IstiodRemoteComponent) ResourceName ¶
func (c *IstiodRemoteComponent) ResourceName() string
ResourceName implements the IstioComponent interface.
func (*IstiodRemoteComponent) Run ¶
func (c *IstiodRemoteComponent) Run() error
Run implements the IstioComponent interface.
type Options ¶
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 // Filter is the filenames to render Filter sets.Set // Version is the Kubernetes version information. Version *version.Info }
Options defines options for a component.
type PilotComponent ¶
type PilotComponent struct {
*CommonComponentFields
}
PilotComponent is the pilot component.
func NewPilotComponent ¶
func NewPilotComponent(opts *Options) *PilotComponent
NewPilotComponent creates a new PilotComponent and returns a pointer to it.
func (*PilotComponent) ComponentName ¶
func (c *PilotComponent) ComponentName() name.ComponentName
ComponentName implements the IstioComponent interface.
func (*PilotComponent) Enabled ¶
func (c *PilotComponent) Enabled() bool
Enabled implements the IstioComponent interface.
func (*PilotComponent) Namespace ¶
func (c *PilotComponent) Namespace() string
Namespace implements the IstioComponent interface.
func (*PilotComponent) RenderManifest ¶
func (c *PilotComponent) RenderManifest() (string, error)
RenderManifest implements the IstioComponent interface.
func (*PilotComponent) ResourceName ¶
func (c *PilotComponent) ResourceName() string
ResourceName implements the IstioComponent interface.
func (*PilotComponent) Run ¶
func (c *PilotComponent) Run() error
Run implements the IstioComponent interface.