This repository has been archived by the owner on Mar 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add localuploadproxy crd to import local image to pvc - add local source to vmim
- Loading branch information
Showing
23 changed files
with
966 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
230 changes: 230 additions & 0 deletions
230
deploy/crds/hypercloud.tmaxanc.com_localuploadproxies_crd.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,230 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: localuploadproxies.hypercloud.tmaxanc.com | ||
spec: | ||
additionalPrinterColumns: | ||
- JSONPath: .status.conditions[0].status | ||
description: Current status of LocalUploadProxy | ||
name: ReadyToUse | ||
type: string | ||
- JSONPath: .status.command | ||
description: Command used for image upload | ||
name: Command | ||
type: string | ||
group: hypercloud.tmaxanc.com | ||
names: | ||
kind: LocalUploadProxy | ||
listKind: LocalUploadProxyList | ||
plural: localuploadproxies | ||
shortNames: | ||
- lup | ||
singular: localuploadproxy | ||
scope: Namespaced | ||
subresources: | ||
status: {} | ||
validation: | ||
openAPIV3Schema: | ||
description: LocalUploadProxy is the Schema for the localuploadproxies 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: LocalUploadProxySpec defines the desired state of LocalUploadProxy | ||
properties: | ||
pvc: | ||
description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster | ||
Important: Run "operator-sdk generate k8s" to regenerate code after | ||
modifying this file Add custom validation using kubebuilder tags: | ||
https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html' | ||
properties: | ||
accessModes: | ||
description: 'AccessModes contains the desired access modes the | ||
volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' | ||
items: | ||
type: string | ||
type: array | ||
dataSource: | ||
description: This field requires the VolumeSnapshotDataSource alpha | ||
feature gate to be enabled and currently VolumeSnapshot is the | ||
only supported data source. If the provisioner can support VolumeSnapshot | ||
data source, it will create a new volume and data will be restored | ||
to the volume at the same time. If the provisioner does not support | ||
VolumeSnapshot data source, volume will not be created and the | ||
failure will be reported as an event. In the future, we plan to | ||
support more data source types and the behavior of the provisioner | ||
may change. | ||
properties: | ||
apiGroup: | ||
description: APIGroup is the group for the resource being referenced. | ||
If APIGroup is not specified, the specified Kind must be in | ||
the core API group. For any other third-party types, APIGroup | ||
is required. | ||
type: string | ||
kind: | ||
description: Kind is the type of resource being referenced | ||
type: string | ||
name: | ||
description: Name is the name of resource being referenced | ||
type: string | ||
required: | ||
- kind | ||
- name | ||
type: object | ||
resources: | ||
description: 'Resources represents the minimum resources the volume | ||
should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' | ||
properties: | ||
limits: | ||
additionalProperties: | ||
anyOf: | ||
- type: integer | ||
- type: string | ||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ | ||
x-kubernetes-int-or-string: true | ||
description: 'Limits describes the maximum amount of compute | ||
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' | ||
type: object | ||
requests: | ||
additionalProperties: | ||
anyOf: | ||
- type: integer | ||
- type: string | ||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ | ||
x-kubernetes-int-or-string: true | ||
description: 'Requests describes the minimum amount of compute | ||
resources required. If Requests is omitted for a container, | ||
it defaults to Limits if that is explicitly specified, otherwise | ||
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' | ||
type: object | ||
type: object | ||
selector: | ||
description: A label query over volumes to consider for binding. | ||
properties: | ||
matchExpressions: | ||
description: matchExpressions is a list of label selector requirements. | ||
The requirements are ANDed. | ||
items: | ||
description: A label selector requirement is a selector that | ||
contains values, a key, and an operator that relates the | ||
key and values. | ||
properties: | ||
key: | ||
description: key is the label key that the selector applies | ||
to. | ||
type: string | ||
operator: | ||
description: operator represents a key's relationship | ||
to a set of values. Valid operators are In, NotIn, Exists | ||
and DoesNotExist. | ||
type: string | ||
values: | ||
description: values is an array of string values. If the | ||
operator is In or NotIn, the values array must be non-empty. | ||
If the operator is Exists or DoesNotExist, the values | ||
array must be empty. This array is replaced during a | ||
strategic merge patch. | ||
items: | ||
type: string | ||
type: array | ||
required: | ||
- key | ||
- operator | ||
type: object | ||
type: array | ||
matchLabels: | ||
additionalProperties: | ||
type: string | ||
description: matchLabels is a map of {key,value} pairs. A single | ||
{key,value} in the matchLabels map is equivalent to an element | ||
of matchExpressions, whose key field is "key", the operator | ||
is "In", and the values array contains only "value". The requirements | ||
are ANDed. | ||
type: object | ||
type: object | ||
storageClassName: | ||
description: 'Name of the StorageClass required by the claim. More | ||
info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' | ||
type: string | ||
volumeMode: | ||
description: volumeMode defines what type of volume is required | ||
by the claim. Value of Filesystem is implied when not included | ||
in claim spec. This is a beta feature. | ||
type: string | ||
volumeName: | ||
description: VolumeName is the binding reference to the PersistentVolume | ||
backing this claim. | ||
type: string | ||
type: object | ||
required: | ||
- pvc | ||
type: object | ||
status: | ||
description: LocalUploadProxyStatus defines the observed state of LocalUploadProxy | ||
properties: | ||
command: | ||
type: string | ||
conditions: | ||
description: Conditions indicate current conditions of LocalUploadProxy | ||
items: | ||
description: Condition indicates observed condition of an object | ||
properties: | ||
lastTransitionTime: | ||
description: Last time the condition transitioned from one status | ||
to another. This should be when the underlying condition changed. If | ||
that is not known, then using the time when the API field changed | ||
is acceptable. | ||
format: date-time | ||
type: string | ||
message: | ||
description: A human readable message indicating details about | ||
the transition. This field may be empty. | ||
type: string | ||
observedGeneration: | ||
description: If set, this represents the .metadata.generation | ||
that the condition was set based upon. For instance, if .metadata.generation | ||
is currently 12, but the .status.condition[x].observedGeneration | ||
is 9, the condition is out of date with respect to the current | ||
state of the instance. | ||
format: int64 | ||
type: integer | ||
reason: | ||
description: The reason for the condition's last transition in | ||
CamelCase. The specific API may choose whether or not this field | ||
is considered a guaranteed API. This field may not be empty. | ||
type: string | ||
status: | ||
description: Status of the condition, one of True, False, Unknown. | ||
type: string | ||
type: | ||
description: Type of condition in CamelCase or in foo.example.com/CamelCase. | ||
Many .condition.type values are consistent across resources | ||
like Available, but because arbitrary conditions can be useful | ||
(see .node.status.conditions), the ability to deconflict is | ||
important. | ||
type: string | ||
required: | ||
- lastTransitionTime | ||
- message | ||
- reason | ||
- status | ||
- type | ||
type: object | ||
type: array | ||
type: object | ||
type: object | ||
version: v1alpha1 | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true |
13 changes: 13 additions & 0 deletions
13
deploy/crds/hypercloud.tmaxanc.com_v1alpha1_localuploadproxy_cr.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: hypercloud.tmaxanc.com/v1alpha1 | ||
kind: LocalUploadProxy | ||
metadata: | ||
name: myubuntu | ||
spec: | ||
pvc: | ||
volumeMode: Block | ||
accessModes: | ||
- ReadWriteMany | ||
resources: | ||
requests: | ||
storage: "3Gi" | ||
storageClassName: rook-ceph-block |
10 changes: 10 additions & 0 deletions
10
deploy/crds/hypercloud.tmaxanc.com_v1alpha1_virtualmachineimage_local_cr.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: hypercloud.tmaxanc.com/v1alpha1 | ||
kind: VirtualMachineImage | ||
metadata: | ||
name: localvmim | ||
spec: | ||
source: | ||
# The name of the localUploadProxy used when uploading the raw image | ||
local: myubuntu | ||
# The name of the snapshotClass to be used for provisioning snapshots | ||
snapshotClassName: csi-rbdplugin-snapclass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.