istio: istio.io/istio/operator/cmd/mesh Index | Files

package mesh

import "istio.io/istio/operator/cmd/mesh"

Package mesh contains types and functions.

Index

Package Files

install.go manifest-diff.go manifest-generate.go manifest.go operator-common.go operator-dump.go operator-init.go operator-remove.go operator.go profile-diff.go profile-dump.go profile-list.go profile.go root.go shared.go test-util.go uninstall.go upgrade.go

Constants

const (
    ChartsDeprecatedStr = "Deprecated, use --manifests instead."
    ControlPlaneRevStr  = "Control plane revision"

    ForceFlagHelpStr        = `Proceed even with validation errors.`
    KubeConfigFlagHelpStr   = `Path to kube config.`
    ContextFlagHelpStr      = `The name of the kubeconfig context to use.`
    HubFlagHelpStr          = `The hub for the operator controller image.`
    TagFlagHelpStr          = `The tag for the operator controller image.`
    ImagePullSecretsHelpStr = "" /* 185 byte string literal not displayed */

    OperatorNamespaceHelpstr = `The namespace the operator controller is installed into.`
    OperatorRevFlagHelpStr   = `Target revision for the operator.`
    ComponentFlagHelpStr     = "Specify which component to generate manifests for."
    VerifyCRInstallHelpStr   = "Verify the Istio control plane after installation/in-place upgrade"
)
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." +
        ""  /* 137 byte string literal not displayed */
    PurgeWithRevisionOrOperatorSpecifiedWarning = "Purge uninstall will remove all Istio resources, ignoring the specified revision or operator file"
)
const YAMLSuffix = ".yaml"

YAMLSuffix is the suffix of a YAML file.

Variables

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)
or release tar URL (e.g. ` + url.ReleaseTar + `).
`
)

func BuildClientConfig Uses

func BuildClientConfig(kubeconfig, context string) (*rest.Config, error)

BuildClientConfig is a helper function that builds client config from a kubeconfig filepath. It overrides the current context with the one provided (empty to use default).

This is a modified version of k8s.io/client-go/tools/clientcmd/BuildConfigFromFlags with the difference that it loads default configs if not running in-cluster.

func DetectIstioVersionDiff Uses

func DetectIstioVersionDiff(cmd *cobra.Command, tag string, ns string, kubeClient kube.ExtendedClient, setFlags []string) error

DetectIstioVersionDiff will show warning if istioctl version and control plane version are different nolint: interfacer

func GetRootCmd Uses

func GetRootCmd(args []string) *cobra.Command

GetRootCmd returns the root of the cobra command-tree.

func GetTagVersion Uses

func GetTagVersion(tagInfo string) (string, error)

GetTagVersion returns istio tag version

func HavePathValueContain Uses

func HavePathValueContain(expected interface{}) types.GomegaMatcher

HavePathValueContain matches map[string]interface{} tree against a PathValue.

func HavePathValueEqual Uses

func HavePathValueEqual(expected interface{}) types.GomegaMatcher

HavePathValueEqual matches map[string]interface{} tree against a PathValue.

func HavePathValueMatchRegex Uses

func HavePathValueMatchRegex(expected interface{}) types.GomegaMatcher

HavePathValueMatchRegex matches map[string]interface{} tree against a PathValue.

func InitK8SRestClient Uses

func InitK8SRestClient(kubeconfig, kubeContext string) (*rest.Config, *kubernetes.Clientset, error)

InitK8SRestClient creates a rest.Config qne Clientset from the given kubeconfig path and context.

func InstallCmd Uses

func InstallCmd(logOpts *log.Options) *cobra.Command

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

func InstallManifests Uses

func InstallManifests(iop *v1alpha12.IstioOperator, force bool, dryRun bool, restConfig *rest.Config, client client.Client,
    waitTimeout time.Duration, l clog.Logger) (*v1alpha12.IstioOperator, 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 K8sConfig Uses

func K8sConfig(kubeConfigPath string, context string) (*rest.Config, *kubernetes.Clientset, client.Client, error)

K8sConfig creates a rest.Config, Clientset and controller runtime Client from the given kubeconfig path and context.

func ManifestCmd Uses

func ManifestCmd(logOpts *log.Options) *cobra.Command

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

func OperatorCmd Uses

func OperatorCmd() *cobra.Command

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

func ProfileCmd Uses

func ProfileCmd() *cobra.Command

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

func RenderToDir Uses

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

RenderToDir writes manifests to a local filesystem directory tree.

func UninstallCmd Uses

func UninstallCmd(logOpts *log.Options) *cobra.Command

UninstallCmd command uninstalls Istio from a cluster

func UpgradeCmd Uses

func UpgradeCmd() *cobra.Command

UpgradeCmd upgrades Istio control plane in-place with eligibility checks

type Client Uses

type Client struct {
    Config *rest.Config
    *rest.RESTClient
}

Client is a helper wrapper around the Kube RESTClient for istioctl -> Pilot/Envoy/Mesh related things

func NewClient Uses

func NewClient(kubeconfig, configContext string) (*Client, error)

NewClient is the constructor for the client wrapper

func (*Client) CheckUnsupportedAlphaSecurityCRD Uses

func (client *Client) CheckUnsupportedAlphaSecurityCRD() error

func (*Client) ConfigMapForSelector Uses

func (client *Client) ConfigMapForSelector(namespace, labelSelector string) (*v1.ConfigMapList, error)

func (*Client) GetIstioVersions Uses

func (client *Client) GetIstioVersions(namespace string) ([]ComponentVersion, error)

GetIstioVersions gets the version for each Istio component

func (*Client) GetPods Uses

func (client *Client) GetPods(namespace string, params map[string]string) (*v1.PodList, error)

GetPods retrieves the pod objects for Istio deployments

func (*Client) PodsForSelector Uses

func (client *Client) PodsForSelector(namespace, labelSelector string) (*v1.PodList, error)

type ComponentVersion Uses

type ComponentVersion struct {
    Component string
    Version   string
    Pod       v1.Pod
}

ComponentVersion is a pair of component name and version

func (ComponentVersion) String Uses

func (cv ComponentVersion) String() string

type ExecClient Uses

type ExecClient interface {
    GetIstioVersions(namespace string) ([]ComponentVersion, error)
    GetPods(namespace string, params map[string]string) (*v1.PodList, error)
    PodsForSelector(namespace, labelSelector string) (*v1.PodList, error)
    ConfigMapForSelector(namespace, labelSelector string) (*v1.ConfigMapList, error)
}

ExecClient is an interface for remote execution

type HavePathValueContainMatcher Uses

type HavePathValueContainMatcher struct {
    // contains filtered or unexported fields
}

HavePathValueContainMatcher is a matcher type for HavePathValueContain.

func (*HavePathValueContainMatcher) FailureMessage Uses

func (m *HavePathValueContainMatcher) FailureMessage(actual interface{}) string

FailureMessage implements the Matcher interface.

func (*HavePathValueContainMatcher) Match Uses

func (m *HavePathValueContainMatcher) Match(actual interface{}) (bool, error)

Match implements the Matcher interface.

func (*HavePathValueContainMatcher) NegatedFailureMessage Uses

func (m *HavePathValueContainMatcher) NegatedFailureMessage(actual interface{}) string

NegatedFailureMessage implements the Matcher interface.

type HavePathValueEqualMatcher Uses

type HavePathValueEqualMatcher struct {
    // contains filtered or unexported fields
}

HavePathValueEqualMatcher is a matcher type for HavePathValueEqual.

func (*HavePathValueEqualMatcher) FailureMessage Uses

func (m *HavePathValueEqualMatcher) FailureMessage(actual interface{}) string

FailureMessage implements the Matcher interface.

func (*HavePathValueEqualMatcher) Match Uses

func (m *HavePathValueEqualMatcher) Match(actual interface{}) (bool, error)

Match implements the Matcher interface.

func (*HavePathValueEqualMatcher) NegatedFailureMessage Uses

func (m *HavePathValueEqualMatcher) NegatedFailureMessage(actual interface{}) string

NegatedFailureMessage implements the Matcher interface.

type HavePathValueMatchRegexMatcher Uses

type HavePathValueMatchRegexMatcher struct {
    // contains filtered or unexported fields
}

HavePathValueMatchRegexMatcher is a matcher type for HavePathValueMatchRegex.

func (*HavePathValueMatchRegexMatcher) FailureMessage Uses

func (m *HavePathValueMatchRegexMatcher) FailureMessage(actual interface{}) string

FailureMessage implements the Matcher interface.

func (*HavePathValueMatchRegexMatcher) Match Uses

func (m *HavePathValueMatchRegexMatcher) Match(actual interface{}) (bool, error)

Match implements the Matcher interface.

func (*HavePathValueMatchRegexMatcher) NegatedFailureMessage Uses

func (m *HavePathValueMatchRegexMatcher) NegatedFailureMessage(actual interface{}) string

NegatedFailureMessage implements the Matcher interface.

type ObjectSet Uses

type ObjectSet struct {
    // contains filtered or unexported fields
}

ObjectSet is a set of objects maintained both as a slice (for ordering) and map (for speed).

func NewObjectSet Uses

func NewObjectSet(objs object.K8sObjects) *ObjectSet

NewObjectSet creates a new ObjectSet from objs and returns a pointer to it.

type PathValue Uses

type PathValue struct {
    // contains filtered or unexported fields
}

PathValue is a path/value type.

func (*PathValue) String Uses

func (pv *PathValue) String() string

String implements the Stringer interface.

Package mesh imports 63 packages (graph) and is imported by 7 packages. Updated 2021-01-27. Refresh now. Tools for package owners.