Documentation
¶
Index ¶
- Constants
- type AllocRequest
- type AllocResponse
- type Config
- type ControlPlaneResponse
- type DeallocRequest
- type EndpointResponse
- type NetworkResponse
- type Operator
- func (o *Operator) Alloc(ctx context.Context, idempotencyKey string, req AllocRequest) (AllocResponse, int, error)
- func (o *Operator) Dealloc(ctx context.Context, idempotencyKey string) (int, error)
- func (o *Operator) EnsureTLSSecret(ctx context.Context) (tls.Certificate, error)
- func (o *Operator) Handler() http.Handler
- func (o *Operator) ReconcileRunners(ctx context.Context) error
- func (o *Operator) Run(ctx context.Context) error
- type PodResponse
- type VXLANResponse
- type WireGuardResponse
Constants ¶
View Source
const ( AnnotationClientWireGuardPublicKey = meta.AnnotationClientWireGuardPublicKey AnnotationServerWireGuardPublicKey = meta.AnnotationServerWireGuardPublicKey AnnotationRedfishCertPEM = meta.AnnotationRedfishCertPEM AnnotationIdempotencyKeyHash = meta.AnnotationIdempotencyKeyHash AnnotationRequestHash = meta.AnnotationRequestHash AnnotationClaimedAt = meta.AnnotationClaimedAt AnnotationControlPlaneKubeconfig = meta.AnnotationControlPlaneKubeconfig AnnotationControlPlaneGuestServer = meta.AnnotationControlPlaneGuestServer LabelAllocated = meta.LabelAllocated LabelArchitecture = meta.LabelArchitecture LabelResourceType = meta.LabelResourceType LabelKubernetesVersion = meta.LabelKubernetesVersion ArchitectureAMD64 = meta.ArchitectureAMD64 ArchitectureARM64 = meta.ArchitectureARM64 ResourceTypeRunner = meta.ResourceTypeRunner ResourceTypeControlPlane = meta.ResourceTypeControlPlane )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocRequest ¶
type AllocRequest struct {
IdempotencyKey string `json:"idempotencyKey,omitempty"`
ResourceType string `json:"resourceType,omitempty"`
KubernetesVersion string `json:"kubernetesVersion,omitempty"`
WireGuardPublicKey string `json:"wireGuardPublicKey,omitempty"`
Architecture string `json:"architecture,omitempty"`
}
type AllocResponse ¶
type AllocResponse struct {
ResourceType string `json:"resourceType"`
Pod PodResponse `json:"pod"`
Endpoint EndpointResponse `json:"endpoint"`
WireGuard WireGuardResponse `json:"wireGuard"`
VXLAN VXLANResponse `json:"vxlan"`
Network NetworkResponse `json:"network"`
Redfish map[string]string `json:"redfish"`
ControlPlane ControlPlaneResponse `json:"controlPlane,omitempty"`
}
type Config ¶
type Config struct {
ListenAddr string
Namespace string
ServiceName string
TLSSecretName string
RunnerNamespace string
RunnerLabelSelector string
RunnerImage string
RunnerImagePullPolicy string
RunnerServiceAccountName string
RunnerAMD64Count int
RunnerARM64Count int
RunnerWireGuardHostPortStart int32
RunnerWireGuardHostPortEnd int32
RunnerRequireKVM bool
RunnerControlPlaneToleration bool
ControlPlaneCount int
ControlPlaneVersions []string
ControlPlaneImage string
ControlPlaneServiceAccountName string
ControlPlaneAPIServerHostPortStart int32
ControlPlaneAPIServerHostPortEnd int32
PlaypenTTL time.Duration
ReconcileInterval time.Duration
Runner runner.Config
}
func DefaultConfig ¶
func DefaultConfig() Config
type ControlPlaneResponse ¶
type DeallocRequest ¶
type DeallocRequest struct {
IdempotencyKey string `json:"idempotencyKey,omitempty"`
}
type EndpointResponse ¶
type NetworkResponse ¶
type Operator ¶
type Operator struct {
Client client.Client
KubeClient kubernetes.Interface
APIRegClient apiregclient.Interface
Config Config
Scheme *runtime.Scheme
// contains filtered or unexported fields
}
func (*Operator) Alloc ¶
func (o *Operator) Alloc(ctx context.Context, idempotencyKey string, req AllocRequest) (AllocResponse, int, error)
func (*Operator) EnsureTLSSecret ¶
type PodResponse ¶
type PodResponse struct {
Namespace string `json:"namespace"`
Name string `json:"name"`
NodeName string `json:"nodeName"`
NodePublicIP string `json:"nodePublicIP"`
ResourceType string `json:"resourceType"`
Architecture string `json:"architecture"`
KubernetesVersion string `json:"kubernetesVersion,omitempty"`
}
type VXLANResponse ¶
Click to show internal directories.
Click to hide internal directories.