clusterregistry

package
v0.0.0-...-46d7da7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 24 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 StartSecretController

func StartSecretController(k8s kubernetes.Interface,
	cs *ClusterStore,
	serviceController *aggregate.Controller,
	discoveryServer *envoy.DiscoveryServer,
	namespace string,
	resyncInterval time.Duration,
	watchedNamespace,
	domainSufix 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) GetClusterAccessConfig

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

GetClusterAccessConfig returns the access config file of a cluster

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,
	serviceController *aggregate.Controller,
	discoveryServer *envoy.DiscoveryServer,
	resyncInterval time.Duration,
	watchedNamespace string,
	domainSufix string) *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

type RemoteCluster

type RemoteCluster struct {
	Cluster        *k8s_cr.Cluster
	FromSecret     string
	Client         *clientcmdapi.Config
	ClusterStatus  string
	Controller     *kube.Controller
	ControlChannel chan struct{}
}

RemoteCluster defines cluster struct

Jump to

Keyboard shortcuts

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