pkg

package
v1.0.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrRetainConfigMap

func CreateOrRetainConfigMap(ctx context.Context, runtimeclient client.Client, object *corev1.ConfigMap) error

func CreateOrUpdateClusterRole

func CreateOrUpdateClusterRole(ctx context.Context, runtimeclient client.Client, object *rbac.ClusterRole) error

func CreateOrUpdateClusterRoleBinding

func CreateOrUpdateClusterRoleBinding(ctx context.Context, runtimeclient client.Client, object *rbac.ClusterRoleBinding) error

func CreateOrUpdateDeployment

func CreateOrUpdateDeployment(ctx context.Context, runtimeclient client.Client, object *appsv1.Deployment) error

func CreateOrUpdateServiceAccount

func CreateOrUpdateServiceAccount(ctx context.Context, runtimeclient client.Client, object *corev1.ServiceAccount) error

func GetDNSIP

func GetDNSIP(svcSubnet string) (net.IP, error)

Types

type Dns

type Dns interface {
	Create(string, int, string, string, string) error
	Delete(string, string, string, string) error
}

type DnsDedploy

type DnsDedploy struct {
	context.Context
	client.Client
	Log logr.Logger

	MatrixClient client.Client
}

func (*DnsDedploy) Create

func (d *DnsDedploy) Create(dnsType string, replicas int, version string, imageRegistry string, imageRepo string) error

func (*DnsDedploy) Delete

func (d *DnsDedploy) Delete(dnsType string, imageRegistry string, imageRepo string, version string) error

type EctdDeploy

type EctdDeploy struct {
	context.Context
	client.Client
	Log logr.Logger
}

func (*EctdDeploy) CheckEtcdReady

func (e *EctdDeploy) CheckEtcdReady(etcdClusterName string, namespace string, replicas int) error

func (*EctdDeploy) CreateEtcdCerts

func (e *EctdDeploy) CreateEtcdCerts(etcdClusterName string, namespace string) error

func (*EctdDeploy) CreateEtcdStatefulSet

func (e *EctdDeploy) CreateEtcdStatefulSet(etcdClusterName string, namespace string, replicas int, image string, datadir string) error

func (*EctdDeploy) CreateService

func (e *EctdDeploy) CreateService(etcdClusterName string, namespace string) error

func (*EctdDeploy) DeleteEtcd

func (e *EctdDeploy) DeleteEtcd(etcdClusterName string, namespace string) error

type EtcdCluster

type EtcdCluster interface {
	CreateService(string, string) error
	CreateEtcdCerts(string, string) error
	CreateEtcdStatefulSet(string, string, int, string, string) error
	CheckEtcdReady(string, string, int) error
	DeleteEtcd(string, string) error
}

type Master

type Master interface {
	CreateService(string, string) error
	CreateCerts(string, string) error
	CreateKubeconfig(string, string) error
	CreateDeployment(string, string, string, int, string, *crdv1.ImageRepo, string) error
	MasterInit(string, string, *crdv1.ImageRepo) error
	CheckMasterRunning(string, string) error
	DeleteMaster(string, string) error
}

type MasterDedploy

type MasterDedploy struct {
	context.Context
	client.Client
	Log       logr.Logger
	MasterCrd *crdv1.Master

	CaCert          *x509.Certificate
	CaKey           *rsa.PrivateKey
	AdminKubeconfig []byte
	MatrixClient    client.Client

	ExposePort string
}

func (*MasterDedploy) CheckMasterRunning

func (m *MasterDedploy) CheckMasterRunning(name string, namespace string) error

func (*MasterDedploy) CreateCerts

func (m *MasterDedploy) CreateCerts(name string, namespace string, exposeIps []string) error

func (*MasterDedploy) CreateDeployment

func (m *MasterDedploy) CreateDeployment(name string, namespace string, version string, replicas int, imageRegistry string, imageRepo *crdv1.ImageRepo, etcdClusterName string) error

func (*MasterDedploy) CreateKubeconfig

func (m *MasterDedploy) CreateKubeconfig(name string, namespace string) error

func (*MasterDedploy) CreateService

func (m *MasterDedploy) CreateService(name string, namespace string) error

func (*MasterDedploy) DeleteMaster

func (m *MasterDedploy) DeleteMaster(name string, namespace string) error

func (*MasterDedploy) MasterInit

func (m *MasterDedploy) MasterInit(version string, imageRegistry string, imageRepo *crdv1.ImageRepo, name string) error

type Matrix

type Matrix interface {
	Create(string, string, *crdv1.MatrixSpec) error
	Delete(string, string) error
	Update(string, string, *crdv1.Matrix) error
}

type MatrixDedploy

type MatrixDedploy struct {
	context.Context
	client.Client
	Log logr.Logger
}

func (*MatrixDedploy) Create

func (m *MatrixDedploy) Create(name string, namespace string, matrixConfig *crdv1.MatrixSpec) error

func (*MatrixDedploy) Delete

func (m *MatrixDedploy) Delete(name string, namespace string) error

func (*MatrixDedploy) Update

func (m *MatrixDedploy) Update(name string, namespace string, matrix *crdv1.Matrix) error

type NetworkPlugin

type NetworkPlugin interface {
	CreateCalico(calicoConfig *crdv1.CalicoConfig) error
	DeleteCalico(calicoConfig *crdv1.CalicoConfig) error
}

type NetworkPluginDedploy

type NetworkPluginDedploy struct {
	context.Context
	client.Client
	Log          logr.Logger
	MatrixClient client.Client
	CrdClient    *crdclient.Clientset
}

func (*NetworkPluginDedploy) CreateCalico

func (n *NetworkPluginDedploy) CreateCalico(calicoConfig *crdv1.CalicoConfig) error

func (*NetworkPluginDedploy) DeleteCalico

func (n *NetworkPluginDedploy) DeleteCalico(calicoConfig *crdv1.CalicoConfig) error

Jump to

Keyboard shortcuts

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