Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
feat: #164 add CRD
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Feb 13, 2022
1 parent 1fc60db commit 438a491
Showing 1 changed file with 91 additions and 0 deletions.
91 changes: 91 additions & 0 deletions server-go/crd/Collection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
apiVersion: apiextensions.k8s.io/v1
kind: "CustomResourceDefinition"
metadata:
name: "backupcollections.backups.riotkit.org"
spec:
group: "backups.riotkit.org"
scope: "Namespaced"
names:
plural: "backupcollections"
singular: "backupcollection"
kind: "BackupCollection"
shortNames:
- "brcollections"
- "brc"
categories:
- "backuprepository"
versions:
- name: v1alpha1
served: true
storage: true

schema:
openAPIV3Schema:
type: object
required: ["spec"]
properties:
spec:
type: object
required: ["description", "filenameTemplate", "maxBackupsCount", "maxOneVersionSize", "maxCollectionSize", "strategyName", "strategySpec"]
properties:
description:
type: string
filenameTemplate:
type: string
maxBackupsCount:
type: integer
maxOneVersionSize:
type: string
pattern: '([0-9]+)(K|G|B|T)'
maxCollectionSize:
type: string
pattern: '([0-9]+)(K|G|B|T)'
window:
type: array
items:
type: object
properties:
from:
type: string
duration:
type: string
pattern: '([0-9]+)(m|h)'
strategyName:
type: string
enum: ["fifo", "fifo-plus-older"]
strategySpec:
type: object
properties:
keepLastOlderNotMoreThan:
type: string
maxOlderCopies:
type: integer
accessControl:
type: array
items:
type: object
attributes:
userName: string
roles:
type: array
items:
type: string
enum: ["collectionManager", "uploader", "downloader"]


additionalPrinterColumns:
- name: "Strategy"
type: string
jsonPath: .spec.strategyName

- name: "Filename template"
type: string
jsonPath: .spec.filenameTemplate

- name: "Max backups count"
type: string
jsonPath: .spec.maxBackupsCount

- name: "Max collection size"
type: string
jsonPath: .spec.maxCollectionSize

0 comments on commit 438a491

Please sign in to comment.