/* tslint:disable */ /* eslint-disable */ /** * KubeVirt API * This is KubeVirt API an add-on for Kubernetes. * * The version of the OpenAPI document: 1.0.0 * Contact: kubevirt-dev@googlegroups.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists } from '../runtime'; import { K8sIoApiCoreV1LocalObjectReference, K8sIoApiCoreV1LocalObjectReferenceFromJSON, K8sIoApiCoreV1LocalObjectReferenceToJSON, V1ComponentConfig, V1ComponentConfigFromJSON, V1ComponentConfigToJSON, V1CustomizeComponents, V1CustomizeComponentsFromJSON, V1CustomizeComponentsToJSON, V1KubeVirtCertificateRotateStrategy, V1KubeVirtCertificateRotateStrategyFromJSON, V1KubeVirtCertificateRotateStrategyToJSON, V1KubeVirtConfiguration, V1KubeVirtConfigurationFromJSON, V1KubeVirtConfigurationToJSON, V1KubeVirtWorkloadUpdateStrategy, V1KubeVirtWorkloadUpdateStrategyFromJSON, V1KubeVirtWorkloadUpdateStrategyToJSON, } from './'; /** * * @export * @interface V1KubeVirtSpec */ export interface V1KubeVirtSpec { /** * * @type {V1KubeVirtCertificateRotateStrategy} * @memberof V1KubeVirtSpec */ certificateRotateStrategy?: V1KubeVirtCertificateRotateStrategy; /** * * @type {V1KubeVirtConfiguration} * @memberof V1KubeVirtSpec */ _configuration?: V1KubeVirtConfiguration; /** * * @type {V1CustomizeComponents} * @memberof V1KubeVirtSpec */ customizeComponents?: V1CustomizeComponents; /** * The ImagePullPolicy to use. * * Possible enum values: * - `"Always"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. * - `"IfNotPresent"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails. * - `"Never"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present * @type {string} * @memberof V1KubeVirtSpec */ imagePullPolicy?: V1KubeVirtSpecImagePullPolicyEnum; /** * The imagePullSecrets to pull the container images from Defaults to none * @type {Array} * @memberof V1KubeVirtSpec */ imagePullSecrets?: Array; /** * The image registry to pull the container images from Defaults to the same registry the operator's container image is pulled from. * @type {string} * @memberof V1KubeVirtSpec */ imageRegistry?: string; /** * The image tag to use for the continer images installed. Defaults to the same tag as the operator's container image. * @type {string} * @memberof V1KubeVirtSpec */ imageTag?: string; /** * * @type {V1ComponentConfig} * @memberof V1KubeVirtSpec */ infra?: V1ComponentConfig; /** * The name of the Prometheus service account that needs read-access to KubeVirt endpoints Defaults to prometheus-k8s * @type {string} * @memberof V1KubeVirtSpec */ monitorAccount?: string; /** * The namespace Prometheus is deployed in Defaults to openshift-monitor * @type {string} * @memberof V1KubeVirtSpec */ monitorNamespace?: string; /** * Designate the apps.kubevirt.io/component label for KubeVirt components. Useful if KubeVirt is included as part of a product. If ProductComponent is not specified, the component label default value is kubevirt. * @type {string} * @memberof V1KubeVirtSpec */ productComponent?: string; /** * Designate the apps.kubevirt.io/part-of label for KubeVirt components. Useful if KubeVirt is included as part of a product. If ProductName is not specified, the part-of label will be omitted. * @type {string} * @memberof V1KubeVirtSpec */ productName?: string; /** * Designate the apps.kubevirt.io/version label for KubeVirt components. Useful if KubeVirt is included as part of a product. If ProductVersion is not specified, KubeVirt's version will be used. * @type {string} * @memberof V1KubeVirtSpec */ productVersion?: string; /** * The namespace the service monitor will be deployed * When ServiceMonitorNamespace is set, then we'll install the service monitor object in that namespace * otherwise we will use the monitoring namespace. * @type {string} * @memberof V1KubeVirtSpec */ serviceMonitorNamespace?: string; /** * Specify the port to listen on for VMI status synchronization traffic. Default is 9185 * @type {string} * @memberof V1KubeVirtSpec */ synchronizationPort?: string; /** * Specifies if kubevirt can be deleted if workloads are still present. This is mainly a precaution to avoid accidental data loss * @type {string} * @memberof V1KubeVirtSpec */ uninstallStrategy?: string; /** * * @type {V1KubeVirtWorkloadUpdateStrategy} * @memberof V1KubeVirtSpec */ workloadUpdateStrategy?: V1KubeVirtWorkloadUpdateStrategy; /** * * @type {V1ComponentConfig} * @memberof V1KubeVirtSpec */ workloads?: V1ComponentConfig; } /** * @export * @enum {string} */ export enum V1KubeVirtSpecImagePullPolicyEnum { Always = 'Always', IfNotPresent = 'IfNotPresent', Never = 'Never', } export function V1KubeVirtSpecFromJSON(json: any): V1KubeVirtSpec { return V1KubeVirtSpecFromJSONTyped(json, false); } export function V1KubeVirtSpecFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): V1KubeVirtSpec { if (json === undefined || json === null) { return json; } return { certificateRotateStrategy: !exists(json, 'certificateRotateStrategy') ? undefined : V1KubeVirtCertificateRotateStrategyFromJSON(json['certificateRotateStrategy']), _configuration: !exists(json, 'configuration') ? undefined : V1KubeVirtConfigurationFromJSON(json['configuration']), customizeComponents: !exists(json, 'customizeComponents') ? undefined : V1CustomizeComponentsFromJSON(json['customizeComponents']), imagePullPolicy: !exists(json, 'imagePullPolicy') ? undefined : json['imagePullPolicy'], imagePullSecrets: !exists(json, 'imagePullSecrets') ? undefined : (json['imagePullSecrets'] as Array).map(K8sIoApiCoreV1LocalObjectReferenceFromJSON), imageRegistry: !exists(json, 'imageRegistry') ? undefined : json['imageRegistry'], imageTag: !exists(json, 'imageTag') ? undefined : json['imageTag'], infra: !exists(json, 'infra') ? undefined : V1ComponentConfigFromJSON(json['infra']), monitorAccount: !exists(json, 'monitorAccount') ? undefined : json['monitorAccount'], monitorNamespace: !exists(json, 'monitorNamespace') ? undefined : json['monitorNamespace'], productComponent: !exists(json, 'productComponent') ? undefined : json['productComponent'], productName: !exists(json, 'productName') ? undefined : json['productName'], productVersion: !exists(json, 'productVersion') ? undefined : json['productVersion'], serviceMonitorNamespace: !exists(json, 'serviceMonitorNamespace') ? undefined : json['serviceMonitorNamespace'], synchronizationPort: !exists(json, 'synchronizationPort') ? undefined : json['synchronizationPort'], uninstallStrategy: !exists(json, 'uninstallStrategy') ? undefined : json['uninstallStrategy'], workloadUpdateStrategy: !exists(json, 'workloadUpdateStrategy') ? undefined : V1KubeVirtWorkloadUpdateStrategyFromJSON(json['workloadUpdateStrategy']), workloads: !exists(json, 'workloads') ? undefined : V1ComponentConfigFromJSON(json['workloads']), }; } export function V1KubeVirtSpecToJSON(value?: V1KubeVirtSpec | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { certificateRotateStrategy: V1KubeVirtCertificateRotateStrategyToJSON( value.certificateRotateStrategy, ), configuration: V1KubeVirtConfigurationToJSON(value._configuration), customizeComponents: V1CustomizeComponentsToJSON(value.customizeComponents), imagePullPolicy: value.imagePullPolicy, imagePullSecrets: value.imagePullSecrets === undefined ? undefined : (value.imagePullSecrets as Array).map(K8sIoApiCoreV1LocalObjectReferenceToJSON), imageRegistry: value.imageRegistry, imageTag: value.imageTag, infra: V1ComponentConfigToJSON(value.infra), monitorAccount: value.monitorAccount, monitorNamespace: value.monitorNamespace, productComponent: value.productComponent, productName: value.productName, productVersion: value.productVersion, serviceMonitorNamespace: value.serviceMonitorNamespace, synchronizationPort: value.synchronizationPort, uninstallStrategy: value.uninstallStrategy, workloadUpdateStrategy: V1KubeVirtWorkloadUpdateStrategyToJSON(value.workloadUpdateStrategy), workloads: V1ComponentConfigToJSON(value.workloads), }; }