From 7680931f883845d0d3b517ee82a6292281d4932d Mon Sep 17 00:00:00 2001 From: Phan Le Date: Tue, 7 Mar 2023 16:39:36 -0800 Subject: [PATCH] Update chart for new AD refactoring longhorn-3715 Signed-off-by: Phan Le --- chart/templates/clusterrole.yaml | 3 +- chart/templates/crds.yaml | 149 +++++++++++++++++++++++++++-- deploy/longhorn.yaml | 156 +++++++++++++++++++++++++++++-- 3 files changed, 288 insertions(+), 20 deletions(-) diff --git a/chart/templates/clusterrole.yaml b/chart/templates/clusterrole.yaml index bf28a47..e652a34 100644 --- a/chart/templates/clusterrole.yaml +++ b/chart/templates/clusterrole.yaml @@ -41,7 +41,8 @@ rules: "backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status", "backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status", "recurringjobs", "recurringjobs/status", "orphans", "orphans/status", "snapshots", "snapshots/status", - "supportbundles", "supportbundles/status", "systembackups", "systembackups/status", "systemrestores", "systemrestores/status"] + "supportbundles", "supportbundles/status", "systembackups", "systembackups/status", "systemrestores", "systemrestores/status", + "volumeattachments", "volumeattachments/status"] verbs: ["*"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] diff --git a/chart/templates/crds.yaml b/chart/templates/crds.yaml index 2ee3f1f..3206e53 100644 --- a/chart/templates/crds.yaml +++ b/chart/templates/crds.yaml @@ -3322,15 +3322,15 @@ spec: type: string backingImage: type: string - baseImage: - description: Deprecated. Rename to BackingImage - type: string backupCompressionMethod: enum: - none - lz4 - gzip type: string + baseImage: + description: Deprecated. Rename to BackingImage + type: string dataLocality: enum: - disabled @@ -3351,12 +3351,6 @@ spec: type: string fromBackup: type: string - restoreVolumeRecurringJob: - enum: - - ignored - - enabled - - disabled - type: string frontend: enum: - blockdev @@ -3431,6 +3425,12 @@ spec: - enabled - disabled type: string + restoreVolumeRecurringJob: + enum: + - ignored + - enabled + - disabled + type: string revisionCounterDisabled: type: boolean size: @@ -3493,6 +3493,9 @@ spec: type: array currentImage: type: string + currentMigrationNodeID: + description: the node that this volume is currently migrating to + type: string currentNodeID: type: string expansionRequired: @@ -3541,6 +3544,7 @@ spec: ownerID: type: string pendingNodeID: + description: Deprecated. type: string remountRequestedAt: type: string @@ -3568,3 +3572,130 @@ status: plural: "" conditions: [] storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.7.0 + creationTimestamp: null + labels: {{- include "longhorn.labels" . | nindent 4 }} + longhorn-manager: "" + name: volumeattachments.longhorn.io +spec: + group: longhorn.io + names: + kind: VolumeAttachment + listKind: VolumeAttachmentList + plural: volumeattachments + shortNames: + - lhva + singular: volumeattachment + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: VolumeAttachment stores attachment information of a Longhorn volume + 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: VolumeAttachmentSpec defines the desired state of Longhorn VolumeAttachment + properties: + attachmentTickets: + additionalProperties: + properties: + generation: + description: A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. + format: int64 + type: integer + id: + description: The unique ID of this attachment. Used to differentiate different attachments of the same volume. + type: string + nodeID: + description: The node that this attachment is requesting + type: string + parameters: + additionalProperties: + type: string + description: Optional additional parameter for this attachment + type: object + type: + type: string + type: object + type: object + volume: + description: The name of Longhorn volume of this VolumeAttachment + type: string + required: + - volume + type: object + status: + description: VolumeAttachmentStatus defines the observed state of Longhorn VolumeAttachment + properties: + attachmentTicketStatuses: + additionalProperties: + properties: + conditions: + description: Record any error when trying to fulfill this attachment + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. Can be True, False, Unknown. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + nullable: true + type: array + generation: + description: A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. + format: int64 + type: integer + id: + description: The unique ID of this attachment. Used to differentiate different attachments of the same volume. + type: string + satisfied: + description: Indicate whether this attachment ticket has been satisfied + type: boolean + required: + - conditions + - satisfied + type: object + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/deploy/longhorn.yaml b/deploy/longhorn.yaml index 54533b9..ae9d642 100644 --- a/deploy/longhorn.yaml +++ b/deploy/longhorn.yaml @@ -3470,15 +3470,15 @@ spec: type: string backingImage: type: string - baseImage: - description: Deprecated. Rename to BackingImage - type: string backupCompressionMethod: enum: - none - lz4 - gzip type: string + baseImage: + description: Deprecated. Rename to BackingImage + type: string dataLocality: enum: - disabled @@ -3499,12 +3499,6 @@ spec: type: string fromBackup: type: string - restoreVolumeRecurringJob: - enum: - - ignored - - enabled - - disabled - type: string frontend: enum: - blockdev @@ -3579,6 +3573,12 @@ spec: - enabled - disabled type: string + restoreVolumeRecurringJob: + enum: + - ignored + - enabled + - disabled + type: string revisionCounterDisabled: type: boolean size: @@ -3641,6 +3641,9 @@ spec: type: array currentImage: type: string + currentMigrationNodeID: + description: the node that this volume is currently migrating to + type: string currentNodeID: type: string expansionRequired: @@ -3689,6 +3692,7 @@ spec: ownerID: type: string pendingNodeID: + description: Deprecated. type: string remountRequestedAt: type: string @@ -3717,6 +3721,137 @@ status: conditions: [] storedVersions: [] --- +# Source: longhorn/templates/crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.7.0 + creationTimestamp: null + labels: + app.kubernetes.io/name: longhorn + app.kubernetes.io/instance: longhorn + app.kubernetes.io/version: v1.4.0-dev + longhorn-manager: "" + name: volumeattachments.longhorn.io +spec: + group: longhorn.io + names: + kind: VolumeAttachment + listKind: VolumeAttachmentList + plural: volumeattachments + shortNames: + - lhva + singular: volumeattachment + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: VolumeAttachment stores attachment information of a Longhorn volume + 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: VolumeAttachmentSpec defines the desired state of Longhorn VolumeAttachment + properties: + attachmentTickets: + additionalProperties: + properties: + generation: + description: A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. + format: int64 + type: integer + id: + description: The unique ID of this attachment. Used to differentiate different attachments of the same volume. + type: string + nodeID: + description: The node that this attachment is requesting + type: string + parameters: + additionalProperties: + type: string + description: Optional additional parameter for this attachment + type: object + type: + type: string + type: object + type: object + volume: + description: The name of Longhorn volume of this VolumeAttachment + type: string + required: + - volume + type: object + status: + description: VolumeAttachmentStatus defines the observed state of Longhorn VolumeAttachment + properties: + attachmentTicketStatuses: + additionalProperties: + properties: + conditions: + description: Record any error when trying to fulfill this attachment + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. Can be True, False, Unknown. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + nullable: true + type: array + generation: + description: A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. + format: int64 + type: integer + id: + description: The unique ID of this attachment. Used to differentiate different attachments of the same volume. + type: string + satisfied: + description: Indicate whether this attachment ticket has been satisfied + type: boolean + required: + - conditions + - satisfied + type: object + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- # Source: longhorn/templates/clusterrole.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -3764,7 +3899,8 @@ rules: "backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status", "backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status", "recurringjobs", "recurringjobs/status", "orphans", "orphans/status", "snapshots", "snapshots/status", - "supportbundles", "supportbundles/status", "systembackups", "systembackups/status", "systemrestores", "systemrestores/status"] + "supportbundles", "supportbundles/status", "systembackups", "systembackups/status", "systemrestores", "systemrestores/status", + "volumeattachments", "volumeattachments/status"] verbs: ["*"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"]