convert

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

package convert reads config from existing Calico installations that are not managed by Operator, and generates Operator Config that can be used to configure a similar cluster.

Index

Constants

View Source
const (
	ComponentCalicoNode      = "daemonset/calico-node"
	ComponentKubeControllers = "deployment/calico-kube-controllers"
	ComponentTypha           = "deployment/calico-typha"
	ComponentCNIConfig       = "cni-config"
	ComponentIPPools         = "ippools"
)

Variables

This section is empty.

Functions

func Convert

func Convert(ctx context.Context, client client.Client) (*operatorv1.Installation, error)

Convert updates an Installation resource based on an existing Calico install (i.e. one that is not managed by operator). If the existing installation cannot be represented by an Installation resource, an ErrIncompatibleCluster is returned.

func ErrIncompatibleAnnotation

func ErrIncompatibleAnnotation(annotations map[string]string, component string) error

func NeedsConversion

func NeedsConversion(ctx context.Context, client client.Client) (bool, error)

NeedsConversion checks if an existing installation of Calico exists which is not managed by the Operator.

Types

type CheckedDaemonSet

type CheckedDaemonSet struct {
	appsv1.DaemonSet
	// contains filtered or unexported fields
}

CheckedDaemonSet keeps track of which fields have been 'checked' by handlers. This is done so that at the end of the migration, any 'unchecked' fields can be reported and errored.

type ErrIncompatibleCluster

type ErrIncompatibleCluster struct {
	// contains filtered or unexported fields
}

ErrIncompatibleCluster indicates that a config option was detected in the existing install which Operator does not support.

func ErrMissingHostPathVolume

func ErrMissingHostPathVolume(component, volume, hostPath string) ErrIncompatibleCluster

func (ErrIncompatibleCluster) Error

func (e ErrIncompatibleCluster) Error() string

Directories

Path Synopsis
package numorstring is copied from libcalico-go so that we can convert felix env vars which map to felixconfiguration fields of type numorstring.
package numorstring is copied from libcalico-go so that we can convert felix env vars which map to felixconfiguration fields of type numorstring.

Jump to

Keyboard shortcuts

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