Update chart for label-driven recurring job
Longhorn-467 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
This commit is contained in:
parent
13dc719ebb
commit
8dca77621d
@ -504,17 +504,17 @@ Warning: This option works only when there is a failed replica in the volume. An
|
|||||||
min: 1
|
min: 1
|
||||||
max: 10
|
max: 10
|
||||||
default: 3
|
default: 3
|
||||||
- variable: persistence.recurringJobs.enable
|
- variable: persistence.recurringJobSelector.enable
|
||||||
description: "Enable recurring job for Longhorn StorageClass"
|
description: "Enable recurring job selector for Longhorn StorageClass"
|
||||||
group: "Longhorn Storage Class Settings"
|
group: "Longhorn Storage Class Settings"
|
||||||
label: Enable Storage Class Recurring Job
|
label: Enable Storage Class Recurring Job Selector
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
show_subquestion_if: true
|
show_subquestion_if: true
|
||||||
subquestions:
|
subquestions:
|
||||||
- variable: persistence.recurringJobs.jobList
|
- variable: persistence.recurringJobSelector.jobList
|
||||||
description: 'Recurring job list for Longhorn StorageClass. Please be careful of quotes of input. e.g., [{"name":"backup", "task":"backup", "cron":"*/2 * * * *", "retain":1,"labels": {"interval":"2m"}}]'
|
description: 'Recurring job selector list for Longhorn StorageClass. Please be careful of quotes of input. e.g., [{"name":"backup", "isGroup":true}]'
|
||||||
label: Storage Class Recurring Job List
|
label: Storage Class Recurring Job Selector List
|
||||||
group: "Longhorn Storage Class Settings"
|
group: "Longhorn Storage Class Settings"
|
||||||
type: string
|
type: string
|
||||||
default:
|
default:
|
||||||
|
@ -39,7 +39,8 @@ rules:
|
|||||||
"engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status",
|
"engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status",
|
||||||
"sharemanagers", "sharemanagers/status", "backingimages", "backingimages/status",
|
"sharemanagers", "sharemanagers/status", "backingimages", "backingimages/status",
|
||||||
"backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status",
|
"backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status",
|
||||||
"backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status"]
|
"backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status",
|
||||||
|
"recurringjobs", "recurringjobs/status"]
|
||||||
verbs: ["*"]
|
verbs: ["*"]
|
||||||
- apiGroups: ["coordination.k8s.io"]
|
- apiGroups: ["coordination.k8s.io"]
|
||||||
resources: ["leases"]
|
resources: ["leases"]
|
||||||
|
@ -671,4 +671,84 @@ spec:
|
|||||||
type: string
|
type: string
|
||||||
description: The backup last synced time
|
description: The backup last synced time
|
||||||
jsonPath: .status.lastSyncedAt
|
jsonPath: .status.lastSyncedAt
|
||||||
---
|
---
|
||||||
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
longhorn-manager: RecurringJob
|
||||||
|
name: recurringjobs.longhorn.io
|
||||||
|
spec:
|
||||||
|
group: longhorn.io
|
||||||
|
names:
|
||||||
|
kind: RecurringJob
|
||||||
|
listKind: RecurringJobList
|
||||||
|
plural: recurringjobs
|
||||||
|
shortNames:
|
||||||
|
- lhrj
|
||||||
|
singular: recurringjob
|
||||||
|
scope: Namespaced
|
||||||
|
versions:
|
||||||
|
- name: v1beta1
|
||||||
|
served: true
|
||||||
|
storage: true
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
spec:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
groups:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
task:
|
||||||
|
type: string
|
||||||
|
pattern: "^snapshot|backup$"
|
||||||
|
cron:
|
||||||
|
type: string
|
||||||
|
retain:
|
||||||
|
type: integer
|
||||||
|
concurrency:
|
||||||
|
type: integer
|
||||||
|
labels:
|
||||||
|
x-kubernetes-preserve-unknown-fields: true
|
||||||
|
status:
|
||||||
|
x-kubernetes-preserve-unknown-fields: true
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
|
additionalPrinterColumns:
|
||||||
|
- name: Groups
|
||||||
|
type: string
|
||||||
|
description: Sets groupings to the jobs. When set to "default" group will be added to the volume label when no other job label exist in volume.
|
||||||
|
jsonPath: .spec.groups
|
||||||
|
- name: Task
|
||||||
|
type: string
|
||||||
|
description: Should be one of "backup" or "snapshot".
|
||||||
|
jsonPath: .spec.task
|
||||||
|
- name: Cron
|
||||||
|
type: string
|
||||||
|
description: The cron expression represents recurring job scheduling.
|
||||||
|
jsonPath: .spec.cron
|
||||||
|
- name: Retain
|
||||||
|
type: integer
|
||||||
|
description: The number of snapshots/backups to keep for the volume.
|
||||||
|
jsonPath: .spec.retain
|
||||||
|
- name: Concurrency
|
||||||
|
type: integer
|
||||||
|
description: The concurrent job to run by each cron job.
|
||||||
|
jsonPath: .spec.concurrency
|
||||||
|
- name: Age
|
||||||
|
type: date
|
||||||
|
jsonPath: .metadata.creationTimestamp
|
||||||
|
- name: Labels
|
||||||
|
type: string
|
||||||
|
description: Specify the labels
|
||||||
|
jsonPath: .spec.labels
|
||||||
|
---
|
||||||
|
@ -21,6 +21,6 @@ data:
|
|||||||
staleReplicaTimeout: "30"
|
staleReplicaTimeout: "30"
|
||||||
fromBackup: ""
|
fromBackup: ""
|
||||||
backingImage: ""
|
backingImage: ""
|
||||||
{{- if .Values.persistence.recurringJobs.enable }}
|
{{- if .Values.persistence.recurringJobSelector.enable }}
|
||||||
recurringJobs: '{{ .Values.persistence.recurringJobs.jobList }}'
|
recurringJobSelector: '{{ .Values.persistence.recurringJobSelector.jobList }}'
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -55,7 +55,7 @@ persistence:
|
|||||||
defaultClass: true
|
defaultClass: true
|
||||||
defaultClassReplicaCount: 3
|
defaultClassReplicaCount: 3
|
||||||
reclaimPolicy: Delete
|
reclaimPolicy: Delete
|
||||||
recurringJobs:
|
recurringJobSelector:
|
||||||
enable: false
|
enable: false
|
||||||
jobList: []
|
jobList: []
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user