component

package
v0.0.0-...-caeb0ac Latest Latest
Warning

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

Go to latest
Published: Dec 18, 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",
		ReleaseName:          "base",
	},
	{
		UserFacingName:       PilotComponentName,
		SpecName:             "pilot",
		Default:              true,
		ResourceType:         "Deployment",
		ResourceName:         "istiod",
		ContainerName:        "discovery",
		HelmSubdir:           "istio-control/istio-discovery",
		ToHelmValuesTreeRoot: "pilot",
		ReleaseName:          "istiod",
	},
	{
		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",
		ReleaseName:          "cni",
	},
	{
		UserFacingName:       IstiodRemoteComponentName,
		SpecName:             "istiodRemote",
		HelmSubdir:           "istiod-remote",
		ToHelmValuesTreeRoot: "global",
		ReleaseName:          "istiod-remote",
	},
	{
		UserFacingName:       ZtunnelComponentName,
		SpecName:             "ztunnel",
		ResourceType:         "DaemonSet",
		ResourceName:         "ztunnel",
		HelmSubdir:           "ztunnel",
		ToHelmValuesTreeRoot: "ztunnel",
		ContainerName:        "istio-proxy",
		FlattenValues:        true,
		ReleaseName:          "ztunnel",
	},
}
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 IstioOperator 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
	// ReleaseName is the name of the chart in the official istio helm release. Not present for all components
	ReleaseName 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"

	// Deprecated: 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