Skip to content

Commit 246658f

Browse files
Ilya Bumarskovibumarskov
Ilya Bumarskov
authored andcommitted
Align zookeeperbackup with operator-sdk 1.13
Signed-off-by: ibumarskov <[email protected]>
1 parent b5c4148 commit 246658f

12 files changed

+97
-155
lines changed

api/group.go

-16
This file was deleted.

api/v1beta1/zz_generated.deepcopy.go

-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
2+
---
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.6.2
8+
creationTimestamp: null
9+
name: zookeeperbackups.zookeeper.pravega.io
10+
spec:
11+
group: zookeeper.pravega.io
12+
names:
13+
kind: ZookeeperBackup
14+
listKind: ZookeeperBackupList
15+
plural: zookeeperbackups
16+
singular: zookeeperbackup
17+
scope: Namespaced
18+
versions:
19+
- name: v1beta1
20+
schema:
21+
openAPIV3Schema:
22+
description: ZookeeperBackup is the Schema for the zookeeperbackups API
23+
properties:
24+
apiVersion:
25+
description: 'APIVersion defines the versioned schema of this representation
26+
of an object. Servers should convert recognized schemas to the latest
27+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
28+
type: string
29+
kind:
30+
description: 'Kind is a string value representing the REST resource this
31+
object represents. Servers may infer this from the endpoint the client
32+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
33+
type: string
34+
metadata:
35+
type: object
36+
spec:
37+
description: ZookeeperBackupSpec defines the desired state of ZookeeperBackup
38+
properties:
39+
backupsToKeep:
40+
default: "7"
41+
description: Number of backups to store
42+
type: string
43+
dataCapacity:
44+
default: 1Gi
45+
description: Data Storage Capacity
46+
type: string
47+
dataStorageClass:
48+
description: Data Storage Class name
49+
type: string
50+
image:
51+
description: Image for backup procedure
52+
properties:
53+
pullPolicy:
54+
description: PullPolicy describes a policy for if/when to pull
55+
a container image
56+
enum:
57+
- Always
58+
- Never
59+
- IfNotPresent
60+
type: string
61+
repository:
62+
type: string
63+
tag:
64+
type: string
65+
type: object
66+
schedule:
67+
default: 0 0 */1 * *
68+
description: Schedule in Cron format
69+
type: string
70+
zookeeperCluster:
71+
description: Name of the ZookeeperCluster to backup
72+
type: string
73+
required:
74+
- zookeeperCluster
75+
type: object
76+
status:
77+
description: ZookeeperBackupStatus defines the observed state of ZookeeperBackup
78+
type: object
79+
type: object
80+
served: true
81+
storage: true
82+
subresources:
83+
status: {}
84+
status:
85+
acceptedNames:
86+
kind: ""
87+
plural: ""
88+
conditions: []
89+
storedVersions: []

config/crd/bases/zookeeper.pravega.io_zookeeperbackups_crd.yaml

-78
This file was deleted.

config/crd/kustomization.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
# It should be run by config/default
44
resources:
55
- bases/zookeeper.pravega.io_zookeeperclusters.yaml
6+
- bases/zookeeper.pravega.io.zookeeper.pravega.io_zookeeperbackups.yaml
67
# +kubebuilder:scaffold:crdkustomizeresource
78

89
patchesStrategicMerge:
910
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
1011
# patches here are for enabling the conversion webhook for each CRD
1112
#- patches/webhook_in_zookeeperclusters.yaml
13+
#- patches/webhook_in_zookeeperbackups.yaml
1214
# +kubebuilder:scaffold:crdkustomizewebhookpatch
1315

1416
# [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix.
1517
# patches here are for enabling the CA injection for each CRD
1618
#- patches/cainjection_in_zookeeperclusters.yaml
19+
#- patches/cainjection_in_zookeeperbackups.yaml
1720
# +kubebuilder:scaffold:crdkustomizecainjectionpatch
1821

config/rbac/role.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ rules:
1010
- zookeeper.pravega.io.zookeeper.pravega.io
1111
resources:
1212
- zookeeperclusters
13+
- zookeeperbackups
1314
verbs:
1415
- create
1516
- delete

deploy/role.yaml

-40
This file was deleted.

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ go 1.17
55
require (
66
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
77
github.com/go-logr/logr v0.4.0
8+
github.com/mitchellh/hashstructure/v2 v2.0.2
89
github.com/onsi/ginkgo v1.16.4
910
github.com/onsi/gomega v1.15.0
1011
github.com/operator-framework/operator-lib v0.7.0

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk
339339
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
340340
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
341341
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
342+
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
343+
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
342344
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
343345
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
344346
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=

pkg/apis/zookeeper/group.go

-16
This file was deleted.

pkg/controller/zookeeperbackup/zookeeperbackup_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"strings"
2323
"time"
2424

25-
zookeeperv1beta1 "github.com/pravega/zookeeper-operator/pkg/apis/zookeeper/v1beta1"
25+
zookeeperv1beta1 "github.com/pravega/zookeeper-operator/api/v1beta1"
2626
batchv1 "k8s.io/api/batch/v1"
2727
batchv1beta1 "k8s.io/api/batch/v1beta1"
2828
corev1 "k8s.io/api/core/v1"

0 commit comments

Comments
 (0)