Skip to content

Commit

Permalink
Changed CRD version back to v1beta1 for supporting vsphere plugin in …
Browse files Browse the repository at this point in the history
…pre-1.16 k8s clusters (#243) (#244)

Signed-off-by: Lintong Jiang <[email protected]>
  • Loading branch information
Lintong Jiang authored Dec 4, 2020
1 parent 8c8c4cb commit bcb106c
Show file tree
Hide file tree
Showing 18 changed files with 464 additions and 490 deletions.
8 changes: 4 additions & 4 deletions hack/crd-gen/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion hack/update-generated-crd-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ${GOPATH}/src/k8s.io/code-generator/generate-groups.sh \

controller-gen \
crd \
crd:crdVersions=v1 \
crd:crdVersions=v1beta1 \
output:dir=pkg/generated/crds/manifests \
paths=./pkg/apis/...

Expand Down
2 changes: 1 addition & 1 deletion pkg/generated/clientset/versioned/fake/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions pkg/generated/crds/crds.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

---
apiVersion: apiextensions.k8s.io/v1
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
Expand All @@ -15,40 +15,41 @@ spec:
plural: backuprepositories
singular: backuprepository
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ' BackupRepository is a cluster-scoped resource. It is controlled by the Backup Driver and referenced by Snapshot, CloneFromSnapshot and Delete. The BackupRespository resource contains the credential for a backup repository. The RepositoryDriver defines the driver that will be used to talk to the repository Only Snapshot,etc. CRs from namespaces that are listed in AllowedNamespaces will be acted on, if the namespace is not in AllowedNamespaces the operation will fail.'
properties:
allowedNamespaces:
items:
type: string
type: array
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
backupRepositoryClaim:
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'
validation:
openAPIV3Schema:
description: ' BackupRepository is a cluster-scoped resource. It is controlled by the Backup Driver and referenced by Snapshot, CloneFromSnapshot and Delete. The BackupRespository resource contains the credential for a backup repository. The RepositoryDriver defines the driver that will be used to talk to the repository Only Snapshot,etc. CRs from namespaces that are listed in AllowedNamespaces will be acted on, if the namespace is not in AllowedNamespaces the operation will fail.'
properties:
allowedNamespaces:
items:
type: string
metadata:
type: object
repopsitoryParameters:
additionalProperties:
type: string
type: object
repositoryDriver:
type: array
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
backupRepositoryClaim:
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
repopsitoryParameters:
additionalProperties:
type: string
svcBackupRepositoryName:
type: string
required:
- allowedNamespaces
- backupRepositoryClaim
- repopsitoryParameters
- repositoryDriver
type: object
type: object
repositoryDriver:
type: string
svcBackupRepositoryName:
type: string
required:
- allowedNamespaces
- backupRepositoryClaim
- repopsitoryParameters
- repositoryDriver
type: object
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
status:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

---
apiVersion: apiextensions.k8s.io/v1
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
Expand All @@ -15,36 +15,37 @@ spec:
plural: backuprepositoryclaims
singular: backuprepositoryclaim
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ' BackupRepositoryClaim is used to define/access a BackupRepository. A new BackupRepository will be created with the RepositoryDriver, Credential and AllowedNamespaces will either be the namespace that the BackupRepositorySpec was created in or the AllowedNamespaces specified in the BackupRepositorySpec. The BackupRepository field will be updated with the name of the BackupRepository created.'
properties:
allowedNamespaces:
items:
type: string
type: array
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
backupRepository:
validation:
openAPIV3Schema:
description: ' BackupRepositoryClaim is used to define/access a BackupRepository. A new BackupRepository will be created with the RepositoryDriver, Credential and AllowedNamespaces will either be the namespace that the BackupRepositorySpec was created in or the AllowedNamespaces specified in the BackupRepositorySpec. The BackupRepository field will be updated with the name of the BackupRepository created.'
properties:
allowedNamespaces:
items:
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: array
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
backupRepository:
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
repopsitoryParameters:
additionalProperties:
type: string
metadata:
type: object
repopsitoryParameters:
additionalProperties:
type: string
type: object
repositoryDriver:
type: string
required:
- repopsitoryParameters
- repositoryDriver
type: object
type: object
repositoryDriver:
type: string
required:
- repopsitoryParameters
- repositoryDriver
type: object
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
status:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

---
apiVersion: apiextensions.k8s.io/v1
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
Expand All @@ -15,84 +15,85 @@ spec:
plural: clonefromsnapshots
singular: clonefromsnapshot
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: ' CloneFromSnapshot is used to create a new resource (typically a PVC) from a snapshot. Once the Snapshot''s Phase has moved to Snapshotted it is valid to create a new resource from the snapshot ID'
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: CloneFromSnapshotSpec specifies an object to be cloned from a snapshot ID. The Metadata may be overridden, the format of the metadata is object specific. APIGroup and Kind specify the type of object to create.
properties:
apiGroup:
description: APIGroup of the resource being created
type: string
backupRepository:
description: The backup repository to retrieve the snapshot from. The namespace the Snapshot/PVC lives in must have access to the repository
type: string
cloneCancel:
description: SnapshotCancel indicates request to cancel ongoing snapshot. SnapshotCancel can be set at anytime before the snapshot reaches a terminal phase. If the snapshot has reached a terminal phase
type: boolean
kind:
description: Kind is the type of resource being created
type: string
metadata:
format: byte
type: string
snapshotID:
type: string
required:
- apiGroup
- backupRepository
- cloneCancel
- kind
- snapshotID
type: object
status:
properties:
completionTimestamp:
description: CompletionTimestamp records the time an snapshot was completed. The server's time is used for CompletionTimestamps
format: date-time
nullable: true
type: string
message:
description: Message is a message about the clone's status.
type: string
phase:
description: Phase is the current state of the CloneFromSnapshot.
type: string
resourceHandle:
description: The handle of the resource that was cloned from the snapshot
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
type: object
required:
- spec
type: object
version: v1alpha1
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ' CloneFromSnapshot is used to create a new resource (typically a PVC) from a snapshot. Once the Snapshot''s Phase has moved to Snapshotted it is valid to create a new resource from the snapshot ID'
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: CloneFromSnapshotSpec specifies an object to be cloned from a snapshot ID. The Metadata may be overridden, the format of the metadata is object specific. APIGroup and Kind specify the type of object to create.
properties:
apiGroup:
description: APIGroup of the resource being created
type: string
backupRepository:
description: The backup repository to retrieve the snapshot from. The namespace the Snapshot/PVC lives in must have access to the repository
type: string
cloneCancel:
description: SnapshotCancel indicates request to cancel ongoing snapshot. SnapshotCancel can be set at anytime before the snapshot reaches a terminal phase. If the snapshot has reached a terminal phase
type: boolean
kind:
description: Kind is the type of resource being created
type: string
metadata:
format: byte
type: string
snapshotID:
type: string
required:
- apiGroup
- backupRepository
- cloneCancel
- kind
- snapshotID
type: object
status:
properties:
completionTimestamp:
description: CompletionTimestamp records the time an snapshot was completed. The server's time is used for CompletionTimestamps
format: date-time
nullable: true
type: string
message:
description: Message is a message about the clone's status.
type: string
phase:
description: Phase is the current state of the CloneFromSnapshot.
type: string
resourceHandle:
description: The handle of the resource that was cloned from the snapshot
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
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
Expand Down
Loading

0 comments on commit bcb106c

Please sign in to comment.