controllers

package
v0.0.0-...-b4e5a94 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//DefaultServiceNetworkCIDR is the default service cidr used by kubernetes as of v1.15
	DefaultServiceNetworkCIDR string = "10.0.0.0/24"
)

Variables

View Source
var (
	//ManifestPath is the path to templates directory
	ManifestPath = "./bindata"
)

Functions

func ValidateK8SClusterConfig

func ValidateK8SClusterConfig(c *operv1.ClusterNetworkConfigDefinition) error

ValidateK8SClusterConfig validates the cluster config for k8s

func ValidateOSEClusterConfig

func ValidateOSEClusterConfig(clusterConfig configv1.NetworkSpec) error

ValidateOSEClusterConfig ensures the cluster config is valid.

Types

type NuageCNIConfigReconciler

type NuageCNIConfigReconciler struct {
	ClusterServiceNetworkCIDR string
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

NuageCNIConfigReconciler reconciles a NuageCNIConfig object

func (*NuageCNIConfigReconciler) ApplyObject

ApplyObject creates if it does not exist or updates it if it exists

func (*NuageCNIConfigReconciler) CreateConfigMap

func (r *NuageCNIConfigReconciler) CreateConfigMap(nsn types.NamespacedName, data string) error

CreateConfigMap creates a config map on api server

func (*NuageCNIConfigReconciler) DeleteResource

func (r *NuageCNIConfigReconciler) DeleteResource(nsn types.NamespacedName, obj runtime.Object) error

DeleteResource deletes object and pods if the resource exists

func (*NuageCNIConfigReconciler) ExtractSecretToken

func (r *NuageCNIConfigReconciler) ExtractSecretToken(s *corev1.Secret) ([]byte, error)

ExtractSecretToken extract the token from the secret

func (*NuageCNIConfigReconciler) GetClusterNetworkInfo

GetClusterNetworkInfo fetches the cluster network configuration from API server

func (*NuageCNIConfigReconciler) GetConfigFromServer

func (r *NuageCNIConfigReconciler) GetConfigFromServer(nsn types.NamespacedName, c interface{}) error

GetConfigFromServer fetches the stored config from server

func (*NuageCNIConfigReconciler) GetConfigMap

GetConfigMap get a config map from api server

func (*NuageCNIConfigReconciler) GetK8SClusterNetworkInfo

func (r *NuageCNIConfigReconciler) GetK8SClusterNetworkInfo() (*operv1.ClusterNetworkConfigDefinition, error)

GetK8SClusterNetworkInfo fetches service cidr from k8s api server

func (*NuageCNIConfigReconciler) GetOSEClusterNetworkInfo

func (r *NuageCNIConfigReconciler) GetOSEClusterNetworkInfo() (*operv1.ClusterNetworkConfigDefinition, error)

GetOSEClusterNetworkInfo fetches network config from api server

func (*NuageCNIConfigReconciler) GetSecret

func (r *NuageCNIConfigReconciler) GetSecret(saname, namespace string) (*corev1.Secret, error)

GetSecret fetches secret from api server

func (*NuageCNIConfigReconciler) LabelMasterNodes

func (r *NuageCNIConfigReconciler) LabelMasterNodes() error

LabelMasterNodes labels master nodes with nodeSelector if not already present

func (*NuageCNIConfigReconciler) ListMasterNodes

func (r *NuageCNIConfigReconciler) ListMasterNodes() ([]corev1.Node, error)

ListMasterNodes fetches the list of master nodes

func (*NuageCNIConfigReconciler) ListNodes

func (r *NuageCNIConfigReconciler) ListNodes(listOptions metav1.ListOptions) ([]corev1.Node, error)

ListNodes fetches the list of nodes from api server that matches listOptions

func (*NuageCNIConfigReconciler) Reconcile

func (r *NuageCNIConfigReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*NuageCNIConfigReconciler) SaveConfigToServer

func (r *NuageCNIConfigReconciler) SaveConfigToServer(nsn types.NamespacedName, c interface{}) error

SaveConfigToServer stores the applied release config in api server

func (*NuageCNIConfigReconciler) SetupWithManager

func (r *NuageCNIConfigReconciler) SetupWithManager(mgr ctrl.Manager) error

func (*NuageCNIConfigReconciler) UpdateClusterNetworkStatus

func (r *NuageCNIConfigReconciler) UpdateClusterNetworkStatus(c *operv1.ClusterNetworkConfigDefinition) error

UpdateClusterNetworkStatus updates config.openshift.io/v1 status object

func (*NuageCNIConfigReconciler) UpdateDaemonsetpods

func (r *NuageCNIConfigReconciler) UpdateDaemonsetpods(nsn types.NamespacedName) error

DeleteResource deletes object and pods if the resource exists

type OrchestratorType

type OrchestratorType string

OrchestratorType is for orchestrator type(k8s or ose)

const (
	//OrchestratorKubernetes if platform is Kubernetes
	OrchestratorKubernetes OrchestratorType = "k8s"
	//OrchestratorOpenShift if platform is OpenShift
	OrchestratorOpenShift OrchestratorType = "ose"
	//OrchestratorNone if platform could not be determined
	OrchestratorNone OrchestratorType = "none"
)

Directories

Path Synopsis
network
cni
vrs
util
ip

Jump to

Keyboard shortcuts

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