controllers

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TODO: move this annotation to the API part of baremetalpool.
	BmpDisabledAnnotation = "baremetalpool.kanod.io/disabled"
	Info                  = 0
	Debug                 = 1
)
View Source
const (

	// PausedAnnotation is the annotation that pauses the reconciliation
	PausedAnnotation string = "netpool.network.kanod.io/paused"
)

Variables

This section is empty.

Functions

func GetClient

func GetClient(
	kubeconfig *rest.Config,
) (*rest.RESTClient, error)

Types

type BareMetalPoolReconciler added in v0.1.0

type BareMetalPoolReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

BareMetalPoolReconciler reconciles a BareMetalPool object

func (*BareMetalPoolReconciler) Reconcile added in v0.1.0

func (r *BareMetalPoolReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the BareMetalPool 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.12.2/pkg/reconcile

func (*BareMetalPoolReconciler) SetupWithManager added in v0.1.0

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

SetupWithManager sets up the controller with the Manager.

type DhcpServerIpRequest added in v0.0.9

type DhcpServerIpRequest struct {
	DhcpServerIp string `json:"dhcpServerIp"`
}

type ErrorCode

type ErrorCode int
const (
	NO_ERROR ErrorCode = iota
	OTHER_ERROR
	CHECK_CERTIFICATE_ERROR
)

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

type ErrorResponseNetdef

type ErrorResponseNetdef struct {
	Code    ErrorCode `json:"code"`
	Message string    `json:"message"`
}

type GetChallengeRequest

type GetChallengeRequest struct {
	Poolname string `json:"poolname"`
}

type GetChallengeResponse

type GetChallengeResponse struct {
	Challenge string `json:"challenge"`
}

type GetPoolListResponse

type GetPoolListResponse struct {
	Poollist []PoolBinding `json:"poollist"`
}

type NetworkData

type NetworkData struct {
	NetDefPool map[string]PoolSignature
}
var (
	NETWORKDATA NetworkData = NetworkData{
		NetDefPool: make(map[string]PoolSignature),
	}

	Mutex sync.Mutex
)

type NetworkReconciler

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

NetworkReconciler reconciles a Network object

func (*NetworkReconciler) NewHttpClient added in v0.0.6

func (r *NetworkReconciler) NewHttpClient(Certificate string) *http.Client

func (*NetworkReconciler) Reconcile

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

func (*NetworkReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*NetworkReconciler) WithHttpsClient added in v0.1.3

func (r *NetworkReconciler) WithHttpsClient(Certificate string) broker.ClientOption

type PoolBinding added in v0.0.7

type PoolBinding struct {
	PoolName    string `json:"poolName"`
	BindingName string `json:"bindingName"`
}

type PoolRequest

type PoolRequest struct {
	Poolname    string `json:"poolname"`
	BindingName string `json:"bindingName"`
	Signature   string `json:"signature"`
}

type PoolSignature

type PoolSignature struct {
	PoolSign map[string]string
}

type SignChallengeRequest

type SignChallengeRequest struct {
	Challenge string `json:"challenge"`
}

type SignChallengeResponse

type SignChallengeResponse struct {
	Challenge       string `json:"challenge"`
	SignedChallenge string `json:"signedchallenge"`
}

Jump to

Keyboard shortcuts

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