Skip to content

Commit 0a97585

Browse files
authored
[Feature] Migrate CRD to V1 (#666)
1 parent f426cf0 commit 0a97585

File tree

7 files changed

+198
-98
lines changed

7 files changed

+198
-98
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
44
- Add v2alpha1 API for ArangoDeployment and ArangoDeploymentReplication
5+
- Migrate CRD to apiextensions.k8s.io/v1
56

67
## [1.1.2](https://github.com/arangodb/kube-arangodb/tree/1.1.2) (2020-11-11)
78
- Fix Bootstrap phase and move it under Plan

chart/kube-arangodb-crd/templates/backup-policy.yaml

Lines changed: 54 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,68 @@
1-
apiVersion: apiextensions.k8s.io/v1beta1
1+
apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
4-
name: arangobackuppolicies.backup.arangodb.com
5-
labels:
6-
app.kubernetes.io/name: {{ template "kube-arangodb-crd.name" . }}
7-
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8-
app.kubernetes.io/managed-by: {{ .Release.Service }}
9-
app.kubernetes.io/instance: {{ .Release.Name }}
10-
release: {{ .Release.Name }}
4+
name: arangobackuppolicies.backup.arangodb.com
5+
labels:
6+
app.kubernetes.io/name: {{ template "kube-arangodb-crd.name" . }}
7+
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8+
app.kubernetes.io/managed-by: {{ .Release.Service }}
9+
app.kubernetes.io/instance: {{ .Release.Name }}
10+
release: {{ .Release.Name }}
1111
spec:
12-
group: backup.arangodb.com
13-
additionalPrinterColumns:
14-
- JSONPath: .spec.schedule
12+
group: backup.arangodb.com
13+
names:
14+
kind: ArangoBackupPolicy
15+
listKind: ArangoBackupPolicyList
16+
plural: arangobackuppolicies
17+
shortNames:
18+
- arangobackuppolicy
19+
- arangobp
20+
singular: arangobackuppolicy
21+
scope: Namespaced
22+
versions:
23+
- name: v1
24+
schema:
25+
openAPIV3Schema:
26+
type: object
27+
x-kubernetes-preserve-unknown-fields: true
28+
served: true
29+
storage: true
30+
additionalPrinterColumns:
31+
- jsonPath: .spec.schedule
1532
description: Schedule
1633
name: Schedule
1734
type: string
18-
- JSONPath: .status.scheduled
35+
- jsonPath: .status.scheduled
1936
description: Scheduled
2037
name: Scheduled
2138
type: string
22-
- JSONPath: .status.message
39+
- jsonPath: .status.message
2340
priority: 1
2441
description: Message of the ArangoBackupPolicy object
2542
name: Message
2643
type: string
27-
names:
28-
kind: ArangoBackupPolicy
29-
listKind: ArangoBackupPolicyList
30-
plural: arangobackuppolicies
31-
shortNames:
32-
- arangobackuppolicy
33-
- arangobp
34-
singular: arangobackuppolicy
35-
scope: Namespaced
36-
subresources:
44+
subresources:
45+
status: {}
46+
- name: v1alpha
47+
schema:
48+
openAPIV3Schema:
49+
type: object
50+
x-kubernetes-preserve-unknown-fields: true
51+
served: true
52+
storage: false
53+
additionalPrinterColumns:
54+
- jsonPath: .spec.schedule
55+
description: Schedule
56+
name: Schedule
57+
type: string
58+
- jsonPath: .status.scheduled
59+
description: Scheduled
60+
name: Scheduled
61+
type: string
62+
- jsonPath: .status.message
63+
priority: 1
64+
description: Message of the ArangoBackupPolicy object
65+
name: Message
66+
type: string
67+
subresources:
3768
status: {}
38-
version: v1
39-
versions:
40-
- name: v1
41-
served: true
42-
storage: true
43-
- name: v1alpha
44-
served: true
45-
storage: false

chart/kube-arangodb-crd/templates/backup.yaml

Lines changed: 72 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: apiextensions.k8s.io/v1beta1
1+
apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
name: arangobackups.backup.arangodb.com
@@ -9,57 +9,101 @@ metadata:
99
app.kubernetes.io/instance: {{ .Release.Name }}
1010
release: {{ .Release.Name }}
1111
spec:
12-
group: backup.arangodb.com
13-
additionalPrinterColumns:
14-
- JSONPath: .spec.policyName
12+
group: backup.arangodb.com
13+
names:
14+
kind: ArangoBackup
15+
listKind: ArangoBackupList
16+
plural: arangobackups
17+
shortNames:
18+
- arangobackup
19+
singular: arangobackup
20+
scope: Namespaced
21+
versions:
22+
- name: v1
23+
schema:
24+
openAPIV3Schema:
25+
type: object
26+
x-kubernetes-preserve-unknown-fields: true
27+
served: true
28+
storage: true
29+
additionalPrinterColumns:
30+
- jsonPath: .spec.policyName
1531
description: Policy name
1632
name: Policy
1733
type: string
18-
- JSONPath: .spec.deployment.name
34+
- jsonPath: .spec.deployment.name
1935
description: Deployment name
2036
name: Deployment
2137
type: string
22-
- JSONPath: .status.backup.version
38+
- jsonPath: .status.backup.version
2339
description: Backup Version
2440
name: Version
2541
type: string
26-
- JSONPath: .status.backup.createdAt
42+
- jsonPath: .status.backup.createdAt
2743
description: Backup Creation Timestamp
2844
name: Created
2945
type: string
30-
- JSONPath: .status.backup.sizeInBytes
46+
- jsonPath: .status.backup.sizeInBytes
3147
description: Backup Size in Bytes
3248
name: Size
3349
type: integer
3450
format: byte
35-
- JSONPath: .status.backup.numberOfDBServers
51+
- jsonPath: .status.backup.numberOfDBServers
3652
description: Backup Number of the DB Servers
3753
name: DBServers
3854
type: integer
39-
- JSONPath: .status.state
55+
- jsonPath: .status.state
4056
description: The actual state of the ArangoBackup
4157
name: State
4258
type: string
43-
- JSONPath: .status.message
59+
- jsonPath: .status.message
4460
priority: 1
4561
description: Message of the ArangoBackup object
4662
name: Message
4763
type: string
48-
names:
49-
kind: ArangoBackup
50-
listKind: ArangoBackupList
51-
plural: arangobackups
52-
shortNames:
53-
- arangobackup
54-
singular: arangobackup
55-
scope: Namespaced
56-
subresources:
64+
subresources:
65+
status: {}
66+
- name: v1alpha
67+
schema:
68+
openAPIV3Schema:
69+
type: object
70+
x-kubernetes-preserve-unknown-fields: true
71+
served: true
72+
storage: false
73+
additionalPrinterColumns:
74+
- jsonPath: .spec.policyName
75+
description: Policy name
76+
name: Policy
77+
type: string
78+
- jsonPath: .spec.deployment.name
79+
description: Deployment name
80+
name: Deployment
81+
type: string
82+
- jsonPath: .status.backup.version
83+
description: Backup Version
84+
name: Version
85+
type: string
86+
- jsonPath: .status.backup.createdAt
87+
description: Backup Creation Timestamp
88+
name: Created
89+
type: string
90+
- jsonPath: .status.backup.sizeInBytes
91+
description: Backup Size in Bytes
92+
name: Size
93+
type: integer
94+
format: byte
95+
- jsonPath: .status.backup.numberOfDBServers
96+
description: Backup Number of the DB Servers
97+
name: DBServers
98+
type: integer
99+
- jsonPath: .status.state
100+
description: The actual state of the ArangoBackup
101+
name: State
102+
type: string
103+
- jsonPath: .status.message
104+
priority: 1
105+
description: Message of the ArangoBackup object
106+
name: Message
107+
type: string
108+
subresources:
57109
status: {}
58-
version: v1
59-
versions:
60-
- name: v1
61-
served: true
62-
storage: true
63-
- name: v1alpha
64-
served: true
65-
storage: false
Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: apiextensions.k8s.io/v1beta1
1+
apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
name: arangodeploymentreplications.replication.database.arangodb.com
@@ -9,20 +9,36 @@ metadata:
99
app.kubernetes.io/instance: {{ .Release.Name }}
1010
release: {{ .Release.Name }}
1111
spec:
12-
group: replication.database.arangodb.com
13-
names:
14-
kind: ArangoDeploymentReplication
15-
listKind: ArangoDeploymentReplicationList
16-
plural: arangodeploymentreplications
17-
shortNames:
18-
- arangorepl
19-
singular: arangodeploymentreplication
20-
scope: Namespaced
21-
version: v1
22-
versions:
23-
- name: v1
24-
served: true
25-
storage: true
26-
- name: v1alpha
27-
served: true
28-
storage: false
12+
group: replication.database.arangodb.com
13+
names:
14+
kind: ArangoDeploymentReplication
15+
listKind: ArangoDeploymentReplicationList
16+
plural: arangodeploymentreplications
17+
shortNames:
18+
- arangorepl
19+
singular: arangodeploymentreplication
20+
scope: Namespaced
21+
versions:
22+
- name: v1
23+
schema:
24+
openAPIV3Schema:
25+
type: object
26+
x-kubernetes-preserve-unknown-fields: true
27+
served: true
28+
storage: true
29+
- name: v1alpha
30+
schema:
31+
openAPIV3Schema:
32+
type: object
33+
x-kubernetes-preserve-unknown-fields: true
34+
served: true
35+
storage: false
36+
- name: v2alpha1
37+
schema:
38+
openAPIV3Schema:
39+
type: object
40+
x-kubernetes-preserve-unknown-fields: true
41+
served: true
42+
storage: false
43+
subresources:
44+
status: {}
Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: apiextensions.k8s.io/v1beta1
1+
apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
name: arangodeployments.database.arangodb.com
@@ -9,21 +9,37 @@ metadata:
99
app.kubernetes.io/instance: {{ .Release.Name }}
1010
release: {{ .Release.Name }}
1111
spec:
12-
group: database.arangodb.com
13-
names:
14-
kind: ArangoDeployment
15-
listKind: ArangoDeploymentList
16-
plural: arangodeployments
17-
shortNames:
18-
- arangodb
19-
- arango
20-
singular: arangodeployment
21-
scope: Namespaced
22-
version: v1
23-
versions:
24-
- name: v1
25-
served: true
26-
storage: true
27-
- name: v1alpha
28-
served: true
29-
storage: false
12+
group: database.arangodb.com
13+
names:
14+
kind: ArangoDeployment
15+
listKind: ArangoDeploymentList
16+
plural: arangodeployments
17+
shortNames:
18+
- arangodb
19+
- arango
20+
singular: arangodeployment
21+
scope: Namespaced
22+
versions:
23+
- name: v1
24+
schema:
25+
openAPIV3Schema:
26+
type: object
27+
x-kubernetes-preserve-unknown-fields: true
28+
served: true
29+
storage: true
30+
- name: v1alpha
31+
schema:
32+
openAPIV3Schema:
33+
type: object
34+
x-kubernetes-preserve-unknown-fields: true
35+
served: true
36+
storage: false
37+
- name: v2alpha1
38+
schema:
39+
openAPIV3Schema:
40+
type: object
41+
x-kubernetes-preserve-unknown-fields: true
42+
served: true
43+
storage: false
44+
subresources:
45+
status: {}

chart/kube-arangodb/templates/deployment-operator/role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ metadata:
1414
release: {{ .Release.Name }}
1515
rules:
1616
- apiGroups: ["database.arangodb.com"]
17-
resources: ["arangodeployments"]
17+
resources: ["arangodeployments", "arangodeployments/status"]
1818
verbs: ["*"]
1919
- apiGroups: [""]
2020
resources: ["pods", "services", "endpoints", "persistentvolumeclaims", "events", "secrets", "serviceaccounts"]

chart/kube-arangodb/templates/deployment-replications-operator/role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ metadata:
1414
release: {{ .Release.Name }}
1515
rules:
1616
- apiGroups: ["replication.database.arangodb.com"]
17-
resources: ["arangodeploymentreplications"]
17+
resources: ["arangodeploymentreplications", "arangodeploymentreplications/status"]
1818
verbs: ["*"]
1919
- apiGroups: ["database.arangodb.com"]
2020
resources: ["arangodeployments"]

0 commit comments

Comments
 (0)