component

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package component defines an in-memory representation of IstioControlPlane.<Feature>.<Component>. It provides functions for manipulating the component and rendering a manifest from it. See ../README.md for an architecture overview.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TranslateHelmValues

func TranslateHelmValues(icp *v1alpha2.IstioControlPlaneSpec, translator *translate.Translator, componentName name.ComponentName) (string, error)

TranslateHelmValues creates a Helm values.yaml config data tree from icp using the given translator.

Types

type CNIComponent

type CNIComponent struct {
	*CommonComponentFields
}

CNIComponent is the egress gateway component.

func NewCNIComponent

func NewCNIComponent(opts *Options) *CNIComponent

NewCNIComponent creates a new IngressComponent and returns a pointer to it.

func (*CNIComponent) Name

func (c *CNIComponent) Name() name.ComponentName

Name implements the IstioComponent interface.

func (*CNIComponent) RenderManifest

func (c *CNIComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*CNIComponent) Run

func (c *CNIComponent) Run() error

Run implements the IstioComponent interface.

type CRDComponent

type CRDComponent struct {
	*CommonComponentFields
}

CRDComponent is the pilot component.

func NewCRDComponent

func NewCRDComponent(opts *Options) *CRDComponent

NewCRDComponent creates a new CRDComponent and returns a pointer to it.

func (*CRDComponent) Name

func (c *CRDComponent) Name() name.ComponentName

Name implements the IstioComponent interface.

func (*CRDComponent) RenderManifest

func (c *CRDComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*CRDComponent) Run

func (c *CRDComponent) Run() error

Run implements the IstioComponent interface.

type CertManagerComponent

type CertManagerComponent struct {
	*CommonComponentFields
}

CertManagerComponent is the pilot component.

func NewCertManagerComponent

func NewCertManagerComponent(opts *Options) *CertManagerComponent

NewCertManagerComponent creates a new PilotComponent and returns a pointer to it.

func (*CertManagerComponent) Name

Name implements the IstioComponent interface.

func (*CertManagerComponent) RenderManifest

func (c *CertManagerComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*CertManagerComponent) Run

func (c *CertManagerComponent) Run() error

Run implements the IstioComponent interface.

type CitadelComponent

type CitadelComponent struct {
	*CommonComponentFields
}

CitadelComponent is the pilot component.

func NewCitadelComponent

func NewCitadelComponent(opts *Options) *CitadelComponent

NewCitadelComponent creates a new PilotComponent and returns a pointer to it.

func (*CitadelComponent) Name

Name implements the IstioComponent interface.

func (*CitadelComponent) RenderManifest

func (c *CitadelComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*CitadelComponent) Run

func (c *CitadelComponent) Run() error

Run implements the IstioComponent interface.

type CommonComponentFields

type CommonComponentFields struct {
	*Options
	// 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(opts *Options) *EgressComponent

NewEgressComponent creates a new IngressComponent and returns a pointer to it.

func (*EgressComponent) Name

Name implements the IstioComponent interface.

func (*EgressComponent) RenderManifest

func (c *EgressComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*EgressComponent) Run

func (c *EgressComponent) Run() error

Run implements the IstioComponent interface.

type GalleyComponent

type GalleyComponent struct {
	*CommonComponentFields
}

GalleyComponent is the pilot component.

func NewGalleyComponent

func NewGalleyComponent(opts *Options) *GalleyComponent

NewGalleyComponent creates a new PilotComponent and returns a pointer to it.

func (*GalleyComponent) Name

Name implements the IstioComponent interface.

func (*GalleyComponent) RenderManifest

func (c *GalleyComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*GalleyComponent) Run

func (c *GalleyComponent) Run() error

Run implements the IstioComponent interface.

type GrafanaComponent

type GrafanaComponent struct {
	*CommonComponentFields
}

GrafanaComponent is the egress gateway component.

func NewGrafanaComponent

func NewGrafanaComponent(opts *Options) *GrafanaComponent

NewGrafanaComponent creates a new IngressComponent and returns a pointer to it.

func (*GrafanaComponent) Name

Name implements the IstioComponent interface.

func (*GrafanaComponent) RenderManifest

func (c *GrafanaComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*GrafanaComponent) Run

func (c *GrafanaComponent) Run() error

Run implements the IstioComponent interface.

type IngressComponent

type IngressComponent struct {
	*CommonComponentFields
}

IngressComponent is the ingress gateway component.

func NewIngressComponent

func NewIngressComponent(opts *Options) *IngressComponent

NewIngressComponent creates a new IngressComponent and returns a pointer to it.

func (*IngressComponent) Name

Name implements the IstioComponent interface.

func (*IngressComponent) RenderManifest

func (c *IngressComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*IngressComponent) Run

func (c *IngressComponent) Run() error

Run implements the IstioComponent interface.

type IstioComponent

type IstioComponent interface {
	// name returns the name of the component.
	Name() name.ComponentName
	// 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 NewComponent

func NewComponent(cn name.ComponentName, opts *Options) IstioComponent

type KialiComponent

type KialiComponent struct {
	*CommonComponentFields
}

KialiComponent is the egress gateway component.

func NewKialiComponent

func NewKialiComponent(opts *Options) *KialiComponent

NewKialiComponent creates a new IngressComponent and returns a pointer to it.

func (*KialiComponent) Name

func (c *KialiComponent) Name() name.ComponentName

Name implements the IstioComponent interface.

func (*KialiComponent) RenderManifest

func (c *KialiComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*KialiComponent) Run

func (c *KialiComponent) Run() error

Run implements the IstioComponent interface.

type NodeAgentComponent

type NodeAgentComponent struct {
	*CommonComponentFields
}

NodeAgentComponent is the pilot component.

func NewNodeAgentComponent

func NewNodeAgentComponent(opts *Options) *NodeAgentComponent

NewNodeAgentComponent creates a new PilotComponent and returns a pointer to it.

func (*NodeAgentComponent) Name

Name implements the IstioComponent interface.

func (*NodeAgentComponent) RenderManifest

func (c *NodeAgentComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*NodeAgentComponent) Run

func (c *NodeAgentComponent) Run() error

Run implements the IstioComponent interface.

type Options

type Options struct {
	// FeatureName is the name of the feature this component belongs to.
	FeatureName name.FeatureName
	// InstallSpec is the global IstioControlPlaneSpec.
	InstallSpec *v1alpha2.IstioControlPlaneSpec
	// Translator is the translator for this component.
	Translator *translate.Translator
}

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

func (c *PilotComponent) Name() name.ComponentName

Name implements the IstioComponent interface.

func (*PilotComponent) RenderManifest

func (c *PilotComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*PilotComponent) Run

func (c *PilotComponent) Run() error

Run implements the IstioComponent interface.

type PolicyComponent

type PolicyComponent struct {
	*CommonComponentFields
}

PolicyComponent is the pilot component.

func NewPolicyComponent

func NewPolicyComponent(opts *Options) *PolicyComponent

NewPolicyComponent creates a new PilotComponent and returns a pointer to it.

func (*PolicyComponent) Name

Name implements the IstioComponent interface.

func (*PolicyComponent) RenderManifest

func (c *PolicyComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*PolicyComponent) Run

func (c *PolicyComponent) Run() error

Run implements the IstioComponent interface.

type PrometheusComponent

type PrometheusComponent struct {
	*CommonComponentFields
}

PrometheusComponent is the egress gateway component.

func NewPrometheusComponent

func NewPrometheusComponent(opts *Options) *PrometheusComponent

NewPrometheusComponent creates a new IngressComponent and returns a pointer to it.

func (*PrometheusComponent) Name

Name implements the IstioComponent interface.

func (*PrometheusComponent) RenderManifest

func (c *PrometheusComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*PrometheusComponent) Run

func (c *PrometheusComponent) Run() error

Run implements the IstioComponent interface.

type PrometheusOperatorComponent

type PrometheusOperatorComponent struct {
	*CommonComponentFields
}

PrometheusOperatorComponent is the egress gateway component.

func NewPrometheusOperatorComponent

func NewPrometheusOperatorComponent(opts *Options) *PrometheusOperatorComponent

NewPrometheusOperatorComponent creates a new IngressComponent and returns a pointer to it.

func (*PrometheusOperatorComponent) Name

Name implements the IstioComponent interface.

func (*PrometheusOperatorComponent) RenderManifest

func (c *PrometheusOperatorComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*PrometheusOperatorComponent) Run

Run implements the IstioComponent interface.

type SidecarInjectorComponent

type SidecarInjectorComponent struct {
	*CommonComponentFields
}

SidecarInjectorComponent is the pilot component.

func NewSidecarInjectorComponent

func NewSidecarInjectorComponent(opts *Options) *SidecarInjectorComponent

NewSidecarInjectorComponent creates a new PilotComponent and returns a pointer to it.

func (*SidecarInjectorComponent) Name

Name implements the IstioComponent interface.

func (*SidecarInjectorComponent) RenderManifest

func (c *SidecarInjectorComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*SidecarInjectorComponent) Run

Run implements the IstioComponent interface.

type TelemetryComponent

type TelemetryComponent struct {
	*CommonComponentFields
}

TelemetryComponent is the pilot component.

func NewTelemetryComponent

func NewTelemetryComponent(opts *Options) *TelemetryComponent

NewTelemetryComponent creates a new PilotComponent and returns a pointer to it.

func (*TelemetryComponent) Name

Name implements the IstioComponent interface.

func (*TelemetryComponent) RenderManifest

func (c *TelemetryComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*TelemetryComponent) Run

func (c *TelemetryComponent) Run() error

Run implements the IstioComponent interface.

type TracingComponent

type TracingComponent struct {
	*CommonComponentFields
}

TracingComponent is the egress gateway component.

func NewTracingComponent

func NewTracingComponent(opts *Options) *TracingComponent

NewTracingComponent creates a new IngressComponent and returns a pointer to it.

func (*TracingComponent) Name

Name implements the IstioComponent interface.

func (*TracingComponent) RenderManifest

func (c *TracingComponent) RenderManifest() (string, error)

RenderManifest implements the IstioComponent interface.

func (*TracingComponent) Run

func (c *TracingComponent) Run() error

Run implements the IstioComponent interface.

Jump to

Keyboard shortcuts

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