Documentation ¶
Overview ¶
Package component contains functions for creating the Kubernetes resources that are required by this controller.
Index ¶
- func AssignServicePort(extant []v1.Service, minPort, maxPort int32) int32
- func ExtractExistingLoadbalancerIP(extant []v1.Service) (string, error)
- func GenerateConfigMap(mc v1alpha1.Minecraft) v1.ConfigMap
- func GenerateDeployment(mc v1alpha1.Minecraft) (appsv1.Deployment, error)
- func GeneratePVC(mc v1alpha1.Minecraft) (v1.PersistentVolumeClaim, error)
- func GenerateService(mc v1alpha1.Minecraft) v1.Service
- func IndexConfigMap(o runtime.Object) []string
- func IndexDeployment(o runtime.Object) []string
- func IndexPVC(o runtime.Object) []string
- func IndexService(o runtime.Object) []string
- func NeedsUpdateConfigMap(want, have v1.ConfigMap) bool
- func NeedsUpdateDeployment(want, have appsv1.Deployment) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignServicePort ¶
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 ¶
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 ¶
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 ¶
GenerateService creates a Service for the Minecraft server.
func IndexConfigMap ¶
IndexConfigMap indexer func for controller-runtime
func IndexDeployment ¶
IndexDeployment indexer func for controller-runtime
func IndexService ¶
IndexService owner indexer func for controller-runtime.
func NeedsUpdateConfigMap ¶
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.