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

package multicluster

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

Index

Package Files

cluster.go describe.go env.go generate.go join.go mesh.go options.go remote_secret.go trust_anchor.go

Constants

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

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 CreateTrustAnchor Uses

func CreateTrustAnchor(opt TrustAnchorOptions) (string, error)

CreateTrustAnchor creates a configmap with the public root CA of the current cluster's Istio control plane. This can be used to establish trust between two or more clustersByContext.

func Describe Uses

func Describe(opt describeOptions, env Environment) error

func Join Uses

func Join(opt joinOptions, env Environment) error

func NewCreateRemoteSecretCommand Uses

func NewCreateRemoteSecretCommand() *cobra.Command

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

func NewCreateTrustAnchorCommand Uses

func NewCreateTrustAnchorCommand() *cobra.Command

NewCreateTrustAnchorCommand creates a new command for establishing trust between two clustersByContext in a multi-cluster mesh.

func NewDescribeCommand Uses

func NewDescribeCommand() *cobra.Command

func NewGenerateCommand Uses

func NewGenerateCommand() *cobra.Command

func NewGenerateValuesCommand Uses

func NewGenerateValuesCommand() *cobra.Command

func NewJoinCommand Uses

func NewJoinCommand() *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
    // 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.
    DisableServiceDiscovery bool `json:"joinServiceDiscovery,omitempty"`
}

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

type ClusterID Uses

type ClusterID struct {
    KubeSystemUID types.UID
    Context       string
}

func NewClusterID Uses

func NewClusterID(uid types.UID, context string) *ClusterID

func (*ClusterID) String Uses

func (c *ClusterID) String() string

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{})
}

func NewEnvironmentFromCobra Uses

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

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) 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(kubeconfig string, md *MeshDesc, env Environment) (*Mesh, error)

type MeshDesc Uses

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

    // Collection of clustersByContext in the multi-cluster mesh. Clusters are indexed by Context name and
    // reference clustersByContext defined in the Kubeconfig following kubectl precedence rules.
    Clusters map[string]ClusterDesc `json:"clusters,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.

type TrustAnchorOptions Uses

type TrustAnchorOptions struct {
    KubeOptions
}

TrustAnchorOptions contains the options for creating a trust anchor.

Package multicluster imports 35 packages (graph) and is imported by 4 packages. Updated 2019-10-23. Refresh now. Tools for package owners.