component

package
v0.0.0-...-58bfa04 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package component contains functions for creating the Kubernetes resources that are required by this controller.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignServicePort

func AssignServicePort(extant []v1.Service, minPort, maxPort int32) int32

AssignServicePort walks the existing service definitions and assigns the first available port with the specified inclusive range, or -1 if the range is fully populated.

func ExtractExistingLoadbalancerIP

func ExtractExistingLoadbalancerIP(extant []v1.Service) (string, error)

ExtractExistingLoadbalancerIP searches the passed slice of Services for existing loadbalancers and returns an IP address of those loadbalancers. If the Service slice is empty, returns empty string and no error. If there are Services of type LoadBalancer but they do not (yet?) have IP addresses assigned, return an error to indicate that this should be aborted and tried again later.

func GenerateConfigMap

func GenerateConfigMap(mc v1alpha1.Minecraft) v1.ConfigMap

GenerateConfigMap creates a configmap from a Minecraft server config struct

func GenerateDeployment

func GenerateDeployment(mc v1alpha1.Minecraft) (appsv1.Deployment, error)

GenerateDeployment creates a Minecraft server deployment

func GeneratePVC

func GeneratePVC(mc v1alpha1.Minecraft) (v1.PersistentVolumeClaim, error)

GeneratePVC creates a PVC for the Minecraft server

func GenerateService

func GenerateService(mc v1alpha1.Minecraft) v1.Service

GenerateService creates a Service for the Minecraft server.

func IndexConfigMap

func IndexConfigMap(o runtime.Object) []string

IndexConfigMap indexer func for controller-runtime

func IndexDeployment

func IndexDeployment(o runtime.Object) []string

IndexDeployment indexer func for controller-runtime

func IndexPVC

func IndexPVC(o runtime.Object) []string

IndexPVC indexer func for controller-runtime

func IndexService

func IndexService(o runtime.Object) []string

IndexService owner indexer func for controller-runtime.

func NeedsUpdateConfigMap

func NeedsUpdateConfigMap(want, have v1.ConfigMap) bool

NeedsUpdateConfigMap returns if the passed Services are out of sync

func NeedsUpdateDeployment

func NeedsUpdateDeployment(want, have appsv1.Deployment) bool

NeedsUpdateDeployment returns if the passed Services are out of sync

Types

This section is empty.

Jump to

Keyboard shortcuts

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