controllers

package
v0.0.0-...-8fb1b71 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Copyright 2019 Orange

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and

limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewController

func NewController(clusters Clusters, namespace string) (*controller.Controller, error)

NewController will create k8s clients for each k8s clusters, and watch for changes to MultiCasskop and CassandraCluster CRD objects

func UnsetRollingRestart

func UnsetRollingRestart(storedCC *ccv1.CassandraCluster)

Types

type Client

type Client struct {
	Name   string
	Client client.Client
}

Client is the k8s client to use to connect to each kubernetes

type Clients

type Clients struct {
	Local   *Client
	Remotes []*Client
}

Clients defined each client (local & remotes) to access to k8s cluster.

func (*Clients) FlatClients

func (clients *Clients) FlatClients() []*Client

Convert local & remotes clients to a merged list. Simplify loop on clients

type Cluster

type Cluster struct {
	Name    string
	Cluster *cluster.Cluster
}

Cluster defines k8s cluster information we need.

func (*Cluster) SetUpClient

func (cluster *Cluster) SetUpClient() (*client.DelegatingClient, error)

Apply to a cluster, it will proceed to the client setup :

  • Get delegating client
  • Add to scheme : CassandraCluster & CassandraMultiCluster

type Clusters

type Clusters struct {
	Local   *Cluster
	Remotes []*Cluster
}

Clusters defines each kubernetes cluster we want to connect on it.

func (*Clusters) SetUpClients

func (clusters *Clusters) SetUpClients() (*Clients, error)

Apply to a clusters struct, it will proceed to client set up associated to each k8s cluster.

Jump to

Keyboard shortcuts

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