clusterregistry

package
v0.0.0-...-35e2b90 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The cluster's platform: Kubernetes, Consul, Eureka, CloudFoundry
	ClusterPlatform = "config.istio.io/platform"

	// The cluster's access configuration stored in k8s Secret object
	// E.g., on kubenetes, this file can be usually copied from .kube/config
	ClusterAccessConfigSecret          = "config.istio.io/accessConfigSecret"
	ClusterAccessConfigSecretNamespace = "config.istio.io/accessConfigSecretNamespace"
)

annotations for a Cluster

Variables

This section is empty.

Functions

func GetClusterID

func GetClusterID(cluster *k8s_cr.Cluster) string

GetClusterID returns a cluster's ID

func ReadClusters

func ReadClusters(k8s kubernetes.Interface, configMapName string,
	configMapNamespace string, cs *ClusterStore) error

ReadClusters reads multiple clusters from a ConfigMap

func ReadClustersV2

func ReadClustersV2(k8s kubernetes.Interface, cs *ClusterStore, podNameSpace string) (errList error)

ReadClustersV2 reads multiple clusters based upon the label istio/multiCluster

func StartSecretController

func StartSecretController(k8s kubernetes.Interface, cs *ClusterStore, namespace string) error

StartSecretController start k8s controller which will be watching Secret object in a specified namesapce

Types

type ClusterStore

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

ClusterStore is a collection of clusters

func NewClustersStore

func NewClustersStore() *ClusterStore

NewClustersStore initializes data struct to store clusters information

func (*ClusterStore) GetClientAccessConfigs

func (cs *ClusterStore) GetClientAccessConfigs() map[string]clientcmdapi.Config

GetClientAccessConfigs returns map of collected client configs

func (*ClusterStore) GetClusterAccessConfig

func (cs *ClusterStore) GetClusterAccessConfig(cluster *k8s_cr.Cluster) *clientcmdapi.Config

GetClusterAccessConfig returns the access config file of a cluster

func (*ClusterStore) GetPilotClusters

func (cs *ClusterStore) GetPilotClusters() []*k8s_cr.Cluster

GetPilotClusters return a list of clusters under this pilot, exclude PilotCfgStore

type Controller

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

Controller is the controller implementation for Secret resources

func NewController

func NewController(
	kubeclientset kubernetes.Interface,
	namespace string,
	cs *ClusterStore) *Controller

NewController returns a new secret controller

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{})

Run starts the controller until it receves a message over stopCh

Jump to

Keyboard shortcuts

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