Skip to content

Commit

Permalink
Issue 148: Update CRD version to v1 (#184)
Browse files Browse the repository at this point in the history
* Issue 148: Update CRD version to v1

Signed-off-by: anishakj <[email protected]>

* Updating CRD version of app

Signed-off-by: anishakj <[email protected]>

* Updating operator sdk version to fix end to end tests

Signed-off-by: anishakj <[email protected]>

* Adding zookeeper CRD

Signed-off-by: anishakj <[email protected]>

* Fixing unit test failures

Signed-off-by: anishakj <[email protected]>

* updating zookeeper crd

Signed-off-by: anishakj <[email protected]>

* Refactoring the code

Signed-off-by: anishakj <[email protected]>

* addressing review comments

Signed-off-by: anishakj <[email protected]>
  • Loading branch information
anishakj authored Nov 23, 2021
1 parent 0487c0b commit ec6af7d
Show file tree
Hide file tree
Showing 15 changed files with 7,677 additions and 2,493 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,18 @@ on:
- master

env:
KUBECTL_VERSION: v1.15.0
OPERATOR_SDK_VERSION: v0.17.0
OPERATOR_SDK_VERSION: v0.19.4
PACKET_TOKEN: ${{ secrets.PACKET_TOKEN }}

# jobs to run
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13.8
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.13.8
go-version: 1.16
id: go
- name: Get current date
id: date
Expand Down Expand Up @@ -101,6 +100,7 @@ jobs:
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "mkdir /data;kubectl create -f /root/bookkeeper-operator/test/e2e/resources/local-storage.yaml"
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "curl -L https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash"
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm repo add stable https://charts.helm.sh/stable;helm install stable/nfs-server-provisioner --generate-name"
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/bookkeeper-operator/test/e2e/resources/zookeeper_crd.yaml"
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/bookkeeper-operator/test/e2e/resources/zookeeper.yaml"
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl apply -f \"https://github.com/jetstack/cert-manager/releases/download/v0.14.1/cert-manager.crds.yaml\""
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm repo add jetstack https://charts.jetstack.io"
Expand All @@ -115,7 +115,7 @@ jobs:
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/bookkeeper-operator/deploy/version_map.yaml"
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username=testbkop --docker-password=08d50da6-61bd-4953-a2ce-7d7a0e3835bc [email protected]"
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/$OPERATOR_SDK_VERSION/operator-sdk-$OPERATOR_SDK_VERSION-x86_64-linux-gnu && chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/"
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer);source /root/.gvm/scripts/gvm;gvm install go1.13.8 --binary;gvm use go1.13.8 --default"
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer);source /root/.gvm/scripts/gvm;gvm install go1.16 --binary;gvm use go1.16 --default"
- name: Running e2e
run: |
ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "cd /root/bookkeeper-operator;source /root/.gvm/scripts/gvm;make test-e2e"
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/bookkeeper-cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: app.k8s.io/v1beta1
apiVersion: app.k8s.io/v1
kind: Application
metadata:
name: "bookkeeper-cluster"
Expand Down
4 changes: 2 additions & 2 deletions deploy/app/crd.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
generation: 1
labels:
controller-tools.k8s.io: "1.0"
name: applications.app.k8s.io
selfLink: /apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/applications.app.k8s.io
selfLink: /apis/apiextensions.k8s.io/v1/customresourcedefinitions/applications.app.k8s.io
spec:
conversion:
strategy: None
Expand Down
4,425 changes: 2,191 additions & 2,234 deletions deploy/crds/bookkeeper.pravega.io_bookkeeperclusters_crd.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deploy/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ roleRef:
---

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: bookkeeper-operator
subjects:
Expand Down
4 changes: 3 additions & 1 deletion deploy/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
type: ClusterIP
---

apiVersion: admissionregistration.k8s.io/v1beta1
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: bookkeeper-webhook-config
Expand All @@ -39,4 +39,6 @@ webhooks:
resources:
- bookkeeperclusters
scope: "*"
admissionReviewVersions: ["v1beta1", "v1"]
sideEffects: None
timeoutSeconds: 30
2 changes: 1 addition & 1 deletion doc/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* [Install the Operator in Test Mode](#install-the-operator-in-test-mode)

#### Requirements
- Go 1.13+
- Go 1.16+

##### Install Go

Expand Down
20 changes: 8 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
module github.com/pravega/bookkeeper-operator

go 1.13
go 1.16

require (
github.com/evanphx/json-patch v4.9.0+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/googleapis/gnostic v0.4.0 // indirect
github.com/hashicorp/go-version v1.1.0
github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.13.0
github.com/operator-framework/operator-lib v0.2.0
github.com/operator-framework/operator-sdk v0.17.0
github.com/operator-framework/operator-sdk v0.19.4
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/rogpeppe/go-internal v1.5.2 // indirect
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da
github.com/sirupsen/logrus v1.7.0
github.com/spf13/cobra v1.1.3 // indirect
github.com/stretchr/testify v1.7.0 // indirect
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f // indirect
golang.org/x/tools v0.1.2 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/api v0.19.0-alpha.1
k8s.io/api v0.19.13
k8s.io/apiextensions-apiserver v0.19.0-alpha.1 // indirect
k8s.io/apimachinery v0.19.0-alpha.1
k8s.io/apimachinery v0.19.13
k8s.io/client-go v12.0.0+incompatible
k8s.io/klog/v2 v2.8.0 // indirect
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
Expand All @@ -43,8 +39,8 @@ replace (
github.com/go-logr/zapr => github.com/go-logr/zapr v0.4.0
github.com/onsi/ginkgo => github.com/onsi/ginkgo v1.12.0
github.com/onsi/gomega => github.com/onsi/gomega v1.9.0
k8s.io/api => k8s.io/api v0.17.5
k8s.io/apimachinery => k8s.io/apimachinery v0.17.5
k8s.io/client-go => k8s.io/client-go v0.17.5
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.5.2
k8s.io/api => k8s.io/api v0.19.13
k8s.io/apimachinery => k8s.io/apimachinery v0.19.14-rc.0
k8s.io/client-go => k8s.io/client-go v0.19.13
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.6.5
)
Loading

0 comments on commit ec6af7d

Please sign in to comment.