cni

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCiliumNotFound        = errors.New("could not find cilium preflight pod")
	ErrCiliumPodUnsuccessful = errors.New("cilium preflight pod has unsuccessful state")
)

Functions

func CiliumSecretExists added in v1.1.0

func CiliumSecretExists(client clientset.Interface) (bool, error)

func CiliumUpdateConfigMap added in v1.1.0

func CiliumUpdateConfigMap(client clientset.Interface, ciliumVersion string) error

func CreateCiliumSecret

func CreateCiliumSecret(client clientset.Interface, ciliumVersion string) error

func CreateOrUpdateCiliumConfigMap

func CreateOrUpdateCiliumConfigMap(client clientset.Interface, ciliumVersion string) error

func MigrateEtcdToCrd added in v1.3.4

func MigrateEtcdToCrd(client clientset.Interface, config *rest.Config) error

MigrateEtcdToCrd performs the migration of Cilium internal data from etcd cluster to CRD during upgrade from Cilium 1.5 to Cilium 1.6. This step is not mandatory, without it, Cilium is going to regenerate data from scratch which might result in service downtimes. If the automated migration is not successful, the upgrade will be continued without migration and user will be warned about downtime of services.

func NeedsEtcdToCrdMigration added in v1.3.4

func NeedsEtcdToCrdMigration(client clientset.Interface, ciliumVersion string) (bool, error)

NeedsEtcdToCrdMigration checks if the migration from etcd to CRD is needed, which is the case when upgrading from Cilium 1.5 to Cilium 1.6. Decision depends on the old Cilium ConfigMap. If that config map exists and contains the etcd config, migration has to be done. If not, it means that we have a fresh deployment of Cilium 1.6 configured to use CRD and no migration is needed.

func RemoveEtcdConfig added in v1.3.4

func RemoveEtcdConfig(client clientset.Interface) error

RemoveEtcdConfig removes the etcd configuration from Cilium configmap and switched to CRD as the identity allocation backend. That function should be used after the migration from etcd to CRD is done.

Types

type EtcdConfig

type EtcdConfig struct {
	Endpoints []string `json:"endpoints"`
	CAFile    string   `json:"trusted-ca-file"`
	CertFile  string   `json:"cert-file"`
	KeyFile   string   `json:"key-file"`
}

type EtcdConfigLegacy added in v1.3.4

type EtcdConfigLegacy struct {
	Endpoints []string `json:"endpoints"`
	CAFile    string   `json:"ca-file"`
	CertFile  string   `json:"cert-file"`
	KeyFile   string   `json:"key-file"`
}

Jump to

Keyboard shortcuts

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