Skip to content
Merged
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
41 changes: 15 additions & 26 deletions chart/kube-arangodb-crd/templates/backup-policy.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: arangobackups.backup.arangodb.com
name: arangobackuppolicies.backup.arangodb.com
labels:
app.kubernetes.io/name: {{ template "kube-arangodb-crd.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
Expand All @@ -11,39 +11,28 @@ metadata:
spec:
group: backup.arangodb.com
additionalPrinterColumns:
- JSONPath: .spec.policyName
description: Policy name
name: Policy
- JSONPath: .spec.schedule
description: Schedule
name: Schedule
type: string
- JSONPath: .spec.deployment.name
description: Deployment name
name: Deployment
type: string
- JSONPath: .status.backup.version
description: Backup Version
name: Version
type: string
- JSONPath: .status.backup.createdAt
description: Backup Creation Timestamp
name: Created
type: string
- JSONPath: .status.state
description: The actual state of the ArangoBackup
name: State
- JSONPath: .status.scheduled
description: Scheduled
name: Scheduled
type: string
- JSONPath: .status.message
priority: 1
description: Message of the ArangoBackup object
description: Message of the ArangoBackupPolicy object
name: Message
type: string
names:
kind: ArangoBackup
listKind: ArangoBackupList
plural: arangobackups
kind: ArangoBackupPolicy
listKind: ArangoBackupPolicyList
plural: arangobackuppolicies
shortNames:
- arangobackup
singular: arangobackup
- arangobackuppolicy
- arangobp
singular: arangobackuppolicy
scope: Namespaced
version: v1alpha
subresources:
status: {}
status: {}
50 changes: 35 additions & 15 deletions chart/kube-arangodb-crd/templates/backup.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: arangobackuppolicies.backup.arangodb.com
name: arangobackups.backup.arangodb.com
labels:
app.kubernetes.io/name: {{ template "kube-arangodb-crd.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
Expand All @@ -11,28 +11,48 @@ metadata:
spec:
group: backup.arangodb.com
additionalPrinterColumns:
- JSONPath: .spec.schedule
description: Schedule
name: Schedule
- JSONPath: .spec.policyName
description: Policy name
name: Policy
type: string
- JSONPath: .status.scheduled
description: Scheduled
name: Scheduled
- JSONPath: .spec.deployment.name
description: Deployment name
name: Deployment
type: string
- JSONPath: .status.backup.version
description: Backup Version
name: Version
type: string
- JSONPath: .status.backup.createdAt
description: Backup Creation Timestamp
name: Created
type: string
- JSONPath: .status.backup.sizeInBytes
description: Backup Size in Bytes
name: Size
type: integer
format: byte
- JSONPath: .status.backup.numberOfDBServers
description: Backup Number of the DB Servers
name: DBServers
type: integer
- JSONPath: .status.state
description: The actual state of the ArangoBackup
name: State
type: string
- JSONPath: .status.message
priority: 1
description: Message of the ArangoBackupPolicy object
description: Message of the ArangoBackup object
name: Message
type: string
names:
kind: ArangoBackupPolicy
listKind: ArangoBackupPolicyList
plural: arangobackuppolicies
kind: ArangoBackup
listKind: ArangoBackupList
plural: arangobackups
shortNames:
- arangobackuppolicy
- arangobp
singular: arangobackuppolicy
- arangobackup
singular: arangobackup
scope: Namespaced
version: v1alpha
subresources:
status: {}
status: {}
3 changes: 3 additions & 0 deletions chart/kube-arangodb/templates/backup-operator/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ rules:
- apiGroups: [""]
resources: ["pods", "services", "endpoints"]
verbs: ["get", "update"]
- apiGroups: [""]
resources: ["events"]
verbs: ["*"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get"]
Expand Down
19 changes: 19 additions & 0 deletions docs/Manual/Deployment/Kubernetes/BackupResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ status:
uploaded: true
downloaded: true
createdAt: "time"
sizeInBytes: 1
numberOfDBServers: 3
available: true
```

Expand Down Expand Up @@ -331,6 +333,7 @@ Possible states:
- "Ready" - state when Backup is finished
- "Deleted" - state when Backup was once in ready, but has been deleted
- "Failed" - state for failure
- "Unavailable" - state when Backup is not available on the ArangoDB. It can happen in case of upgrades, node restarts etc.

### `status.time: timestamp`

Expand Down Expand Up @@ -429,6 +432,22 @@ Required: true

Default: now()

#### `status.backup.sizeInBytes: uint64`

Size of the Backup in ArangoDB.

Required: true

Default: 0

#### `status.backup.numberOfDBServers: uint`

Cluster size of the Backup in ArangoDB.

Required: true

Default: 0

### `status.available: bool`

Determines if we can restore from ArangoBackup.
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/aktau/github-release v0.7.2 // indirect
github.com/arangodb-helper/go-certificates v0.0.0-20180821055445-9fca24fc2680
github.com/arangodb/arangosync-client v0.6.3
github.com/arangodb/go-driver v0.0.0-20190917135832-4ec315b17bf0
github.com/arangodb/go-driver v0.0.0-20191002124627-11b6bfc64f67
github.com/arangodb/go-upgrade-rules v0.0.0-20180809110947-031b4774ff21
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
github.com/bugagazavr/go-gitlab-client v0.0.0-20150830002541-e5999f934dc4 // indirect
Expand Down Expand Up @@ -62,6 +62,7 @@ require (
github.com/juju/errgo v0.0.0-20140925100237-08cceb5d0b53 // indirect
github.com/julienschmidt/httprouter v1.2.0
github.com/manucorporat/stats v0.0.0-20180402194714-3ba42d56d227 // indirect
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a // indirect
github.com/mattn/go-colorable v0.1.1 // indirect
github.com/mattn/go-isatty v0.0.7 // indirect
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
Expand Down
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ github.com/arangodb/go-driver v0.0.0-20190806145426-48dd51aa0940 h1:CWLm7jOfT3v3
github.com/arangodb/go-driver v0.0.0-20190806145426-48dd51aa0940/go.mod h1:5nMxlcbN6PHA05uGUw2EH6PIQHvdRVTrg/S/GM8jG4w=
github.com/arangodb/go-driver v0.0.0-20190917135832-4ec315b17bf0 h1:OZAHgwP/X6eJlm33G94lo32j82acWZZvB2d/hbSAbTs=
github.com/arangodb/go-driver v0.0.0-20190917135832-4ec315b17bf0/go.mod h1:5nMxlcbN6PHA05uGUw2EH6PIQHvdRVTrg/S/GM8jG4w=
github.com/arangodb/go-driver v0.0.0-20191001090752-e07a8fe34b53 h1:gKOy8ZeLmAMWoCfZtXAwTpl9S3UxHjv8l4T96BvuXoQ=
github.com/arangodb/go-driver v0.0.0-20191001090752-e07a8fe34b53/go.mod h1:5nMxlcbN6PHA05uGUw2EH6PIQHvdRVTrg/S/GM8jG4w=
github.com/arangodb/go-driver v0.0.0-20191002081852-02f5e9c3a694 h1:Cn68e0b50vTJqku80erSNWddXixyyvzVOy7cgb4MKYw=
github.com/arangodb/go-driver v0.0.0-20191002081852-02f5e9c3a694/go.mod h1:5nMxlcbN6PHA05uGUw2EH6PIQHvdRVTrg/S/GM8jG4w=
github.com/arangodb/go-driver v0.0.0-20191002124627-11b6bfc64f67 h1:Nmcpj1EUYYOs3x/4F/4GH2nA8ooxkInWjOmbyOlw4bQ=
github.com/arangodb/go-driver v0.0.0-20191002124627-11b6bfc64f67/go.mod h1:5nMxlcbN6PHA05uGUw2EH6PIQHvdRVTrg/S/GM8jG4w=
github.com/arangodb/go-upgrade-rules v0.0.0-20180809110947-031b4774ff21 h1:+W7D5ttxi/Ygh/39vialtypE23p9KI7P0J2qtoqUV4w=
github.com/arangodb/go-upgrade-rules v0.0.0-20180809110947-031b4774ff21/go.mod h1:RkPIG6JJ2pcJUoymc18NxAJGraZd+iAEVnOTDjZey/w=
github.com/arangodb/go-velocypack v0.0.0-20190129082528-7896a965b4ad h1:Ah+VRYUWLuqgbfnDyuC8IrIe8XFzpt9tBVVnPGFNTJ8=
Expand Down Expand Up @@ -414,6 +420,8 @@ github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe h1:W/GaMY0y69G4cFl
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/manucorporat/stats v0.0.0-20180402194714-3ba42d56d227 h1:KIaAZ/V+/0/6BOULrmBQ9T1ed8BkKqGIjIKW923nJuo=
github.com/manucorporat/stats v0.0.0-20180402194714-3ba42d56d227/go.mod h1:ruMr5t05gVho4tuDv0PbI0Bb8nOxc/5Y6JzRHe/yfA0=
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a h1:+J2gw7Bw77w/fbK7wnNJJDKmw1IbWft2Ul5BzrG1Qm8=
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
Expand Down
15 changes: 12 additions & 3 deletions manifests/arango-backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ rules:
- apiGroups: [""]
resources: ["pods", "services", "endpoints"]
verbs: ["get", "update"]
- apiGroups: [""]
resources: ["events"]
verbs: ["*"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get"]
Expand Down Expand Up @@ -168,6 +171,9 @@ spec:
operator: In
values:
- amd64
hostNetwork: false
hostPID: false
hostIPC: false
containers:
- name: operator
imagePullPolicy: Always
Expand All @@ -193,9 +199,12 @@ spec:
- name: metrics
containerPort: 8528
securityContext:
capabilities:
drop:
- 'ALL'
privileged: false
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- 'ALL'
livenessProbe:
httpGet:
path: /health
Expand Down
Loading