diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f966cf8d..81391be3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -72,7 +72,7 @@ jobs: if: steps.list-changed.outputs.changed == 'true' - name: Run chart-testing (install-generic) - run: ct install --config tests/ct.yaml --excluded-charts harvester-csi-driver-lvm + run: ct install --config tests/ct-install.yaml - name: Run chart-testing (install-lvm) run: ct install --config tests/ct.yaml --charts charts/harvester-csi-driver-lvm diff --git a/charts/forklift-operator/.helmignore b/charts/forklift-operator/.helmignore new file mode 100644 index 000000000..0e8a0eb3 --- /dev/null +++ b/charts/forklift-operator/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/forklift-operator/Chart.yaml b/charts/forklift-operator/Chart.yaml new file mode 100644 index 000000000..aebe69b0 --- /dev/null +++ b/charts/forklift-operator/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: forklift-operator +description: A Helm chart for Kubernetes +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 1.8.0-dev.0 +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "main-head" + +maintainers: + - name: harvester diff --git a/charts/forklift-operator/templates/_helpers.tpl b/charts/forklift-operator/templates/_helpers.tpl new file mode 100644 index 000000000..351df0b2 --- /dev/null +++ b/charts/forklift-operator/templates/_helpers.tpl @@ -0,0 +1,52 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "forklift-operator.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "forklift-operator.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "forklift-operator.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "forklift-operator.labels" -}} +helm.sh/chart: {{ include "forklift-operator.chart" . }} +{{ include "forklift-operator.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "forklift-operator.selectorLabels" -}} +app.kubernetes.io/name: {{ include "forklift-operator.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + diff --git a/charts/forklift-operator/templates/deployment.yaml b/charts/forklift-operator/templates/deployment.yaml new file mode 100644 index 000000000..40f92ecd --- /dev/null +++ b/charts/forklift-operator/templates/deployment.yaml @@ -0,0 +1,96 @@ +{{- $repo := .Values.forkliftOperatorAnsible.forkliftOperator.repo -}} +{{- $tag := .Values.forkliftOperatorAnsible.forkliftOperator.tag -}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "forklift-operator.fullname" . }}-forklift-operator-ansible + labels: + control-plane: controller-manager + {{- include "forklift-operator.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.forkliftOperatorAnsible.replicas }} + selector: + matchLabels: + app: forklift + name: controller-manager + {{- include "forklift-operator.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + app: forklift + name: controller-manager + {{- include "forklift-operator.selectorLabels" . | nindent 8 }} + spec: + containers: + - args: {{- toYaml .Values.forkliftOperatorAnsible.forkliftOperator.args | nindent 8 }} + env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: ANSIBLE_GATHERING + value: {{ quote .Values.forkliftOperatorAnsible.forkliftOperator.env.ansibleGathering }} + - name: CONTROLLER_IMAGE + value: "{{$repo}}/harvester-forklift-controller:{{$tag}}" + - name: API_IMAGE + value: "{{$repo}}/harvester-forklift-api:{{$tag}}" + - name: MUST_GATHER_IMAGE + value: "{{$repo}}/harvester-forklift-must-gather:{{$tag}}" + - name: UI_PLUGIN_IMAGE + value: "" + - name: VALIDATION_IMAGE + value: "{{$repo}}/harvester-validation:{{$tag}}" + - name: VIRT_V2V_IMAGE + value: "{{$repo}}/harvester-virt-v2v:{{$tag}}" + - name: VIRT_V2V_DONT_REQUEST_KVM + value: {{ quote .Values.forkliftOperatorAnsible.forkliftOperator.env.virtV2VDontRequestKvm }} + - name: SNAPSHOT_REMOVAL_TIMEOUT + value: {{ quote .Values.forkliftOperatorAnsible.forkliftOperator.env.snapshotRemovalTimeout }} + - name: SNAPSHOT_STATUS_CHECK_RATE + value: {{ quote .Values.forkliftOperatorAnsible.forkliftOperator.env.snapshotStatusCheckRate }} + - name: CLEANUP_RETRIES + value: {{ quote .Values.forkliftOperatorAnsible.forkliftOperator.env.cleanupRetries }} + - name: CDI_EXPORT_TOKEN_TTL + value: {{ quote .Values.forkliftOperatorAnsible.forkliftOperator.env.cdiExportTokenTtl }} + - name: FILESYSTEM_OVERHEAD + value: {{ quote .Values.forkliftOperatorAnsible.forkliftOperator.env.filesystemOverhead }} + - name: BLOCK_OVERHEAD + value: {{ quote .Values.forkliftOperatorAnsible.forkliftOperator.env.blockOverhead }} + - name: POPULATOR_CONTROLLER_IMAGE + value: "{{$repo}}/harvester-populator-controller:{{$tag}}" + - name: OVIRT_POPULATOR_IMAGE + value: "{{$repo}}/harvester-forklift-ovirt-populator:{{$tag}}" + - name: OPENSTACK_POPULATOR_IMAGE + value: "{{$repo}}/harvester-forklift-openstack-populator:{{$tag}}" + - name: OVA_PROVIDER_SERVER_IMAGE + value: "{{$repo}}/harvester-forklift-ova-provider-server:{{$tag}}" + - name: OVIRT_OS_MAP + value: {{ quote .Values.forkliftOperatorAnsible.forkliftOperator.env.ovirtOsMap }} + - name: VSPHERE_OS_MAP + value: {{ quote .Values.forkliftOperatorAnsible.forkliftOperator.env.vsphereOsMap }} + - name: VIRT_CUSTOMIZE_MAP + value: {{ quote .Values.forkliftOperatorAnsible.forkliftOperator.env.virtCustomizeMap }} + - name: VSPHERE_XCOPY_VOLUME_POPULATOR_IMAGE + value: {{ quote .Values.forkliftOperatorAnsible.forkliftOperator.env.vsphereXcopyVolumePopulatorImage }} + - name: KUBERNETES_CLUSTER_DOMAIN + value: {{ quote .Values.kubernetesClusterDomain }} + image: "{{ .Values.forkliftOperatorAnsible.forkliftOperator.repo }}/{{ .Values.forkliftOperatorAnsible.forkliftOperator.operatorImage }}:{{ .Values.forkliftOperatorAnsible.forkliftOperator.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.forkliftOperatorAnsible.forkliftOperator.imagePullPolicy }} + livenessProbe: + httpGet: + path: /healthz + port: 6789 + initialDelaySeconds: 15 + periodSeconds: 20 + name: forklift-operator + readinessProbe: + httpGet: + path: /readyz + port: 6789 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: {{- toYaml .Values.forkliftOperatorAnsible.forkliftOperator.resources | nindent 10 }} + nodeSelector: {{- toYaml .Values.forkliftOperatorAnsible.nodeSelector | nindent 8 }} + serviceAccountName: forklift-operator + tolerations: {{- toYaml .Values.forkliftOperatorAnsible.tolerations | nindent 8 }} + topologySpreadConstraints: {{- toYaml .Values.forkliftOperatorAnsible.topologySpreadConstraints | nindent 8 }} diff --git a/charts/forklift-operator/templates/forklift-api-rbac.yaml b/charts/forklift-operator/templates/forklift-api-rbac.yaml new file mode 100644 index 000000000..e8331660 --- /dev/null +++ b/charts/forklift-operator/templates/forklift-api-rbac.yaml @@ -0,0 +1,58 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "forklift-operator.fullname" . }}-forklift-api-role + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +rules: +- apiGroups: + - forklift.konveyor.io + resources: + - plans + - providers + - storagemaps + - hosts + verbs: + - get + - list +- apiGroups: + - storage.k8s.io + resources: + - storageclasses + verbs: + - get + - list +- apiGroups: + - k8s.cni.cncf.io + resources: + - network-attachment-definitions + verbs: + - get + - list +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +- apiGroups: + - "" + resources: + - secrets + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "forklift-operator.fullname" . }}-forklift-api-rolebinding + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "forklift-operator.fullname" . }}-forklift-api-role' +subjects: +- kind: ServiceAccount + name: forklift-api + namespace: '{{ .Release.Namespace }}' diff --git a/charts/forklift-operator/templates/forklift-controller-rbac.yaml b/charts/forklift-operator/templates/forklift-controller-rbac.yaml new file mode 100644 index 000000000..f62a3480 --- /dev/null +++ b/charts/forklift-operator/templates/forklift-controller-rbac.yaml @@ -0,0 +1,201 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "forklift-operator.fullname" . }}-forklift-controller-role + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +rules: +- apiGroups: + - forklift.konveyor.io + resources: + - '*' + verbs: + - '*' +- apiGroups: + - "" + resources: + - pods + - secrets + - namespaces + - events + - configmaps + - persistentvolumes + - persistentvolumeclaims + - services + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - batch + resources: + - jobs + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +- apiGroups: + - k8s.cni.cncf.io + resources: + - network-attachment-definitions + verbs: + - get + - list + - watch +- apiGroups: + - storage.k8s.io + resources: + - storageclasses + verbs: + - get + - list + - watch +- apiGroups: + - kubevirt.io + resources: + - virtualmachines + - virtualmachines/finalizers + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - cdi.kubevirt.io + resources: + - datavolumes + - datavolumes/finalizers + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - security.openshift.io + resourceNames: + - anyuid + resources: + - securitycontextconstraints + verbs: + - use +- apiGroups: + - template.openshift.io + resources: + - templates + verbs: + - get + - list +- apiGroups: + - export.kubevirt.io + resources: + - virtualmachineexports + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - instancetype.kubevirt.io + resources: + - virtualmachinepreferences + - virtualmachineclusterpreferences + - virtualmachineinstancetypes + - virtualmachineclusterinstancetypes + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create +- apiGroups: + - rbac.authorization.k8s.io + resources: + - roles + - rolebindings + - clusterroles + - clusterrolebindings + verbs: + - get + - patch + - create +- apiGroups: + - build.openshift.io + resources: + - builds + - buildconfigs + - buildconfigs/instantiate + verbs: + - create + - get + - list + - watch + - update +- apiGroups: + - image.openshift.io + resources: + - imagestreamtags + - imagestreams + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "forklift-operator.fullname" . }}-forklift-controller-rolebinding + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "forklift-operator.fullname" . }}-forklift-controller-role' +subjects: +- kind: ServiceAccount + name: forklift-controller + namespace: '{{ .Release.Namespace }}' diff --git a/charts/forklift-operator/templates/forklift-populator-controller-rbac.yaml b/charts/forklift-operator/templates/forklift-populator-controller-rbac.yaml new file mode 100644 index 000000000..cbced698 --- /dev/null +++ b/charts/forklift-operator/templates/forklift-populator-controller-rbac.yaml @@ -0,0 +1,152 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "forklift-operator.fullname" . }}-forklift-populator-controller-role + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +rules: +- apiGroups: + - forklift.konveyor.io + resources: + - '*' + verbs: + - '*' +- apiGroups: + - "" + resources: + - pods + - secrets + - namespaces + - events + - configmaps + - persistentvolumes + - persistentvolumeclaims + - services + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - batch + resources: + - jobs + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +- apiGroups: + - k8s.cni.cncf.io + resources: + - network-attachment-definitions + verbs: + - get + - list + - watch +- apiGroups: + - storage.k8s.io + resources: + - storageclasses + verbs: + - get + - list + - watch +- apiGroups: + - kubevirt.io + resources: + - virtualmachines + - virtualmachines/finalizers + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - cdi.kubevirt.io + resources: + - datavolumes + - datavolumes/finalizers + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - security.openshift.io + resourceNames: + - anyuid + resources: + - securitycontextconstraints + verbs: + - use +- apiGroups: + - template.openshift.io + resources: + - templates + verbs: + - get + - list +- apiGroups: + - export.kubevirt.io + resources: + - virtualmachineexports + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "forklift-operator.fullname" . }}-forklift-populator-controller-rolebinding + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "forklift-operator.fullname" . }}-forklift-populator-controller-role' +subjects: +- kind: ServiceAccount + name: forklift-populator-controller + namespace: '{{ .Release.Namespace }}' diff --git a/charts/forklift-operator/templates/forkliftcontroller-crd.yaml b/charts/forklift-operator/templates/forkliftcontroller-crd.yaml new file mode 100644 index 000000000..320af33a --- /dev/null +++ b/charts/forklift-operator/templates/forkliftcontroller-crd.yaml @@ -0,0 +1,51 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: forkliftcontrollers.forklift.konveyor.io + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +spec: + group: forklift.konveyor.io + names: + kind: ForkliftController + listKind: ForkliftControllerList + plural: forkliftcontrollers + singular: forkliftcontroller + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: ForkliftController is the Schema for the forkliftcontrollers API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec defines the desired state of ForkliftController + type: object + x-kubernetes-preserve-unknown-fields: true + status: + description: Status defines the observed state of ForkliftController + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/charts/forklift-operator/templates/hook-crd.yaml b/charts/forklift-operator/templates/hook-crd.yaml new file mode 100644 index 000000000..73a55a61 --- /dev/null +++ b/charts/forklift-operator/templates/hook-crd.yaml @@ -0,0 +1,126 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: hooks.forklift.konveyor.io + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +spec: + group: forklift.konveyor.io + names: + kind: Hook + listKind: HookList + plural: hooks + singular: hook + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: Ready + type: string + - jsonPath: .spec.image + name: Image + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: Hook is the Schema for the hooks API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: Hook specification. + properties: + deadline: + description: Hook deadline in seconds. + format: int64 + type: integer + image: + description: Image to run. + type: string + playbook: + description: A base64 encoded Ansible playbook. + type: string + serviceAccount: + description: Service account. + type: string + required: + - image + type: object + status: + description: Hook status. + properties: + conditions: + description: List of conditions. + items: + description: Condition + properties: + category: + description: The condition category. + type: string + durable: + description: The condition is durable - never un-staged. + type: boolean + items: + description: A list of items referenced in the `Message`. + items: + type: string + type: array + lastTransitionTime: + description: When the last status transition occurred. + format: date-time + type: string + message: + description: The human readable description of the condition. + type: string + reason: + description: The reason for the condition or transition. + type: string + status: + description: The condition status [true,false]. + type: string + type: + description: The condition type. + type: string + required: + - category + - lastTransitionTime + - status + - type + type: object + type: array + observedGeneration: + description: The most recent generation observed by the controller. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/charts/forklift-operator/templates/host-crd.yaml b/charts/forklift-operator/templates/host-crd.yaml new file mode 100644 index 000000000..21bf3b2a --- /dev/null +++ b/charts/forklift-operator/templates/host-crd.yaml @@ -0,0 +1,223 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: hosts.forklift.konveyor.io + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +spec: + group: forklift.konveyor.io + names: + kind: Host + listKind: HostList + plural: hosts + singular: host + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='ConnectionTestSucceeded')].status + name: CONNECTED + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: HostSpec defines the desired state of Host + properties: + id: + description: |- + The object ID. + vsphere: + The managed object ID. + type: string + ipAddress: + description: IP address used for disk transfer. + type: string + name: + description: |- + An object Name. + vsphere: + A qualified name. + type: string + namespace: + description: |- + The VM Namespace + Only relevant for an openshift source. + type: string + provider: + description: Provider + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + secret: + description: Credentials. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + type: + description: Type used to qualify the name. + type: string + required: + - ipAddress + - provider + - secret + type: object + status: + description: HostStatus defines the observed state of Host + properties: + conditions: + description: List of conditions. + items: + description: Condition + properties: + category: + description: The condition category. + type: string + durable: + description: The condition is durable - never un-staged. + type: boolean + items: + description: A list of items referenced in the `Message`. + items: + type: string + type: array + lastTransitionTime: + description: When the last status transition occurred. + format: date-time + type: string + message: + description: The human readable description of the condition. + type: string + reason: + description: The reason for the condition or transition. + type: string + status: + description: The condition status [true,false]. + type: string + type: + description: The condition type. + type: string + required: + - category + - lastTransitionTime + - status + - type + type: object + type: array + observedGeneration: + description: The most recent generation observed by the controller. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/charts/forklift-operator/templates/leader-election-rbac.yaml b/charts/forklift-operator/templates/leader-election-rbac.yaml new file mode 100644 index 000000000..e0b4862f --- /dev/null +++ b/charts/forklift-operator/templates/leader-election-rbac.yaml @@ -0,0 +1,125 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "forklift-operator.fullname" . }}-leader-election-role + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +rules: +- apiGroups: + - "" + resources: + - pods + - services + - services/finalizers + - endpoints + - persistentvolumeclaims + - events + - configmaps + - secrets + - namespaces + verbs: + - '*' +- apiGroups: + - route.openshift.io + resources: + - routes + verbs: + - '*' +- apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - '*' +- apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + - prometheusrules + verbs: + - get + - create + - update + - patch + - list + - watch +- apiGroups: + - apps.openshift.io + resources: + - deploymentconfigs + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - apps + resourceNames: + - forklift-operator + resources: + - deployments/finalizers + verbs: + - update +- apiGroups: + - forklift.konveyor.io + resources: + - '*' + verbs: + - '*' +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch +- apiGroups: + - build.openshift.io + resources: + - builds + - buildconfigs + - buildconfigs/instantiate + verbs: + - create + - get + - list + - watch + - update + - patch +- apiGroups: + - image.openshift.io + resources: + - imagestreamtags + - imagestreams + verbs: + - create + - get + - list + - watch + - update + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "forklift-operator.fullname" . }}-leader-election-rolebinding + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: '{{ include "forklift-operator.fullname" . }}-leader-election-role' +subjects: +- kind: ServiceAccount + name: forklift-operator + namespace: '{{ .Release.Namespace }}' diff --git a/charts/forklift-operator/templates/manager-rbac.yaml b/charts/forklift-operator/templates/manager-rbac.yaml new file mode 100644 index 000000000..c8f9f4f9 --- /dev/null +++ b/charts/forklift-operator/templates/manager-rbac.yaml @@ -0,0 +1,98 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "forklift-operator.fullname" . }}-manager-role + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +rules: +- apiGroups: + - "" + resources: + - namespaces + verbs: + - list + - watch +- apiGroups: + - config.openshift.io + resources: + - clusterversions + - proxies + verbs: + - get +- apiGroups: + - oauth.openshift.io + resources: + - oauthclients + verbs: + - '*' +- apiGroups: + - forklift.konveyor.io + resources: + - forkliftcontrollers + - forkliftcontrollers/status + - forkliftcontrollers/finalizers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - console.openshift.io + resources: + - consoleplugins + verbs: + - '*' +- apiGroups: + - operator.openshift.io + resources: + - consoles + verbs: + - get + - list + - watch + - update + - patch +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - '*' +- apiGroups: + - cert-manager.io + resources: + - issuers + - certificates + verbs: + - '*' +- apiGroups: + - security.openshift.io + resources: + - securitycontextconstraints + verbs: + - create + - delete + - get + - list + - watch + - update + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "forklift-operator.fullname" . }}-manager-rolebinding + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "forklift-operator.fullname" . }}-manager-role' +subjects: +- kind: ServiceAccount + name: forklift-operator + namespace: '{{ .Release.Namespace }}' diff --git a/charts/forklift-operator/templates/migration-crd.yaml b/charts/forklift-operator/templates/migration-crd.yaml new file mode 100644 index 000000000..a2e8f2a2 --- /dev/null +++ b/charts/forklift-operator/templates/migration-crd.yaml @@ -0,0 +1,629 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: migrations.forklift.konveyor.io + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +spec: + group: forklift.konveyor.io + names: + kind: Migration + listKind: MigrationList + plural: migrations + singular: migration + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Running')].status + name: RUNNING + type: string + - jsonPath: .status.conditions[?(@.type=='Succeeded')].status + name: SUCCEEDED + type: string + - jsonPath: .status.conditions[?(@.type=='Failed')].status + name: FAILED + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: MigrationSpec defines the desired state of Migration + properties: + cancel: + description: List of VMs which will have their imports canceled. + items: + description: |- + Source reference. + Either the ID or Name must be specified. + properties: + id: + description: |- + The object ID. + vsphere: + The managed object ID. + type: string + name: + description: |- + An object Name. + vsphere: + A qualified name. + type: string + namespace: + description: |- + The VM Namespace + Only relevant for an openshift source. + type: string + type: + description: Type used to qualify the name. + type: string + type: object + type: array + cutover: + description: |- + Date and time to finalize a warm migration. + If present, this will override the value set on the Plan. + format: date-time + type: string + plan: + description: Reference to the associated Plan. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + required: + - plan + type: object + status: + description: MigrationStatus defines the observed state of Migration + properties: + completed: + description: Completed timestamp. + format: date-time + type: string + conditions: + description: List of conditions. + items: + description: Condition + properties: + category: + description: The condition category. + type: string + durable: + description: The condition is durable - never un-staged. + type: boolean + items: + description: A list of items referenced in the `Message`. + items: + type: string + type: array + lastTransitionTime: + description: When the last status transition occurred. + format: date-time + type: string + message: + description: The human readable description of the condition. + type: string + reason: + description: The reason for the condition or transition. + type: string + status: + description: The condition status [true,false]. + type: string + type: + description: The condition type. + type: string + required: + - category + - lastTransitionTime + - status + - type + type: object + type: array + observedGeneration: + description: The most recent generation observed by the controller. + format: int64 + type: integer + started: + description: Started timestamp. + format: date-time + type: string + vms: + description: VM status + items: + description: VM Status + properties: + completed: + description: Completed timestamp. + format: date-time + type: string + conditions: + description: List of conditions. + items: + description: Condition + properties: + category: + description: The condition category. + type: string + durable: + description: The condition is durable - never un-staged. + type: boolean + items: + description: A list of items referenced in the `Message`. + items: + type: string + type: array + lastTransitionTime: + description: When the last status transition occurred. + format: date-time + type: string + message: + description: The human readable description of the condition. + type: string + reason: + description: The reason for the condition or transition. + type: string + status: + description: The condition status [true,false]. + type: string + type: + description: The condition type. + type: string + required: + - category + - lastTransitionTime + - status + - type + type: object + type: array + error: + description: Errors + properties: + phase: + type: string + reasons: + items: + type: string + type: array + required: + - phase + - reasons + type: object + firmware: + description: The firmware type detected from the OVF file produced + by virt-v2v. + type: string + hooks: + description: Enable hooks. + items: + description: Plan hook. + properties: + hook: + description: Hook reference. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + step: + description: Pipeline step. + type: string + required: + - hook + - step + type: object + type: array + id: + description: |- + The object ID. + vsphere: + The managed object ID. + type: string + instanceType: + description: Selected InstanceType that will override the VM properties. + type: string + luks: + description: Disk decryption LUKS keys + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + An object Name. + vsphere: + A qualified name. + type: string + namespace: + description: |- + The VM Namespace + Only relevant for an openshift source. + type: string + networkNameTemplate: + description: |- + NetworkNameTemplate is a template for generating network interface names in the target virtual machine. + It follows Go template syntax and has access to the following variables: + - .NetworkName: If target network is multus, name of the Multus network attachment definition, empty otherwise. + - .NetworkNamespace: If target network is multus, namespace where the network attachment definition is located. + - .NetworkType: type of the network ("Multus" or "Pod") + - .NetworkIndex: sequential index of the network interface (0-based) + The template can be used to customize network interface names based on target network configuration. + Note: + - This template will override at the plan level template + - If not specified on VM level and on Plan leverl, default naming conventions will be used + type: string + newName: + description: The new name of the VM after matching DNS1123 requirements. + type: string + operatingSystem: + description: The Operating System detected by virt-v2v. + type: string + phase: + description: Phase + type: string + pipeline: + description: Migration pipeline. + items: + description: Pipeline step. + properties: + annotations: + additionalProperties: + type: string + description: Annotations. + type: object + completed: + description: Completed timestamp. + format: date-time + type: string + description: + description: Name + type: string + error: + description: Error. + properties: + phase: + type: string + reasons: + items: + type: string + type: array + required: + - phase + - reasons + type: object + name: + description: Name. + type: string + phase: + description: Phase + type: string + progress: + description: Progress. + properties: + completed: + description: Completed units. + format: int64 + type: integer + total: + description: Total units. + format: int64 + type: integer + required: + - completed + - total + type: object + reason: + description: Reason + type: string + started: + description: Started timestamp. + format: date-time + type: string + tasks: + description: Nested tasks. + items: + description: Migration task. + properties: + annotations: + additionalProperties: + type: string + description: Annotations. + type: object + completed: + description: Completed timestamp. + format: date-time + type: string + description: + description: Name + type: string + error: + description: Error. + properties: + phase: + type: string + reasons: + items: + type: string + type: array + required: + - phase + - reasons + type: object + name: + description: Name. + type: string + phase: + description: Phase + type: string + progress: + description: Progress. + properties: + completed: + description: Completed units. + format: int64 + type: integer + total: + description: Total units. + format: int64 + type: integer + required: + - completed + - total + type: object + reason: + description: Reason + type: string + started: + description: Started timestamp. + format: date-time + type: string + required: + - name + - progress + type: object + type: array + required: + - name + - progress + type: object + type: array + pvcNameTemplate: + description: |- + PVCNameTemplate is a template for generating PVC names for VM disks. + It follows Go template syntax and has access to the following variables: + - .VmName: name of the VM + - .PlanName: name of the migration plan + - .DiskIndex: initial volume index of the disk + - .RootDiskIndex: index of the root disk + - .Shared: true if the volume is shared by multiple VMs, false otherwise + Note: + This template overrides the plan level template. + type: string + restorePowerState: + description: Source VM power state before migration. + type: string + rootDisk: + description: Choose the primary disk the VM boots from + type: string + started: + description: Started timestamp. + format: date-time + type: string + targetName: + description: |- + TargetName specifies a custom name for the VM in the target cluster. + If not provided, the original VM name will be used and automatically adjusted to meet k8s DNS1123 requirements. + If provided, this exact name will be used instead. The migration will fail if the name is not unique or already in use. + type: string + type: + description: Type used to qualify the name. + type: string + volumeNameTemplate: + description: |- + VolumeNameTemplate is a template for generating volume interface names in the target virtual machine. + It follows Go template syntax and has access to the following variables: + - .PVCName: name of the PVC mounted to the VM using this volume + - .VolumeIndex: sequential index of the volume interface (0-based) + Note: + - This template will override at the plan level template + - If not specified on VM level and on Plan leverl, default naming conventions will be used + type: string + warm: + description: Warm migration status + properties: + consecutiveFailures: + type: integer + failures: + type: integer + nextPrecopyAt: + format: date-time + type: string + precopies: + items: + description: Precopy durations + properties: + createTaskId: + type: string + deltas: + items: + properties: + deltaId: + type: string + disk: + type: string + required: + - deltaId + - disk + type: object + type: array + end: + format: date-time + type: string + removeTaskId: + type: string + snapshot: + type: string + start: + format: date-time + type: string + type: object + type: array + successes: + type: integer + required: + - consecutiveFailures + - failures + - successes + type: object + required: + - phase + - pipeline + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/charts/forklift-operator/templates/networkmap-crd.yaml b/charts/forklift-operator/templates/networkmap-crd.yaml new file mode 100644 index 000000000..2895d00d --- /dev/null +++ b/charts/forklift-operator/templates/networkmap-crd.yaml @@ -0,0 +1,289 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: networkmaps.forklift.konveyor.io + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +spec: + group: forklift.konveyor.io + names: + kind: NetworkMap + listKind: NetworkMapList + plural: networkmaps + singular: networkmap + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: Network map spec. + properties: + map: + description: Map. + items: + description: Mapped network. + properties: + destination: + description: Destination network. + properties: + name: + description: The name. + type: string + namespace: + description: The namespace (multus only). + type: string + type: + description: |- + Type of network to use for the destination. + Valid values: + - pod: Use the Kubernetes pod network + - multus: Use a Multus additional network + - ignored: Network is excluded from mapping + enum: + - pod + - multus + - ignored + type: string + required: + - type + type: object + source: + description: Source network. + properties: + id: + description: |- + The object ID. + vsphere: + The managed object ID. + type: string + name: + description: |- + An object Name. + vsphere: + A qualified name. + type: string + namespace: + description: |- + The VM Namespace + Only relevant for an openshift source. + type: string + type: + description: Type used to qualify the name. + type: string + type: object + required: + - destination + - source + type: object + type: array + provider: + description: Provider + properties: + destination: + description: Destination. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + source: + description: Source. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + required: + - destination + - source + type: object + required: + - map + - provider + type: object + status: + description: MapStatus defines the observed state of Maps. + properties: + conditions: + description: List of conditions. + items: + description: Condition + properties: + category: + description: The condition category. + type: string + durable: + description: The condition is durable - never un-staged. + type: boolean + items: + description: A list of items referenced in the `Message`. + items: + type: string + type: array + lastTransitionTime: + description: When the last status transition occurred. + format: date-time + type: string + message: + description: The human readable description of the condition. + type: string + reason: + description: The reason for the condition or transition. + type: string + status: + description: The condition status [true,false]. + type: string + type: + description: The condition type. + type: string + required: + - category + - lastTransitionTime + - status + - type + type: object + type: array + observedGeneration: + description: The most recent generation observed by the controller. + format: int64 + type: integer + references: + items: + description: |- + Source reference. + Either the ID or Name must be specified. + properties: + id: + description: |- + The object ID. + vsphere: + The managed object ID. + type: string + name: + description: |- + An object Name. + vsphere: + A qualified name. + type: string + namespace: + description: |- + The VM Namespace + Only relevant for an openshift source. + type: string + type: + description: Type used to qualify the name. + type: string + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/charts/forklift-operator/templates/openstackvolumepopulator-crd.yaml b/charts/forklift-operator/templates/openstackvolumepopulator-crd.yaml new file mode 100644 index 000000000..cd106935 --- /dev/null +++ b/charts/forklift-operator/templates/openstackvolumepopulator-crd.yaml @@ -0,0 +1,114 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: openstackvolumepopulators.forklift.konveyor.io + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +spec: + group: forklift.konveyor.io + names: + kind: OpenstackVolumePopulator + listKind: OpenstackVolumePopulatorList + plural: openstackvolumepopulators + shortNames: + - osvp + - osvps + singular: openstackvolumepopulator + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + properties: + identityUrl: + type: string + imageId: + type: string + secretName: + type: string + transferNetwork: + description: The network attachment definition that should be used for + disk transfer. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + required: + - identityUrl + - imageId + - secretName + type: object + status: + properties: + progress: + type: string + type: object + required: + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/charts/forklift-operator/templates/ovirtvolumepopulator-crd.yaml b/charts/forklift-operator/templates/ovirtvolumepopulator-crd.yaml new file mode 100644 index 000000000..e6752b70 --- /dev/null +++ b/charts/forklift-operator/templates/ovirtvolumepopulator-crd.yaml @@ -0,0 +1,114 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: ovirtvolumepopulators.forklift.konveyor.io + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +spec: + group: forklift.konveyor.io + names: + kind: OvirtVolumePopulator + listKind: OvirtVolumePopulatorList + plural: ovirtvolumepopulators + shortNames: + - ovvp + - ovvps + singular: ovirtvolumepopulator + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + properties: + diskId: + type: string + engineSecretName: + type: string + engineUrl: + type: string + transferNetwork: + description: The network attachment definition that should be used for + disk transfer. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + required: + - diskId + - engineSecretName + - engineUrl + type: object + status: + properties: + progress: + type: string + type: object + required: + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/charts/forklift-operator/templates/plan-crd.yaml b/charts/forklift-operator/templates/plan-crd.yaml new file mode 100644 index 000000000..e003b752 --- /dev/null +++ b/charts/forklift-operator/templates/plan-crd.yaml @@ -0,0 +1,1272 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: plans.forklift.konveyor.io + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +spec: + group: forklift.konveyor.io + names: + kind: Plan + listKind: PlanList + plural: plans + singular: plan + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Executing')].status + name: EXECUTING + type: string + - jsonPath: .status.conditions[?(@.type=='Succeeded')].status + name: SUCCEEDED + type: string + - jsonPath: .status.conditions[?(@.type=='Failed')].status + name: FAILED + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: PlanSpec defines the desired state of Plan. + properties: + archived: + description: Whether this plan should be archived. + type: boolean + deleteGuestConversionPod: + description: |- + DeleteGuestConversionPod determines if the guest conversion pod should be deleted after successful migration. + Note: + - If this option is enabled and migration succeeds then the pod will get deleted. However the VM could still not boot and the virt-v2v logs, with additional information, will be deleted alongside guest conversion pod. + - If migration fails the conversion pod will remain present even if this option is enabled. + type: boolean + description: + description: Description + type: string + diskBus: + description: 'Deprecated: this field will be deprecated in 2.8.' + type: string + installLegacyDrivers: + description: |- + InstallLegacyDrivers determines whether to install legacy windows drivers in the VM. + The following Vm's are lack of SHA-2 support and need legacy drivers: + Windows XP (all) + Windows Server 2003 + Windows Vista (all) + Windows Server 2008 + Windows 7 (pre-SP1) + Windows Server 2008 R2 + Behavior: + - If set to nil (unset), the system will automatically detect whether the VM requires legacy drivers + based on its guest OS type (using IsLegacyWindows). + - If set to true, legacy drivers will be installed unconditionally by setting the VIRTIO_WIN environment variable. + - If set to false, legacy drivers will be skipped, and the system will fall back to using the standard (SHA-2 signed) drivers. + + When enabled, legacy drivers are exposed to the virt-v2v conversion process via the VIRTIO_WIN environment variable, + which points to the legacy ISO at /usr/local/virtio-win.iso. + type: boolean + map: + description: Resource mapping. + properties: + network: + description: Network. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + storage: + description: Storage. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + required: + - network + - storage + type: object + migrateSharedDisks: + default: true + description: Determines if the plan should migrate shared disks. + type: boolean + networkNameTemplate: + description: |- + NetworkNameTemplate is a template for generating network interface names in the target virtual machine. + It follows Go template syntax and has access to the following variables: + - .NetworkName: If target network is multus, name of the Multus network attachment definition, empty otherwise. + - .NetworkNamespace: If target network is multus, namespace where the network attachment definition is located. + - .NetworkType: type of the network ("Multus" or "Pod") + - .NetworkIndex: sequential index of the network interface (0-based) + The template can be used to customize network interface names based on target network configuration. + Note: + - This template can be overridden at the individual VM level + - If not specified on VM level and on Plan leverl, default naming conventions will be used + type: string + preserveClusterCpuModel: + description: Preserve the CPU model and flags the VM runs with in its + oVirt cluster. + type: boolean + preserveStaticIPs: + description: Preserve static IPs of VMs in vSphere + type: boolean + provider: + description: Providers. + properties: + destination: + description: Destination. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + source: + description: Source. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + required: + - destination + - source + type: object + pvcNameTemplate: + description: |- + PVCNameTemplate is a template for generating PVC names for VM disks. + It follows Go template syntax and has access to the following variables: + - .VmName: name of the VM + - .PlanName: name of the migration plan + - .DiskIndex: initial volume index of the disk + - .WinDriveLetter: Windows drive letter (lower case, if applicable, e.g. "c", require guest agent) + - .RootDiskIndex: index of the root disk + - .Shared: true if the volume is shared by multiple VMs, false otherwise + - .FileName: name of the file in the source provider (vmWare only, require guest agent) + Note: + This template can be overridden at the individual VM level. + type: string + pvcNameTemplateUseGenerateName: + default: true + description: |- + PVCNameTemplateUseGenerateName indicates if the PVC name template should use generateName instead of name. + Setting this to false will use the name field of the PVCNameTemplate. + This is useful when using a template that generates a name without a suffix. + For example, if the template is "{{.VmName}}-disk-{{.DiskIndex}}", setting this to false will result in + the PVC name being "{{.VmName}}-disk-{{.DiskIndex}}", which may not be unique. + but will be more predictable. + **DANGER** When set to false, the generated PVC name may not be unique and may cause conflicts. + type: boolean + skipGuestConversion: + default: false + description: Determines if the plan should skip the guest conversion. + type: boolean + targetNamespace: + description: Target namespace. + type: string + transferNetwork: + description: The network attachment definition that should be used for + disk transfer. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + useCompatibilityMode: + default: true + description: |- + useCompatibilityMode controls whether to use VirtIO devices when skipGuestConversion is true (Raw Copy mode). + This setting has no effect when skipGuestConversion is false (V2V Conversion always uses VirtIO). + - true (default): Use compatibility devices (SATA bus, E1000E NIC) to ensure bootability + - false: Use high-performance VirtIO devices (requires VirtIO drivers already installed in source VM) + type: boolean + vms: + description: List of VMs. + items: + description: A VM listed on the plan. + properties: + hooks: + description: Enable hooks. + items: + description: Plan hook. + properties: + hook: + description: Hook reference. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + step: + description: Pipeline step. + type: string + required: + - hook + - step + type: object + type: array + id: + description: |- + The object ID. + vsphere: + The managed object ID. + type: string + instanceType: + description: Selected InstanceType that will override the VM properties. + type: string + luks: + description: Disk decryption LUKS keys + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + An object Name. + vsphere: + A qualified name. + type: string + namespace: + description: |- + The VM Namespace + Only relevant for an openshift source. + type: string + networkNameTemplate: + description: |- + NetworkNameTemplate is a template for generating network interface names in the target virtual machine. + It follows Go template syntax and has access to the following variables: + - .NetworkName: If target network is multus, name of the Multus network attachment definition, empty otherwise. + - .NetworkNamespace: If target network is multus, namespace where the network attachment definition is located. + - .NetworkType: type of the network ("Multus" or "Pod") + - .NetworkIndex: sequential index of the network interface (0-based) + The template can be used to customize network interface names based on target network configuration. + Note: + - This template will override at the plan level template + - If not specified on VM level and on Plan leverl, default naming conventions will be used + type: string + pvcNameTemplate: + description: |- + PVCNameTemplate is a template for generating PVC names for VM disks. + It follows Go template syntax and has access to the following variables: + - .VmName: name of the VM + - .PlanName: name of the migration plan + - .DiskIndex: initial volume index of the disk + - .RootDiskIndex: index of the root disk + - .Shared: true if the volume is shared by multiple VMs, false otherwise + Note: + This template overrides the plan level template. + type: string + rootDisk: + description: Choose the primary disk the VM boots from + type: string + targetName: + description: |- + TargetName specifies a custom name for the VM in the target cluster. + If not provided, the original VM name will be used and automatically adjusted to meet k8s DNS1123 requirements. + If provided, this exact name will be used instead. The migration will fail if the name is not unique or already in use. + type: string + type: + description: Type used to qualify the name. + type: string + volumeNameTemplate: + description: |- + VolumeNameTemplate is a template for generating volume interface names in the target virtual machine. + It follows Go template syntax and has access to the following variables: + - .PVCName: name of the PVC mounted to the VM using this volume + - .VolumeIndex: sequential index of the volume interface (0-based) + Note: + - This template will override at the plan level template + - If not specified on VM level and on Plan leverl, default naming conventions will be used + type: string + type: object + type: array + volumeNameTemplate: + description: |- + VolumeNameTemplate is a template for generating volume interface names in the target virtual machine. + It follows Go template syntax and has access to the following variables: + - .PVCName: name of the PVC mounted to the VM using this volume + - .VolumeIndex: sequential index of the volume interface (0-based) + Note: + - This template can be overridden at the individual VM level + - If not specified on VM level and on Plan leverl, default naming conventions will be used + type: string + warm: + description: Whether this is a warm migration. + type: boolean + required: + - map + - provider + - targetNamespace + - vms + type: object + status: + description: PlanStatus defines the observed state of Plan. + properties: + conditions: + description: List of conditions. + items: + description: Condition + properties: + category: + description: The condition category. + type: string + durable: + description: The condition is durable - never un-staged. + type: boolean + items: + description: A list of items referenced in the `Message`. + items: + type: string + type: array + lastTransitionTime: + description: When the last status transition occurred. + format: date-time + type: string + message: + description: The human readable description of the condition. + type: string + reason: + description: The reason for the condition or transition. + type: string + status: + description: The condition status [true,false]. + type: string + type: + description: The condition type. + type: string + required: + - category + - lastTransitionTime + - status + - type + type: object + type: array + migration: + description: Migration + properties: + completed: + description: Completed timestamp. + format: date-time + type: string + history: + description: History + items: + description: Snapshot + properties: + conditions: + description: List of conditions. + items: + description: Condition + properties: + category: + description: The condition category. + type: string + durable: + description: The condition is durable - never un-staged. + type: boolean + items: + description: A list of items referenced in the `Message`. + items: + type: string + type: array + lastTransitionTime: + description: When the last status transition occurred. + format: date-time + type: string + message: + description: The human readable description of the condition. + type: string + reason: + description: The reason for the condition or transition. + type: string + status: + description: The condition status [true,false]. + type: string + type: + description: The condition type. + type: string + required: + - category + - lastTransitionTime + - status + - type + type: object + type: array + map: + description: Map. + properties: + network: + description: Snapshot object reference. + properties: + generation: + format: int64 + type: integer + name: + type: string + namespace: + type: string + uid: + description: |- + UID is a type that holds unique ID values, including UUIDs. Because we + don't ONLY use UUIDs, this is an alias to string. Being a type captures + intent and helps make sure that UIDs and names do not get conflated. + type: string + required: + - generation + - name + - namespace + - uid + type: object + storage: + description: Snapshot object reference. + properties: + generation: + format: int64 + type: integer + name: + type: string + namespace: + type: string + uid: + description: |- + UID is a type that holds unique ID values, including UUIDs. Because we + don't ONLY use UUIDs, this is an alias to string. Being a type captures + intent and helps make sure that UIDs and names do not get conflated. + type: string + required: + - generation + - name + - namespace + - uid + type: object + required: + - network + - storage + type: object + migration: + description: Migration + properties: + generation: + format: int64 + type: integer + name: + type: string + namespace: + type: string + uid: + description: |- + UID is a type that holds unique ID values, including UUIDs. Because we + don't ONLY use UUIDs, this is an alias to string. Being a type captures + intent and helps make sure that UIDs and names do not get conflated. + type: string + required: + - generation + - name + - namespace + - uid + type: object + plan: + description: Plan + properties: + generation: + format: int64 + type: integer + name: + type: string + namespace: + type: string + uid: + description: |- + UID is a type that holds unique ID values, including UUIDs. Because we + don't ONLY use UUIDs, this is an alias to string. Being a type captures + intent and helps make sure that UIDs and names do not get conflated. + type: string + required: + - generation + - name + - namespace + - uid + type: object + provider: + description: Provider + properties: + destination: + description: Snapshot object reference. + properties: + generation: + format: int64 + type: integer + name: + type: string + namespace: + type: string + uid: + description: |- + UID is a type that holds unique ID values, including UUIDs. Because we + don't ONLY use UUIDs, this is an alias to string. Being a type captures + intent and helps make sure that UIDs and names do not get conflated. + type: string + required: + - generation + - name + - namespace + - uid + type: object + source: + description: Snapshot object reference. + properties: + generation: + format: int64 + type: integer + name: + type: string + namespace: + type: string + uid: + description: |- + UID is a type that holds unique ID values, including UUIDs. Because we + don't ONLY use UUIDs, this is an alias to string. Being a type captures + intent and helps make sure that UIDs and names do not get conflated. + type: string + required: + - generation + - name + - namespace + - uid + type: object + required: + - destination + - source + type: object + required: + - map + - migration + - plan + - provider + type: object + type: array + started: + description: Started timestamp. + format: date-time + type: string + vms: + description: VM status + items: + description: VM Status + properties: + completed: + description: Completed timestamp. + format: date-time + type: string + conditions: + description: List of conditions. + items: + description: Condition + properties: + category: + description: The condition category. + type: string + durable: + description: The condition is durable - never un-staged. + type: boolean + items: + description: A list of items referenced in the `Message`. + items: + type: string + type: array + lastTransitionTime: + description: When the last status transition occurred. + format: date-time + type: string + message: + description: The human readable description of the condition. + type: string + reason: + description: The reason for the condition or transition. + type: string + status: + description: The condition status [true,false]. + type: string + type: + description: The condition type. + type: string + required: + - category + - lastTransitionTime + - status + - type + type: object + type: array + error: + description: Errors + properties: + phase: + type: string + reasons: + items: + type: string + type: array + required: + - phase + - reasons + type: object + firmware: + description: The firmware type detected from the OVF file + produced by virt-v2v. + type: string + hooks: + description: Enable hooks. + items: + description: Plan hook. + properties: + hook: + description: Hook reference. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + step: + description: Pipeline step. + type: string + required: + - hook + - step + type: object + type: array + id: + description: |- + The object ID. + vsphere: + The managed object ID. + type: string + instanceType: + description: Selected InstanceType that will override the + VM properties. + type: string + luks: + description: Disk decryption LUKS keys + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + An object Name. + vsphere: + A qualified name. + type: string + namespace: + description: |- + The VM Namespace + Only relevant for an openshift source. + type: string + networkNameTemplate: + description: |- + NetworkNameTemplate is a template for generating network interface names in the target virtual machine. + It follows Go template syntax and has access to the following variables: + - .NetworkName: If target network is multus, name of the Multus network attachment definition, empty otherwise. + - .NetworkNamespace: If target network is multus, namespace where the network attachment definition is located. + - .NetworkType: type of the network ("Multus" or "Pod") + - .NetworkIndex: sequential index of the network interface (0-based) + The template can be used to customize network interface names based on target network configuration. + Note: + - This template will override at the plan level template + - If not specified on VM level and on Plan leverl, default naming conventions will be used + type: string + newName: + description: The new name of the VM after matching DNS1123 + requirements. + type: string + operatingSystem: + description: The Operating System detected by virt-v2v. + type: string + phase: + description: Phase + type: string + pipeline: + description: Migration pipeline. + items: + description: Pipeline step. + properties: + annotations: + additionalProperties: + type: string + description: Annotations. + type: object + completed: + description: Completed timestamp. + format: date-time + type: string + description: + description: Name + type: string + error: + description: Error. + properties: + phase: + type: string + reasons: + items: + type: string + type: array + required: + - phase + - reasons + type: object + name: + description: Name. + type: string + phase: + description: Phase + type: string + progress: + description: Progress. + properties: + completed: + description: Completed units. + format: int64 + type: integer + total: + description: Total units. + format: int64 + type: integer + required: + - completed + - total + type: object + reason: + description: Reason + type: string + started: + description: Started timestamp. + format: date-time + type: string + tasks: + description: Nested tasks. + items: + description: Migration task. + properties: + annotations: + additionalProperties: + type: string + description: Annotations. + type: object + completed: + description: Completed timestamp. + format: date-time + type: string + description: + description: Name + type: string + error: + description: Error. + properties: + phase: + type: string + reasons: + items: + type: string + type: array + required: + - phase + - reasons + type: object + name: + description: Name. + type: string + phase: + description: Phase + type: string + progress: + description: Progress. + properties: + completed: + description: Completed units. + format: int64 + type: integer + total: + description: Total units. + format: int64 + type: integer + required: + - completed + - total + type: object + reason: + description: Reason + type: string + started: + description: Started timestamp. + format: date-time + type: string + required: + - name + - progress + type: object + type: array + required: + - name + - progress + type: object + type: array + pvcNameTemplate: + description: |- + PVCNameTemplate is a template for generating PVC names for VM disks. + It follows Go template syntax and has access to the following variables: + - .VmName: name of the VM + - .PlanName: name of the migration plan + - .DiskIndex: initial volume index of the disk + - .RootDiskIndex: index of the root disk + - .Shared: true if the volume is shared by multiple VMs, false otherwise + Note: + This template overrides the plan level template. + type: string + restorePowerState: + description: Source VM power state before migration. + type: string + rootDisk: + description: Choose the primary disk the VM boots from + type: string + started: + description: Started timestamp. + format: date-time + type: string + targetName: + description: |- + TargetName specifies a custom name for the VM in the target cluster. + If not provided, the original VM name will be used and automatically adjusted to meet k8s DNS1123 requirements. + If provided, this exact name will be used instead. The migration will fail if the name is not unique or already in use. + type: string + type: + description: Type used to qualify the name. + type: string + volumeNameTemplate: + description: |- + VolumeNameTemplate is a template for generating volume interface names in the target virtual machine. + It follows Go template syntax and has access to the following variables: + - .PVCName: name of the PVC mounted to the VM using this volume + - .VolumeIndex: sequential index of the volume interface (0-based) + Note: + - This template will override at the plan level template + - If not specified on VM level and on Plan leverl, default naming conventions will be used + type: string + warm: + description: Warm migration status + properties: + consecutiveFailures: + type: integer + failures: + type: integer + nextPrecopyAt: + format: date-time + type: string + precopies: + items: + description: Precopy durations + properties: + createTaskId: + type: string + deltas: + items: + properties: + deltaId: + type: string + disk: + type: string + required: + - deltaId + - disk + type: object + type: array + end: + format: date-time + type: string + removeTaskId: + type: string + snapshot: + type: string + start: + format: date-time + type: string + type: object + type: array + successes: + type: integer + required: + - consecutiveFailures + - failures + - successes + type: object + required: + - phase + - pipeline + type: object + type: array + type: object + observedGeneration: + description: The most recent generation observed by the controller. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/charts/forklift-operator/templates/provider-crd.yaml b/charts/forklift-operator/templates/provider-crd.yaml new file mode 100644 index 000000000..f7012d6e --- /dev/null +++ b/charts/forklift-operator/templates/provider-crd.yaml @@ -0,0 +1,189 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: providers.forklift.konveyor.io + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +spec: + group: forklift.konveyor.io + names: + kind: Provider + listKind: ProviderList + plural: providers + singular: provider + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.type + name: TYPE + type: string + - jsonPath: .status.phase + name: STATUS + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='ConnectionTestSucceeded')].status + name: CONNECTED + type: string + - jsonPath: .status.conditions[?(@.type=='InventoryCreated')].status + name: INVENTORY + type: string + - jsonPath: .spec.url + name: URL + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: Defines the desired state of Provider. + properties: + secret: + description: |- + References a secret containing credentials and + other confidential information. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + settings: + additionalProperties: + type: string + description: Provider settings. + type: object + type: + description: Provider type. + type: string + url: + description: |- + The provider URL. + Empty may be used for the `host` provider. + type: string + required: + - secret + - type + type: object + status: + description: ProviderStatus defines the observed state of Provider + properties: + conditions: + description: List of conditions. + items: + description: Condition + properties: + category: + description: The condition category. + type: string + durable: + description: The condition is durable - never un-staged. + type: boolean + items: + description: A list of items referenced in the `Message`. + items: + type: string + type: array + lastTransitionTime: + description: When the last status transition occurred. + format: date-time + type: string + message: + description: The human readable description of the condition. + type: string + reason: + description: The reason for the condition or transition. + type: string + status: + description: The condition status [true,false]. + type: string + type: + description: The condition type. + type: string + required: + - category + - lastTransitionTime + - status + - type + type: object + type: array + fingerprint: + description: Fingerprint. + type: string + observedGeneration: + description: The most recent generation observed by the controller. + format: int64 + type: integer + phase: + description: Current life cycle phase of the provider. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/charts/forklift-operator/templates/serviceaccount.yaml b/charts/forklift-operator/templates/serviceaccount.yaml new file mode 100644 index 000000000..99e311ab --- /dev/null +++ b/charts/forklift-operator/templates/serviceaccount.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: forklift-controller + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +automountServiceAccountToken: true +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: forklift-api + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +automountServiceAccountToken: true +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: forklift-populator-controller + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +automountServiceAccountToken: true +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: forklift-operator + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +automountServiceAccountToken: true diff --git a/charts/forklift-operator/templates/storagemap-crd.yaml b/charts/forklift-operator/templates/storagemap-crd.yaml new file mode 100644 index 000000000..3663a517 --- /dev/null +++ b/charts/forklift-operator/templates/storagemap-crd.yaml @@ -0,0 +1,317 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: storagemaps.forklift.konveyor.io + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +spec: + group: forklift.konveyor.io + names: + kind: StorageMap + listKind: StorageMapList + plural: storagemaps + singular: storagemap + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: Storage map spec. + properties: + map: + description: Map. + items: + description: Mapped storage. + properties: + destination: + description: Destination storage. + properties: + accessMode: + description: Access mode. + enum: + - ReadWriteOnce + - ReadWriteMany + - ReadOnlyMany + type: string + storageClass: + description: A storage class. + type: string + volumeMode: + description: Volume mode. + enum: + - Filesystem + - Block + type: string + required: + - storageClass + type: object + offloadPlugin: + description: Offload Plugin + properties: + vsphereXcopyConfig: + description: |- + VSphereXcopyPluginConfig works with the Vsphere Xcopy Volume Populator + to offload the copy to Vsphere and the storage array. + properties: + secretRef: + description: |- + SecretRef is the name of the secret with the storage credentials for the plugin. + The secret should reside in the same namespace where the source provider is. + type: string + storageVendorProduct: + description: StorageVendorProduct the string identifier + of the storage vendor product + enum: + - vantara + - ontap + - primera3par + - pureFlashArray + - powerflex + type: string + required: + - secretRef + - storageVendorProduct + type: object + required: + - vsphereXcopyConfig + type: object + source: + description: Source storage. + properties: + id: + description: |- + The object ID. + vsphere: + The managed object ID. + type: string + name: + description: |- + An object Name. + vsphere: + A qualified name. + type: string + namespace: + description: |- + The VM Namespace + Only relevant for an openshift source. + type: string + type: + description: Type used to qualify the name. + type: string + type: object + required: + - destination + - source + type: object + type: array + provider: + description: Provider + properties: + destination: + description: Destination. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + source: + description: Source. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + required: + - destination + - source + type: object + required: + - map + - provider + type: object + status: + description: MapStatus defines the observed state of Maps. + properties: + conditions: + description: List of conditions. + items: + description: Condition + properties: + category: + description: The condition category. + type: string + durable: + description: The condition is durable - never un-staged. + type: boolean + items: + description: A list of items referenced in the `Message`. + items: + type: string + type: array + lastTransitionTime: + description: When the last status transition occurred. + format: date-time + type: string + message: + description: The human readable description of the condition. + type: string + reason: + description: The reason for the condition or transition. + type: string + status: + description: The condition status [true,false]. + type: string + type: + description: The condition type. + type: string + required: + - category + - lastTransitionTime + - status + - type + type: object + type: array + observedGeneration: + description: The most recent generation observed by the controller. + format: int64 + type: integer + references: + items: + description: |- + Source reference. + Either the ID or Name must be specified. + properties: + id: + description: |- + The object ID. + vsphere: + The managed object ID. + type: string + name: + description: |- + An object Name. + vsphere: + A qualified name. + type: string + namespace: + description: |- + The VM Namespace + Only relevant for an openshift source. + type: string + type: + description: Type used to qualify the name. + type: string + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/charts/forklift-operator/templates/vspherexcopyvolumepopulator-crd.yaml b/charts/forklift-operator/templates/vspherexcopyvolumepopulator-crd.yaml new file mode 100644 index 000000000..0b57732d --- /dev/null +++ b/charts/forklift-operator/templates/vspherexcopyvolumepopulator-crd.yaml @@ -0,0 +1,81 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: vspherexcopyvolumepopulators.forklift.konveyor.io + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + labels: + {{- include "forklift-operator.labels" . | nindent 4 }} +spec: + group: forklift.konveyor.io + names: + kind: VSphereXcopyVolumePopulator + listKind: VSphereXcopyVolumePopulatorList + plural: vspherexcopyvolumepopulators + shortNames: + - vxvp + - vxvps + singular: vspherexcopyvolumepopulator + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + properties: + secretName: + description: The secret name with vsphere and storage credentials + type: string + storageVendorProduct: + description: |- + StorageVendorProduct is the storage vendor the target disk and PVC are connected to + Supported values [vantara, ontap, primera3par] + type: string + vmId: + description: VmId is the VM object id in vSphere + type: string + vmdkPath: + description: |- + VmdkPath is the full path the vmdk disk. A valid path format is + '[] /.vmdk' + type: string + required: + - secretName + - storageVendorProduct + - vmId + - vmdkPath + type: object + status: + properties: + progress: + type: string + type: object + required: + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/charts/forklift-operator/values.yaml b/charts/forklift-operator/values.yaml new file mode 100644 index 000000000..3be24de6 --- /dev/null +++ b/charts/forklift-operator/values.yaml @@ -0,0 +1,35 @@ +forkliftOperatorAnsible: + forkliftOperator: + repo: rancher + tag: latest + operatorImage: nginx + args: + - --health-probe-bind-address=:6789 + - --metrics-bind-address=127.0.0.1:8080 + - --leader-elect + - --leader-election-id=forklift-operator + env: + ansibleGathering: explicit + blockOverhead: "" + cdiExportTokenTtl: "" + cleanupRetries: "" + filesystemOverhead: "" + ovirtOsMap: "" + snapshotRemovalTimeout: "" + snapshotStatusCheckRate: "" + virtCustomizeMap: "" + virtV2VDontRequestKvm: "" + vsphereOsMap: "" + vsphereXcopyVolumePopulatorImage: "" + imagePullPolicy: IfNotPresent + resources: + requests: + cpu: 10m + memory: 64Mi + nodeSelector: {} + replicas: 1 + tolerations: [] + topologySpreadConstraints: [] +kubernetesClusterDomain: cluster.local +nameOverride: "" +fullnameOverride: "" diff --git a/tests/ct-install.yaml b/tests/ct-install.yaml new file mode 100644 index 000000000..a10a389a --- /dev/null +++ b/tests/ct-install.yaml @@ -0,0 +1,7 @@ +remote: upstream +target-branch: master +chart-dirs: + - charts +excluded-charts: + - forklift-operator + - harvester-csi-driver-lvm \ No newline at end of file