Documentation ¶
Index ¶
- Constants
- func GetClusterID(cluster *k8s_cr.Cluster) string
- func ReadClusters(k8s kubernetes.Interface, configMapName string, configMapNamespace string, ...) error
- func StartSecretController(k8s kubernetes.Interface, cs *ClusterStore, ...) error
- type ClusterStore
- type Controller
- type Metadata
- type RemoteCluster
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 ¶
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, discoveryService *envoy.DiscoveryService, 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, discoveryService *envoy.DiscoveryService, 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 Metadata ¶
type Metadata struct {
Name, Namespace string
}
Metadata defines a struct used as a key
type RemoteCluster ¶
type RemoteCluster struct { Cluster *k8s_cr.Cluster Client *clientcmdapi.Config ClusterStatus string Controller *kube.Controller ControlChannel chan struct{} }
RemoteCluster defines cluster struct
Click to show internal directories.
Click to hide internal directories.