mesh

package
v0.0.0-...-5e5ceee Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 50 Imported by: 1

Documentation

Overview

Package mesh contains types and functions.

Index

Constants

View Source
const (
	ChartsDeprecatedStr = "Deprecated, use --manifests instead."

	ForceFlagHelpStr                   = `Proceed even with validation errors.`
	MaxConcurrentReconcilesFlagHelpStr = `Defines the concurrency limit for operator to reconcile IstioOperatorSpec in parallel. Default value is 1.`
	HubFlagHelpStr                     = `The hub for the operator controller image.`
	TagFlagHelpStr                     = `The tag for the operator controller image.`
	ImagePullSecretsHelpStr            = `` /* 183-byte string literal not displayed */

	OperatorNamespaceHelpstr  = `The namespace the operator controller is installed into.`
	OperatorRevFlagHelpStr    = `Target revision for the operator.`
	AllOperatorRevFlagHelpStr = `Remove all versions of Istio operator.`
	ComponentFlagHelpStr      = "Specify which component to generate manifests for."
	VerifyCRInstallHelpStr    = "Verify the Istio control plane after installation/in-place upgrade"
)
View Source
const (
	AllResourcesRemovedWarning = "All Istio resources will be pruned from the cluster\n"
	NoResourcesRemovedWarning  = "No resources will be pruned from the cluster. Please double check the input configs\n"
	GatewaysRemovedWarning     = "You are about to remove the following gateways: %s." +
		" To avoid downtime, please quit this command and reinstall the gateway(s) with a revision that is not being removed from the cluster.\n"
	PurgeWithRevisionOrOperatorSpecifiedWarning = "Purge uninstall will remove all Istio resources, ignoring the specified revision or operator file"
)
View Source
const YAMLSuffix = ".yaml"

YAMLSuffix is the suffix of a YAML file.

Variables

View Source
var (

	// ManifestsFlagHelpStr is the command line description for --manifests
	ManifestsFlagHelpStr = `Specify a path to a directory of charts and profiles
(e.g. ~/Downloads/istio-` + baseVersion + `/manifests).
`
)

Functions

func Confirm

func Confirm(msg string, writer io.Writer) bool

Confirm waits for a user to confirm with the supplied message.

func GetRootCmd

func GetRootCmd(ctx cli.Context, args []string) *cobra.Command

GetRootCmd returns the root of the cobra command-tree.

func GetTagVersion

func GetTagVersion(tagInfo string) (string, error)

GetTagVersion returns istio tag version

func Install

func Install(kubeClient kube.CLIClient, rootArgs *RootArgs, iArgs *InstallArgs, stdOut io.Writer, l clog.Logger, p Printer,
) error

func InstallCmd

func InstallCmd(ctx cli.Context) *cobra.Command

InstallCmd generates an Istio install manifest and applies it to a cluster

func InstallCmdWithArgs

func InstallCmdWithArgs(ctx cli.Context, rootArgs *RootArgs, iArgs *InstallArgs) *cobra.Command

InstallCmdWithArgs generates an Istio install manifest and applies it to a cluster

func InstallManifests

func InstallManifests(iop *v1alpha12.IstioOperator, force bool, dryRun bool, kubeClient kube.Client, client client.Client,
	waitTimeout time.Duration, l clog.Logger,
) error

InstallManifests generates manifests from the given istiooperator instance and applies them to the cluster. See GenManifests for more description of the manifest generation process.

force   validation warnings are written to logger but command is not aborted
DryRun  all operations are done but nothing is written

Returns final IstioOperator after installation if successful.

func KubernetesClients

func KubernetesClients(kubeClient kube.CLIClient, l clog.Logger) (kube.CLIClient, client.Client, error)

func ManifestCmd

func ManifestCmd(ctx cli.Context) *cobra.Command

ManifestCmd is a group of commands related to manifest generation, installation, diffing and migration.

func ManifestGenerate

func ManifestGenerate(kubeClient kube.CLIClient, args *RootArgs, mgArgs *ManifestGenerateArgs, l clog.Logger) error

func ManifestGenerateCmd

func ManifestGenerateCmd(ctx cli.Context, rootArgs *RootArgs, mgArgs *ManifestGenerateArgs) *cobra.Command

func NewVerifyCommand

func NewVerifyCommand(ctx cli.Context) *cobra.Command

NewVerifyCommand creates a new command for verifying Istio Installation Status

func OperatorCmd

func OperatorCmd(ctx cli.Context) *cobra.Command

OperatorCmd is a group of commands related to installation and management of the operator controller.

func ProfileCmd

func ProfileCmd(_ cli.Context) *cobra.Command

ProfileCmd is a group of commands related to profile listing, dumping and diffing.

func RenderToDir

func RenderToDir(manifests name.ManifestMap, outputDir string, dryRun bool, l clog.Logger) error

RenderToDir writes manifests to a local filesystem directory tree.

func UninstallCmd

func UninstallCmd(ctx cli.Context) *cobra.Command

UninstallCmd command uninstalls Istio from a cluster

func UpgradeCmd

func UpgradeCmd(ctx cli.Context) *cobra.Command

UpgradeCmd upgrades Istio control plane in-place with eligibility checks.

Types

type InstallArgs

type InstallArgs struct {
	// InFilenames is an array of paths to the input IstioOperator CR files.
	InFilenames []string
	// ReadinessTimeout is maximum time to wait for all Istio resources to be ready. wait must be true for this setting
	// to take effect.
	ReadinessTimeout time.Duration
	// SkipConfirmation determines whether the user is prompted for confirmation.
	// If set to true, the user is not prompted and a Yes response is assumed in all cases.
	SkipConfirmation bool
	// Force proceeds even if there are validation errors
	Force bool
	// Verify after installation
	Verify bool
	// Set is a string with element format "path=value" where path is an IstioOperator path and the value is a
	// value to set the node at that path to.
	Set []string
	// ManifestsPath is a path to a ManifestsPath and profiles directory in the local filesystem with a release tgz.
	ManifestsPath string
	// Revision is the Istio control plane revision the command targets.
	Revision string
}

func (*InstallArgs) String

func (a *InstallArgs) String() string

type ManifestGenerateArgs

type ManifestGenerateArgs struct {
	// InFilenames is an array of paths to the input IstioOperator CR files.
	InFilenames []string
	// OutFilename is the path to the generated output directory.
	OutFilename string

	// EnableClusterSpecific determines if the current Kubernetes cluster will be used to autodetect values.
	// If false, generic defaults will be used. This is useful when generating once and then applying later.
	EnableClusterSpecific bool

	// Set is a string with element format "path=value" where path is an IstioOperator path and the value is a
	// value to set the node at that path to.
	Set []string
	// Force proceeds even if there are validation errors
	Force bool
	// ManifestsPath is a path to a charts and profiles directory in the local filesystem with a release tgz.
	ManifestsPath string
	// Revision is the Istio control plane revision the command targets.
	Revision string
	// Components is a list of strings specifying which component's manifests to be generated.
	Components []string
	// Filter is the list of components to render
	Filter []string
}

func (*ManifestGenerateArgs) String

func (a *ManifestGenerateArgs) String() string

type Printer

type Printer interface {
	Printf(format string, a ...any)
	Println(string)
}

func NewPrinterForWriter

func NewPrinterForWriter(w io.Writer) Printer

type RootArgs

type RootArgs struct {
	// DryRun performs all steps except actually applying the manifests or creating output dirs/files.
	DryRun bool
}

Jump to

Keyboard shortcuts

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