controllers

package
v0.3.29 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CURRENT_NAMESPACE string = "ixiatg-op-system"
	SECRET_NAME       string = "ixia-pull-secret"

	LIC_SERVER_SECRET string = "license-server"
	LIC_ENV_VAR       string = "LICENSE_SERVERS"

	SERVER_URL        string = "https://github.com/open-traffic-generator/ixia-c/releases/download/v"
	SERVER_LATEST_URL string = "https://github.com/open-traffic-generator/ixia-c/releases/latest/download"
	RELEASE_FILE      string = "/ixiatg-configmap.yaml"

	CONTROLLER_NAME string = "ixia-c"
	GRPC_NAME       string = "grpc"
	GNMI_NAME       string = "gnmi"
	LICENSE_NAME    string = "license-server"

	CONFIG_MAP_NAME      string = "ixiatg-release-config"
	CONFIG_MAP_NAMESPACE string = "ixiatg-op-system"
	DEFAULT_VERSION      string = "latest"
	DEFAULT_INTF         string = "eth1"

	DS_RESTAPI         string = "Rest API"
	DS_CONFIGMAP       string = "Config Map"
	CONTROLLER_SERVICE string = "ixia-c-service"
	GRPC_SERVICE       string = "grpc-service"
	GNMI_SERVICE       string = "gnmi-service"

	PORT_NAME_INFIX       string = "-port-"
	PORT_GROUP_NAME_INFIX string = "-port-group-"
	CTRL_POD_NAME_SUFFIX  string = "-controller"
	INIT_CONT_NAME_PREFIX string = "init-"

	CTRL_CFG_MAP_NAME   string = "controller-config"
	CTRL_MAP_VOL_NAME   string = "config"
	CTRL_MAP_FILE_NAME  string = "config.yaml"
	CTRL_MAP_MOUNT_PATH string = "/home/ixia-c/controller/config"

	SERVICE_NAME_SUFFIX string = ".svc.cluster.local"

	CTRL_HTTPS_PORT   int32 = 8443
	CTRL_GNMI_PORT    int32 = 50051
	CTRL_GRPC_PORT    int32 = 40051
	CTRL_LICENSE_PORT int32 = 7443
	PROTOCOL_ENG_PORT int32 = 50071
	TRAFFIC_ENG_PORT  int32 = 5555

	STATE_INITED   string = "INITIATED"
	STATE_DEPLOYED string = "DEPLOYED"
	STATE_FAILED   string = "FAILED"

	IMAGE_CONTROLLER     string = "controller"
	IMAGE_GNMI_SERVER    string = "gnmi-server"
	IMAGE_GRPC_SERVER    string = "grpc-server"
	IMAGE_LICENSE_SERVER string = "license-server"
	IMAGE_LICENSE_SECRET string = "license-server-default"
	IMAGE_TRAFFIC_ENG    string = "traffic-engine"
	IMAGE_PROTOCOL_ENG   string = "protocol-engine"

	TERMINATION_TIMEOUT_SEC int64 = 5

	HTTP_TIMEOUT_SEC time.Duration = 5

	GNMI_NEW_BASE_VERSION string = "1.7.9"
	IXIA_C_OTG_VERSION    string = "0.0.1-2727"
	IXIA_C_GRPC_VERSION   string = "0.0.1-3114"

	LIVENESS_DELAY   int32 = 1
	LIVENESS_PERIOD  int32 = 10
	LIVENESS_FAILURE int32 = 6

	STARTUP_PERIOD  int32 = 3
	STARTUP_FAILURE int32 = 20

	MIN_MEM_CONTROLLER string = "25Mi"
	MIN_MEM_GNMI       string = "15Mi"
	MIN_CPU_PROTOCOL   string = "200m"
	MIN_CPU_TRAFFIC    string = "200m"
	MIN_CPU_CONTROLLER string = "10m"
	MIN_CPU_GNMI       string = "10m"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IxiaTGReconciler

type IxiaTGReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

IxiaTGReconciler reconciles a IxiaTG object

func (*IxiaTGReconciler) DeleteSecrets

func (r *IxiaTGReconciler) DeleteSecrets(ctx context.Context, namespace string) error

func (*IxiaTGReconciler) GetSecret

func (r *IxiaTGReconciler) GetSecret(ctx context.Context, name string, namespace string) (*corev1.Secret, error)

func (*IxiaTGReconciler) Reconcile

func (r *IxiaTGReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. Modify the Reconcile function to compare the state specified by the IxiaTG object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile

func (*IxiaTGReconciler) ReconcileSecrets

func (r *IxiaTGReconciler) ReconcileSecrets(ctx context.Context,
	req ctrl.Request, ixia *networkv1beta1.IxiaTG) error

func (*IxiaTGReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type Node

type Node struct {
	Name       string
	Containers map[string]componentRel
}

Jump to

Keyboard shortcuts

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