istio: istio.io/istio/istioctl/pkg/multicluster Index | Files

package multicluster

import "istio.io/istio/istioctl/pkg/multicluster"

Index

Package Files

apply.go cluster.go describe.go env.go generate.go mesh.go options.go remote_secret.go

Constants

const (
    // default service account to use for remote cluster access.
    DefaultServiceAccountName = "istio-reader-service-account"
)

func CreateRemoteSecret Uses

func CreateRemoteSecret(opt RemoteSecretOptions, env Environment) (string, error)

CreateRemoteSecret creates a remote secret with credentials of the specified service account. This is useful for providing a cluster access to a remote apiserver.

func Describe Uses

func Describe(opt describeOptions, env Environment) error

func NewApplyCommand Uses

func NewApplyCommand() *cobra.Command

NewApplyCommand creates a new command for applying multicluster configuration to the mesh.

func NewCreateRemoteSecretCommand Uses

func NewCreateRemoteSecretCommand() *cobra.Command

NewCreateRemoteSecretCommand creates a new command for joining two contexts together in a multi-cluster mesh.

func NewDescribeCommand Uses

func NewDescribeCommand() *cobra.Command

func NewGenerateCommand Uses

func NewGenerateCommand() *cobra.Command

func NewMulticlusterCommand Uses

func NewMulticlusterCommand() *cobra.Command

type CACerts Uses

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

type Cluster Uses

type Cluster struct {
    ClusterDesc

    // Current context referenced by the MeshDesc. This context corresponds to the `context` in
    // the current kubeconfig file. It is essentially the human friendly display
    // name. It can be changed by the user with`kubectl config rename-context`.
    Context string
    // contains filtered or unexported fields
}

Cluster represents the current state of a cluster in the mesh.

func NewCluster Uses

func NewCluster(context string, desc ClusterDesc, env Environment) (*Cluster, error)

func (*Cluster) String Uses

func (c *Cluster) String() string

type ClusterDesc Uses

type ClusterDesc struct {
    // Name of the cluster's network
    Network string `json:"network,omitempty"`

    // Optional Namespace override of the Istio control plane. `istio-system` if not set.
    Namespace string `json:"namespace,omitempty"`

    // Optional service account to use for cross-cluster authentication. `istio-multi` if not set.
    ServiceAccountReader string `json:"serviceAccountReader"`

    // When true, disables linking the service registry of this cluster with other clustersByContext in the mesh.
    DisableRegistryJoin bool `json:"disableRegistryJoin,omitempty"`
}

ClusterDesc describes attributes of a cluster and the desired state of joining the mesh.

type ConditionFunc Uses

type ConditionFunc func() (done bool, err error)

type Environment Uses

type Environment interface {
    GetConfig() *api.Config
    CreateClientSet(context string) (kubernetes.Interface, error)
    Stdout() io.Writer
    Stderr() io.Writer
    ReadFile(filename string) ([]byte, error)
    Printf(format string, a ...interface{})
    Errorf(format string, a ...interface{})
    Poll(interval, timeout time.Duration, condition ConditionFunc) error
}

func NewEnvironmentFromCobra Uses

func NewEnvironmentFromCobra(kubeconfig, context string, cmd *cobra.Command) (Environment, error)

type Gateway Uses

type Gateway struct {
    RegistryServiceName string
    Address             string
    Port                uint32
    Locality            string
    Cluster             *Cluster
}

func (Gateway) String Uses

func (g Gateway) String() string

type KubeEnvironment Uses

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

func NewEnvironment Uses

func NewEnvironment(kubeconfig, context string, stdout, stderr io.Writer) (*KubeEnvironment, error)

func (*KubeEnvironment) CreateClientSet Uses

func (e *KubeEnvironment) CreateClientSet(context string) (kubernetes.Interface, error)

func (*KubeEnvironment) Errorf Uses

func (e *KubeEnvironment) Errorf(format string, a ...interface{})

func (*KubeEnvironment) GetConfig Uses

func (e *KubeEnvironment) GetConfig() *api.Config

func (*KubeEnvironment) Poll Uses

func (e *KubeEnvironment) Poll(interval, timeout time.Duration, condition ConditionFunc) error

func (*KubeEnvironment) Printf Uses

func (e *KubeEnvironment) Printf(format string, a ...interface{})

func (*KubeEnvironment) ReadFile Uses

func (e *KubeEnvironment) ReadFile(filename string) ([]byte, error)

func (*KubeEnvironment) Stderr Uses

func (e *KubeEnvironment) Stderr() io.Writer

func (*KubeEnvironment) Stdout Uses

func (e *KubeEnvironment) Stdout() io.Writer

type KubeOptions Uses

type KubeOptions struct {
    Kubeconfig string
    Context    string
    Namespace  string
}

KubeOptions contains kubernetes options common to all commands.

type Mesh Uses

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

func NewMesh Uses

func NewMesh(md *MeshDesc, clusters ...*Cluster) *Mesh

func (*Mesh) ClusterByContext Uses

func (m *Mesh) ClusterByContext(context string) (*Cluster, bool)

func (*Mesh) ClusterByUID Uses

func (m *Mesh) ClusterByUID(uid types.UID) (*Cluster, bool)

func (*Mesh) SortedClusters Uses

func (m *Mesh) SortedClusters() []*Cluster

type MeshDesc Uses

type MeshDesc struct {
    // Mesh Identifier.
    MeshID string `json:"mesh_id,omitempty"`

    // Collection of clusters in the multi-cluster mesh. Clusters are indexed by context name and
    // reference clusters defined in the Kubeconfig following kubectl precedence rules.
    Clusters map[string]ClusterDesc `json:"contexts,omitempty"`
}

MeshDesc describes the topology of a multi-cluster mesh. The clustersByContext in the mesh reference the active Kubeconfig file as described by https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig.

func LoadMeshDesc Uses

func LoadMeshDesc(filename string, env Environment) (*MeshDesc, error)

type RemoteSecretAuthType Uses

type RemoteSecretAuthType string

RemoteSecretAuthType is a strongly typed authentication type suitable for use with pflags.Var().

const (
    // Use a bearer token for authentication to the remote kubernetes cluster.
    RemoteSecretAuthTypeBearerToken RemoteSecretAuthType = "bearer-token"

    // User a custom custom authentication plugin for the remote kubernetes cluster.
    RemoteSecretAuthTypePlugin RemoteSecretAuthType = "plugin"
)

func (*RemoteSecretAuthType) Set Uses

func (at *RemoteSecretAuthType) Set(in string) error

func (*RemoteSecretAuthType) String Uses

func (at *RemoteSecretAuthType) String() string

func (*RemoteSecretAuthType) Type Uses

func (at *RemoteSecretAuthType) Type() string

type RemoteSecretOptions Uses

type RemoteSecretOptions struct {
    KubeOptions

    // Create a secret with this service account's credentials.
    ServiceAccountName string

    // Authentication method for the remote Kubernetes cluster.
    AuthType RemoteSecretAuthType

    // Authenticator plugin configuration
    AuthPluginName   string
    AuthPluginConfig map[string]string
}

RemoteSecretOptions contains the options for creating a remote secret.

Package multicluster imports 43 packages (graph) and is imported by 4 packages. Updated 2019-12-14. Refresh now. Tools for package owners.