utils

package
v1.23.5 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: Apache-2.0 Imports: 8 Imported by: 8

Documentation

Index

Constants

View Source
const (
	// CDILabel is the labe applied to all non operator resources
	CDILabel = "cdi.kubevirt.io"
)

Variables

This section is empty.

Functions

func CreateContainer

func CreateContainer(name, image, verbosity string, pullPolicy corev1.PullPolicy) corev1.Container

CreateContainer creates container

func CreateDeployment

func CreateDeployment(name, matchKey, matchValue, serviceAccount string, numReplicas int32, infraNodePlacement *cdiv1.NodePlacement) *appsv1.Deployment

CreateDeployment creates deployment

func CreateOperatorDeployment

func CreateOperatorDeployment(name, namespace, matchKey, matchValue, serviceAccount string, numReplicas int32) *appsv1.Deployment

CreateOperatorDeployment creates deployment

func CreateOperatorDeploymentSpec

func CreateOperatorDeploymentSpec(name, matchKey, matchValue, serviceAccount string, numReplicas int32) *appsv1.DeploymentSpec

CreateOperatorDeploymentSpec creates deployment

func CreateOperatorServiceAccount added in v1.12.0

func CreateOperatorServiceAccount(name, namespace string) *corev1.ServiceAccount

CreateOperatorServiceAccount creates service account

func CreatePortsContainer

func CreatePortsContainer(name, image, verbosity string, pullPolicy corev1.PullPolicy, ports *[]corev1.ContainerPort) corev1.Container

CreatePortsContainer creates container

func CreateRole

func CreateRole(name string) *rbacv1.Role

CreateRole creates role

func CreateRoleBinding

func CreateRoleBinding(name, roleRef, serviceAccount, serviceAccountNamespace string) *rbacv1.RoleBinding

CreateRoleBinding creates role binding

func CreateService

func CreateService(name, matchKey, matchValue string) *corev1.Service

CreateService creates service

func CreateServiceAccount

func CreateServiceAccount(name string) *corev1.ServiceAccount

CreateServiceAccount creates service account

func GetCdiToplevel added in v1.23.0

func GetCdiToplevel() string

GetCdiToplevel returns the top level source directory of CDI. Can be overridden using the environment variable "CDI_DIR".

func ValidateGVKs added in v1.10.3

func ValidateGVKs(objects []runtime.Object)

ValidateGVKs makes sure all resources have initialized GVKs

func WithCommonLabels

func WithCommonLabels(labels map[string]string) map[string]string

WithCommonLabels aggregates common lables

func WithOperatorLabels

func WithOperatorLabels(labels map[string]string) map[string]string

WithOperatorLabels aggregates common lables

Types

This section is empty.

Jump to

Keyboard shortcuts

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