Documentation ¶
Index ¶
- type ClusterMetadata
- type DynamicLoadBalancerNodePools
- type DynamicNodepool
- type IPPair
- type StaticLoadBalancerNodePools
- type StaticNodeInfo
- type StaticNodepool
- type Usecases
- func (u *Usecases) CiliumRolloutRestart(request *pb.CiliumRolloutRestartRequest) (*pb.CiliumRolloutRestartResponse, error)
- func (u *Usecases) DeleteClusterMetadata(ctx context.Context, request *pb.DeleteClusterMetadataRequest) (*pb.DeleteClusterMetadataResponse, error)
- func (u *Usecases) DeleteKubeconfig(ctx context.Context, request *pb.DeleteKubeconfigRequest) (*pb.DeleteKubeconfigResponse, error)
- func (u *Usecases) DeleteNodes(ctx context.Context, request *pb.DeleteNodesRequest) (*pb.DeleteNodesResponse, error)
- func (u *Usecases) DestroyClusterAutoscaler(ctx context.Context, request *pb.DestroyClusterAutoscalerRequest) (*pb.DestroyClusterAutoscalerResponse, error)
- func (u *Usecases) PatchClusterInfoConfigMap(request *pb.PatchClusterInfoConfigMapRequest) (*pb.PatchClusterInfoConfigMapResponse, error)
- func (u *Usecases) PatchKubeProxyConfigMap(ctx context.Context, request *pb.PatchKubeProxyConfigMapRequest) (*pb.PatchKubeProxyConfigMapResponse, error)
- func (u *Usecases) PatchNodes(ctx context.Context, request *pb.PatchNodesRequest) (*pb.PatchNodesResponse, error)
- func (u *Usecases) RemoveLBScrapeConfig(ctx context.Context, request *pb.RemoveLBScrapeConfigRequest) (*pb.RemoveLBScrapeConfigResponse, error)
- func (u *Usecases) SetUpClusterAutoscaler(ctx context.Context, request *pb.SetUpClusterAutoscalerRequest) (*pb.SetUpClusterAutoscalerResponse, error)
- func (u *Usecases) SetUpStorage(ctx context.Context, request *pb.SetUpStorageRequest) (*pb.SetUpStorageResponse, error)
- func (u *Usecases) StoreClusterMetadata(ctx context.Context, request *pb.StoreClusterMetadataRequest) (*pb.StoreClusterMetadataResponse, error)
- func (u *Usecases) StoreKubeconfig(ctx context.Context, request *pb.StoreKubeconfigRequest) (*pb.StoreKubeconfigResponse, error)
- func (u *Usecases) StoreLBScrapeConfig(ctx context.Context, req *pb.StoreLBScrapeConfigRequest) (*pb.StoreLBScrapeConfigResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterMetadata ¶
type ClusterMetadata struct { // DynamicNodepools contains metadata for dynamic nodepools. DynamicNodepools DynamicNodepool `json:"dynamic_nodepools"` // PrivateKey is the private SSH key for the dynamic nodes. PrivateKey string `json:"cluster_private_key"` // StaticNodepools contains metadata for static nodepools. StaticNodepools StaticNodepool `json:"static_nodepools"` // DynamicLoadBalancerNodePools contain metadata for dynamic lb nodepools. DynamicLoadBalancerNodePools map[string]DynamicLoadBalancerNodePools `json:"dynamic_load_balancer_nodepools"` // StaticLoadBalancerNodePools contain metadata for static lb nodepools. StaticLoadBalancerNodePools map[string]StaticLoadBalancerNodePools `json:"static_load_balancer_nodepools"` }
ClusterMetadata contains metadata for the whole cluster. This metadata will be exported as a secret in management cluster.
type DynamicLoadBalancerNodePools ¶ added in v0.7.1
type DynamicNodepool ¶
type DynamicNodepool struct { // NodeIps maps node-name to public-private ip pairs for dynamic node pools. NodeIps map[string]IPPair `json:"node_ips"` }
DynamicNodepool contains map of node names and their IP pair.
type IPPair ¶
type IPPair struct { // PublicIP describes public IP. PublicIP net.IP `json:"public_ip"` // PrivateIP describes private IP. PrivateIP net.IP `json:"private_ip"` }
IPPair contains pair of public and private IP for a single node.
type StaticLoadBalancerNodePools ¶ added in v0.7.1
type StaticLoadBalancerNodePools struct { // NodeIps maps node-name to endpoint-key pairs for static node pools. NodeInfo map[string]StaticNodeInfo `json:"node_info"` }
StaticLoadBalancerNodePools contains map of LB node names and their static metadata
type StaticNodeInfo ¶
type StaticNodeInfo struct { // Endpoint is an endpoint for static nodes in the static node pool. Endpoint string `json:"endpoint"` // PrivateKey is the private SSH key for the node. PrivateKey string `json:"node_private_key"` }
StaticNodeInfo contains metadata info about static node.
type StaticNodepool ¶
type StaticNodepool struct { // NodeIps maps node-name to endpoint-key pairs for static node pools. NodeInfo map[string]StaticNodeInfo `json:"node_info"` }
StaticNodepool contains map of node names and their static metadata.
type Usecases ¶
type Usecases struct{}
func (*Usecases) CiliumRolloutRestart ¶ added in v0.5.0
func (u *Usecases) CiliumRolloutRestart(request *pb.CiliumRolloutRestartRequest) (*pb.CiliumRolloutRestartResponse, error)
func (*Usecases) DeleteClusterMetadata ¶
func (u *Usecases) DeleteClusterMetadata(ctx context.Context, request *pb.DeleteClusterMetadataRequest) (*pb.DeleteClusterMetadataResponse, error)
DeleteClusterMetadata deletes the K8s secret (from the management cluster) containing cluster metadata for the given K8s cluster.
func (*Usecases) DeleteKubeconfig ¶
func (u *Usecases) DeleteKubeconfig(ctx context.Context, request *pb.DeleteKubeconfigRequest) (*pb.DeleteKubeconfigResponse, error)
DeleteKubeconfig deletes the K8s secret (in the management cluster) containing kubeconfig for the given K8s cluster.
func (*Usecases) DeleteNodes ¶
func (u *Usecases) DeleteNodes(ctx context.Context, request *pb.DeleteNodesRequest) (*pb.DeleteNodesResponse, error)
DeleteNodes gracefully removes nodes from specified cluster.
func (*Usecases) DestroyClusterAutoscaler ¶
func (u *Usecases) DestroyClusterAutoscaler(ctx context.Context, request *pb.DestroyClusterAutoscalerRequest) (*pb.DestroyClusterAutoscalerResponse, error)
DestroyClusterAutoscaler removes deployment of Cluster Autoscaler from the management cluster for given k8s cluster.
func (*Usecases) PatchClusterInfoConfigMap ¶
func (u *Usecases) PatchClusterInfoConfigMap(request *pb.PatchClusterInfoConfigMapRequest) (*pb.PatchClusterInfoConfigMapResponse, error)
If the workflow happens correctly, the desired state for the K8s cluster (represented by request.DesiredCluster) has already been reached in the kube-eleven microservice. Inside the K8s cluster, in the kube-public namespace there is a configmap named 'cluster-info' which holds the kubeconfig for this cluster. Currently, that kubeconfig represents the older state of this cluster. PatchClusterInfoConfigMap updates that kubeconfig so that it represents the already reached desired state of the cluster.
func (*Usecases) PatchKubeProxyConfigMap ¶ added in v0.8.0
func (u *Usecases) PatchKubeProxyConfigMap(ctx context.Context, request *pb.PatchKubeProxyConfigMapRequest) (*pb.PatchKubeProxyConfigMapResponse, error)
func (*Usecases) PatchNodes ¶
func (u *Usecases) PatchNodes(ctx context.Context, request *pb.PatchNodesRequest) (*pb.PatchNodesResponse, error)
PatchNodes uses kube API patch to set correct metadata for nodes.
func (*Usecases) RemoveLBScrapeConfig ¶
func (u *Usecases) RemoveLBScrapeConfig(ctx context.Context, request *pb.RemoveLBScrapeConfigRequest) (*pb.RemoveLBScrapeConfigResponse, error)
RemoveLBScrapeConfig deletes the Kubernetes secret containing Prometheus scrape config related to the LB clusters attached to given K8s cluster.
func (*Usecases) SetUpClusterAutoscaler ¶
func (u *Usecases) SetUpClusterAutoscaler(ctx context.Context, request *pb.SetUpClusterAutoscalerRequest) (*pb.SetUpClusterAutoscalerResponse, error)
func (*Usecases) SetUpStorage ¶
func (u *Usecases) SetUpStorage(ctx context.Context, request *pb.SetUpStorageRequest) (*pb.SetUpStorageResponse, error)
SetUpStorage installs and configures Longhorn in the given K8s cluster. (Installation of Longhorn prerequisites has already been taken care in the ansibler microservice.)
func (*Usecases) StoreClusterMetadata ¶
func (u *Usecases) StoreClusterMetadata(ctx context.Context, request *pb.StoreClusterMetadataRequest) (*pb.StoreClusterMetadataResponse, error)
StoreClusterMetadata constructs ClusterMetadata for the given K8s cluster, creates a Kubernetes secret out of that and stores that secret in the Claudie management cluster.
func (*Usecases) StoreKubeconfig ¶
func (u *Usecases) StoreKubeconfig(ctx context.Context, request *pb.StoreKubeconfigRequest) (*pb.StoreKubeconfigResponse, error)
func (*Usecases) StoreLBScrapeConfig ¶
func (u *Usecases) StoreLBScrapeConfig(ctx context.Context, req *pb.StoreLBScrapeConfigRequest) (*pb.StoreLBScrapeConfigResponse, error)
Source Files ¶
- cilium_rollout_restart.go
- delete_cluster_metadata.go
- delete_kubeconfig.go
- delete_nodes.go
- destroy_cluster_autoscaler.go
- patch_cluster_info_configmap.go
- patch_kube_proxy.go
- patch_nodes.go
- remove_lb_scrape_config.go
- setup_cluster_autoscaler.go
- setup_storage.go
- store_cluster_metadata.go
- store_kubeconfig.go
- store_lb_scrape_config.go
- usecases.go