component

package
v0.0.0-...-ff5570b Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllComponents = []Component{
	{
		UserFacingName:       BaseComponentName,
		SpecName:             "base",
		Default:              true,
		HelmSubdir:           "base",
		ToHelmValuesTreeRoot: "global",
	},
	{
		UserFacingName:       PilotComponentName,
		SpecName:             "pilot",
		Default:              true,
		ResourceType:         "Deployment",
		ResourceName:         "istiod",
		ContainerName:        "discovery",
		HelmSubdir:           "istio-control/istio-discovery",
		ToHelmValuesTreeRoot: "pilot",
	},
	{
		UserFacingName:       IngressComponentName,
		SpecName:             "ingressGateways",
		Multi:                true,
		Default:              true,
		ResourceType:         "Deployment",
		ResourceName:         "istio-ingressgateway",
		ContainerName:        "istio-proxy",
		HelmSubdir:           "gateways/istio-ingress",
		ToHelmValuesTreeRoot: "gateways.istio-ingressgateway",
		AltEnablementPath:    "spec.values.gateways.istio-ingressgateway.enabled",
	},
	{
		UserFacingName:       EgressComponentName,
		SpecName:             "egressGateways",
		Multi:                true,
		ResourceType:         "Deployment",
		ResourceName:         "istio-egressgateway",
		ContainerName:        "istio-proxy",
		HelmSubdir:           "gateways/istio-egress",
		ToHelmValuesTreeRoot: "gateways.istio-egressgateway",
		AltEnablementPath:    "spec.values.gateways.istio-egressgateway.enabled",
	},
	{
		UserFacingName:       CNIComponentName,
		SpecName:             "cni",
		ResourceType:         "DaemonSet",
		ResourceName:         "istio-cni-node",
		ContainerName:        "install-cni",
		HelmSubdir:           "istio-cni",
		ToHelmValuesTreeRoot: "cni",
	},
	{
		UserFacingName:       IstiodRemoteComponentName,
		SpecName:             "istiodRemote",
		HelmSubdir:           "istiod-remote",
		ToHelmValuesTreeRoot: "global",
	},
	{
		UserFacingName:       ZtunnelComponentName,
		SpecName:             "ztunnel",
		ResourceType:         "DaemonSet",
		ResourceName:         "ztunnel",
		HelmSubdir:           "ztunnel",
		ToHelmValuesTreeRoot: "ztunnel",
		ContainerName:        "istio-proxy",
		FlattenValues:        true,
	},
}
View Source
var (
	Icons = map[Name]string{
		BaseComponentName:    "⛵️",
		PilotComponentName:   "🧠",
		CNIComponentName:     "🪢",
		ZtunnelComponentName: "🔒",
		IngressComponentName: "🛬",
		EgressComponentName:  "🛫",
	}
)

Functions

func UserFacingComponentName

func UserFacingComponentName(name Name) string

UserFacingComponentName returns the name of the given component that should be displayed to the user in high level CLIs (like progress log).

Types

type Component

type Component struct {
	// UserFacingName is the component name in user facing cases
	UserFacingName Name
	// SpecName is the yaml key in the IstioOperato spec
	SpecName string
	Default  bool
	Multi    bool
	// ResourceType maps a Name to the type of the rendered k8s resource.
	ResourceType string
	// ResourceName maps a Name to the name of the rendered k8s resource.
	ResourceName string
	// ContainerName maps a Name to the name of the container in a Deployment.
	ContainerName string
	// HelmSubdir is a mapping between a component name and the subdirectory of the component Chart.
	HelmSubdir string
	// ToHelmValuesTreeRoot is the tree root in values YAML files for the component.
	ToHelmValuesTreeRoot string
	// FlattenValues, if true, means the component expects values not prefixed with ToHelmValuesTreeRoot
	// For example `.name=foo` instead of `.component.name=foo`.
	FlattenValues bool
	// AltEnablementPath is the alternative path, from values, to enable the component
	AltEnablementPath string
}

func (Component) Get

func (c Component) Get(merged values.Map) ([]apis.GatewayComponentSpec, error)

func (Component) IsGateway

func (c Component) IsGateway() bool

type Name

type Name string

Name is a component name string, typed to constrain allowed values.

const (
	// IstioComponent names corresponding to the IstioOperator proto component names. Must be the same, since these
	// are used for struct traversal.
	BaseComponentName  Name = "Base"
	PilotComponentName Name = "Pilot"

	CNIComponentName     Name = "Cni"
	ZtunnelComponentName Name = "Ztunnel"

	// istiod remote component
	IstiodRemoteComponentName Name = "IstiodRemote"

	IngressComponentName Name = "IngressGateways"
	EgressComponentName  Name = "EgressGateways"
)

Jump to

Keyboard shortcuts

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