components

package
v0.30.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

* This file is part of the KubeVirt project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Copyright 2020 Red Hat, Inc. *

* This file is part of the KubeVirt project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Copyright 2018 Red Hat, Inc. *

* This file is part of the KubeVirt project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Copyright 2018 Red Hat, Inc. *

* This file is part of the KubeVirt project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Copyright 2019 Red Hat, Inc. *

Index

Constants

View Source
const (
	KubeVirtCASecretName            = "kubevirt-ca"
	VirtHandlerCertSecretName       = "kubevirt-virt-handler-certs"
	VirtHandlerServerCertSecretName = "kubevirt-virt-handler-server-certs"
	VirtOperatorCertSecretName      = "kubevirt-operator-certs"
	VirtApiCertSecretName           = "kubevirt-virt-api-certs"
	VirtControllerCertSecretName    = "kubevirt-controller-certs"
	CABundleKey                     = "ca-bundle"
)
View Source
const (
	KUBEVIRT_PROMETHEUS_RULE_NAME = "prometheus-kubevirt-rules"
)
View Source
const KubeVirtOperatorValidatingWebhookName = "virt-operator-validator"
View Source
const KubevirtOperatorWebhookServiceName = "kubevirt-operator-webhook"
View Source
const MigrationCreateValidatePath = "/migration-validate-create"
View Source
const MigrationMutatePath = "/migration-mutate-create"
View Source
const MigrationUpdateValidatePath = "/migration-validate-update"
View Source
const VMICreateValidatePath = "/virtualmachineinstances-validate-create"
View Source
const VMIMutatePath = "/virtualmachineinstances-mutate"
View Source
const VMIPresetValidatePath = "/vmipreset-validate"
View Source
const VMIRSValidatePath = "/virtualmachinereplicaset-validate"
View Source
const VMIUpdateValidatePath = "/virtualmachineinstances-validate-update"
View Source
const VMMutatePath = "/virtualmachines-mutate"
View Source
const VMValidatePath = "/virtualmachines-validate"
View Source
const VirtAPIMutatingWebhookName = "virt-api-mutator"
View Source
const VirtAPIValidatingWebhookName = "virt-api-validator"
View Source
const VirtApiServiceName = "virt-api"
View Source
const VirtControllerServiceName = "virt-controller"
View Source
const VirtHandlerServiceName = "virt-controller"
View Source
const VirtOperatorServiceName = "kubevirt-operator-webhook"

Variables

This section is empty.

Functions

func AddVersionSeparatorPrefix added in v0.20.0

func AddVersionSeparatorPrefix(version string) string

func GetAllSCC added in v0.20.0

func GetAllSCC(namespace string) []*secv1.SecurityContextConstraints

func LoadCertificates added in v0.29.0

func LoadCertificates(secret *k8sv1.Secret) (serverCrt *tls.Certificate, err error)

func MergeCABundle added in v0.29.0

func MergeCABundle(currentCert *tls.Certificate, currentBundle []byte, overlapDuration time.Duration) ([]byte, int, error)

func NewApiServerDeployment

func NewApiServerDeployment(namespace string, repository string, imagePrefix string, version string, pullPolicy corev1.PullPolicy, verbosity string, extraEnv map[string]string) (*appsv1.Deployment, error)

func NewApiServerService

func NewApiServerService(namespace string) *corev1.Service

func NewCACertSecret added in v0.29.0

func NewCACertSecret(operatorNamespace string) *k8sv1.Secret

func NewCertSecrets added in v0.29.0

func NewCertSecrets(installNamespace string, operatorNamespace string) []*k8sv1.Secret

func NewControllerDeployment

func NewControllerDeployment(namespace string, repository string, imagePrefix string, controllerVersion string, launcherVersion string, pullPolicy corev1.PullPolicy, verbosity string, extraEnv map[string]string) (*appsv1.Deployment, error)

func NewHandlerDaemonSet

func NewHandlerDaemonSet(namespace string, repository string, imagePrefix string, version string, launcherVersion string, pullPolicy corev1.PullPolicy, verbosity string, extraEnv map[string]string) (*appsv1.DaemonSet, error)

func NewKubeVirtCAConfigMap added in v0.29.0

func NewKubeVirtCAConfigMap(operatorNamespace string) *k8sv1.ConfigMap

func NewKubeVirtCR

func NewKubeVirtCR(namespace string, pullPolicy corev1.PullPolicy) *virtv1.KubeVirt

Used by manifest generation

func NewKubeVirtControllerSCC added in v0.20.0

func NewKubeVirtControllerSCC(namespace string) *secv1.SecurityContextConstraints

func NewKubeVirtCrd

func NewKubeVirtCrd() *extv1beta1.CustomResourceDefinition

Used by manifest generation If you change something here, you probably need to change the CSV manifest too, see /manifests/release/kubevirt.VERSION.csv.yaml.in

func NewKubeVirtHandlerSCC added in v0.20.0

func NewKubeVirtHandlerSCC(namespace string) *secv1.SecurityContextConstraints

func NewKubeVirtPriorityClassCR added in v0.29.0

func NewKubeVirtPriorityClassCR() *schedulingv1.PriorityClass

NewKubeVirtPriorityClassCR is used for manifest generation

func NewKubevirtConfigMap added in v0.29.0

func NewKubevirtConfigMap(namespace string) *corev1.ConfigMap

NewKubevirtConfigMap returns base config map

func NewNodeLabellerConfigMap added in v0.29.0

func NewNodeLabellerConfigMap(namespace string) *corev1.ConfigMap

NewNodeLabellerConfigMap returns configmap with configuration of obsolete cpus and minCPU for node labeller

func NewOperatorDeployment added in v0.16.0

func NewOperatorDeployment(namespace string, repository string, imagePrefix string, version string,
	pullPolicy corev1.PullPolicy, verbosity string,
	kubeVirtVersionEnv string, virtApiShaEnv string, virtControllerShaEnv string,
	virtHandlerShaEnv string, virtLauncherShaEnv string) (*appsv1.Deployment, error)

Used for manifest generation only

func NewOperatorWebhookService added in v0.29.0

func NewOperatorWebhookService(operatorNamespace string) *corev1.Service

func NewOpertorValidatingWebhookConfiguration added in v0.29.0

func NewOpertorValidatingWebhookConfiguration(operatorNamespace string) *v1beta1.ValidatingWebhookConfiguration

func NewPodDisruptionBudgetForDeployment added in v0.20.0

func NewPodDisruptionBudgetForDeployment(deployment *appsv1.Deployment) *v1beta1.PodDisruptionBudget

func NewPrometheusRuleCR added in v0.26.0

func NewPrometheusRuleCR(namespace string) *promv1.PrometheusRule

NewPrometheusRuleCR returns a PrometheusRule with a group of alerts for the KubeVirt deployment.

func NewPrometheusRuleSpec added in v0.26.0

func NewPrometheusRuleSpec(ns string) *promv1.PrometheusRuleSpec

NewPrometheusRuleSpec makes a prometheus rule spec for kubevirt

func NewPrometheusService

func NewPrometheusService(namespace string) *corev1.Service

func NewReplicaSetCrd

func NewReplicaSetCrd() *extv1beta1.CustomResourceDefinition

func NewServiceMonitorCR added in v0.20.6

func NewServiceMonitorCR(namespace string, monitorNamespace string, insecureSkipVerify bool) *promv1.ServiceMonitor

func NewVirtAPIAPIServices added in v0.29.0

func NewVirtAPIAPIServices(installNamespace string) []*v1beta1.APIService

func NewVirtAPIMutatingWebhookConfiguration added in v0.29.0

func NewVirtAPIMutatingWebhookConfiguration(installNamespace string) *v1beta1.MutatingWebhookConfiguration

func NewVirtAPIValidatingWebhookConfiguration added in v0.29.0

func NewVirtAPIValidatingWebhookConfiguration(installNamespace string) *v1beta1.ValidatingWebhookConfiguration

func NewVirtualMachineCrd

func NewVirtualMachineCrd() *extv1beta1.CustomResourceDefinition

func NewVirtualMachineInstanceCrd

func NewVirtualMachineInstanceCrd() *extv1beta1.CustomResourceDefinition

func NewVirtualMachineInstanceMigrationCrd

func NewVirtualMachineInstanceMigrationCrd() *extv1beta1.CustomResourceDefinition

func NextRotationDeadline added in v0.29.0

func NextRotationDeadline(cert *tls.Certificate, ca *tls.Certificate) time.Time

nextRotationDeadline returns a value for the threshold at which the current certificate should be rotated, 80% of the expiration of the certificate.

func PopulateSecretWithCertificate added in v0.29.0

func PopulateSecretWithCertificate(secret *k8sv1.Secret, caCert *tls.Certificate, duration *metav1.Duration) (err error)

func ValidateSecret added in v0.29.0

func ValidateSecret(secret *k8sv1.Secret) error

Types

type CertificateCreationCallback added in v0.29.0

type CertificateCreationCallback func(secret *k8sv1.Secret, caCert *tls.Certificate, duration time.Duration) (cert *x509.Certificate, key *rsa.PrivateKey)

Jump to

Keyboard shortcuts

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