Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,30 @@ resources:
defaulting: true
validation: true
webhookVersion: v1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: openstack.org
group: ovn
kind: OVNDBBackup
path: github.com/openstack-k8s-operators/ovn-operator/api/v1beta1
version: v1beta1
webhooks:
defaulting: true
validation: true
webhookVersion: v1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: openstack.org
group: ovn
kind: OVNDBRestore
path: github.com/openstack-k8s-operators/ovn-operator/api/v1beta1
version: v1beta1
webhooks:
defaulting: true
validation: true
webhookVersion: v1
version: "3"
134 changes: 134 additions & 0 deletions api/bases/ovn.openstack.org_ovndbbackups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.18.0
name: ovndbbackups.ovn.openstack.org
spec:
group: ovn.openstack.org
names:
kind: OVNDBBackup
listKind: OVNDBBackupList
plural: ovndbbackups
singular: ovndbbackup
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Status
jsonPath: .status.conditions[0].status
name: Status
type: string
- description: Message
jsonPath: .status.conditions[0].message
name: Message
type: string
name: v1beta1
schema:
openAPIV3Schema:
description: OVNDBBackup is the Schema for the ovndbbackups 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: OVNDBBackupSpec defines the desired state of OVNDBBackup
properties:
databaseInstance:
description: DatabaseInstance - Name of the OVNDBCluster CR to back
up
type: string
retention:
description: Retention - duration after which old backups are cleaned
up from disk
type: string
schedule:
default: '@daily'
description: Schedule in Cron format for periodic backups
type: string
storageClass:
description: StorageClass for the backup PVC (defaults to the OVNDBCluster's
StorageClass)
type: string
storageRequest:
description: StorageRequest for the backup PVC (defaults to the OVNDBCluster's
StorageRequest)
type: string
required:
- databaseInstance
- schedule
type: object
status:
description: OVNDBBackupStatus defines the observed state of OVNDBBackup
properties:
conditions:
description: Conditions
items:
description: Condition defines an observation of a API resource
operational state.
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.
type: string
reason:
description: The reason for the condition's last transition
in CamelCase.
type: string
severity:
description: |-
Severity provides a classification of Reason code, so the current situation is immediately
understandable and could act accordingly.
It is meant for situations where Status=False and it should be indicated if it is just
informational, warning (next reconciliation might fix it) or an error (e.g. DB create issue
and no actions to automatically resolve the issue can/should be done).
For conditions where Status=Unknown or Status=True the Severity should be SeverityNone.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of condition in CamelCase.
type: string
required:
- lastTransitionTime
- status
- type
type: object
type: array
hash:
additionalProperties:
type: string
description: Map of hashes to track input changes
type: object
observedGeneration:
description: ObservedGeneration - the most recent generation observed
format: int64
type: integer
type: object
type: object
served: true
storage: true
subresources:
status: {}
135 changes: 135 additions & 0 deletions api/bases/ovn.openstack.org_ovndbrestores.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.18.0
name: ovndbrestores.ovn.openstack.org
spec:
group: ovn.openstack.org
names:
kind: OVNDBRestore
listKind: OVNDBRestoreList
plural: ovndbrestores
singular: ovndbrestore
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Phase
jsonPath: .status.phase
name: Phase
type: string
- description: Status
jsonPath: .status.conditions[0].status
name: Status
type: string
- description: Message
jsonPath: .status.conditions[0].message
name: Message
type: string
name: v1beta1
schema:
openAPIV3Schema:
description: OVNDBRestore is the Schema for the ovndbrestores 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: OVNDBRestoreSpec defines the desired state of OVNDBRestore
properties:
backupSource:
description: BackupSource - Name of the OVNDBBackup CR to restore
from
type: string
backupTimestamp:
description: |-
BackupTimestamp - specific backup timestamp to restore (format: YYYYMMDD-HHMMSS).
Must match the timestamp prefix of a backup file on the backup PVC.
If empty, the most recent backup is used.
pattern: ^\d{8}-\d{6}$
type: string
required:
- backupSource
type: object
status:
description: OVNDBRestoreStatus defines the observed state of OVNDBRestore
properties:
conditions:
description: Conditions
items:
description: Condition defines an observation of a API resource
operational state.
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.
type: string
reason:
description: The reason for the condition's last transition
in CamelCase.
type: string
severity:
description: |-
Severity provides a classification of Reason code, so the current situation is immediately
understandable and could act accordingly.
It is meant for situations where Status=False and it should be indicated if it is just
informational, warning (next reconciliation might fix it) or an error (e.g. DB create issue
and no actions to automatically resolve the issue can/should be done).
For conditions where Status=Unknown or Status=True the Severity should be SeverityNone.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of condition in CamelCase.
type: string
required:
- lastTransitionTime
- status
- type
type: object
type: array
hash:
additionalProperties:
type: string
description: Map of hashes to track input changes
type: object
observedGeneration:
description: ObservedGeneration - the most recent generation observed
format: int64
type: integer
originalReplicas:
description: OriginalReplicas - the replica count saved before scale-down
format: int32
type: integer
phase:
description: Phase - current phase of the restore operation
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
Loading