Skip to content

Commit

Permalink
Align zookeeperbackup with operator-sdk 1.13
Browse files Browse the repository at this point in the history
Signed-off-by: ibumarskov <[email protected]>
  • Loading branch information
Ilya Bumarskov authored and ibumarskov committed Apr 13, 2022
1 parent b5c4148 commit 246658f
Show file tree
Hide file tree
Showing 12 changed files with 97 additions and 155 deletions.
16 changes: 0 additions & 16 deletions api/group.go

This file was deleted.

4 changes: 0 additions & 4 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 89 additions & 0 deletions config/crd/bases/zookeeper.pravega.io_zookeeperbackups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
creationTimestamp: null
name: zookeeperbackups.zookeeper.pravega.io
spec:
group: zookeeper.pravega.io
names:
kind: ZookeeperBackup
listKind: ZookeeperBackupList
plural: zookeeperbackups
singular: zookeeperbackup
scope: Namespaced
versions:
- name: v1beta1
schema:
openAPIV3Schema:
description: ZookeeperBackup is the Schema for the zookeeperbackups 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: ZookeeperBackupSpec defines the desired state of ZookeeperBackup
properties:
backupsToKeep:
default: "7"
description: Number of backups to store
type: string
dataCapacity:
default: 1Gi
description: Data Storage Capacity
type: string
dataStorageClass:
description: Data Storage Class name
type: string
image:
description: Image for backup procedure
properties:
pullPolicy:
description: PullPolicy describes a policy for if/when to pull
a container image
enum:
- Always
- Never
- IfNotPresent
type: string
repository:
type: string
tag:
type: string
type: object
schedule:
default: 0 0 */1 * *
description: Schedule in Cron format
type: string
zookeeperCluster:
description: Name of the ZookeeperCluster to backup
type: string
required:
- zookeeperCluster
type: object
status:
description: ZookeeperBackupStatus defines the observed state of ZookeeperBackup
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
78 changes: 0 additions & 78 deletions config/crd/bases/zookeeper.pravega.io_zookeeperbackups_crd.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
# It should be run by config/default
resources:
- bases/zookeeper.pravega.io_zookeeperclusters.yaml
- bases/zookeeper.pravega.io.zookeeper.pravega.io_zookeeperbackups.yaml
# +kubebuilder:scaffold:crdkustomizeresource

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

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

1 change: 1 addition & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ rules:
- zookeeper.pravega.io.zookeeper.pravega.io
resources:
- zookeeperclusters
- zookeeperbackups
verbs:
- create
- delete
Expand Down
40 changes: 0 additions & 40 deletions deploy/role.yaml

This file was deleted.

1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.17
require (
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
github.com/go-logr/logr v0.4.0
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.15.0
github.com/operator-framework/operator-lib v0.7.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
Expand Down
16 changes: 0 additions & 16 deletions pkg/apis/zookeeper/group.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"
"time"

zookeeperv1beta1 "github.com/pravega/zookeeper-operator/pkg/apis/zookeeper/v1beta1"
zookeeperv1beta1 "github.com/pravega/zookeeper-operator/api/v1beta1"
batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1"
corev1 "k8s.io/api/core/v1"
Expand Down

0 comments on commit 246658f

Please sign in to comment.