Skip to content

Commit 1e7c76c

Browse files
author
ibumarskov
committed
Merge branch 'master' into zk-backup-controller
2 parents 18ebfe2 + 6dea1e2 commit 1e7c76c

14 files changed

+6705
-6700
lines changed

.github/workflows/ci.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,13 @@ jobs:
4040
- name: Set env
4141
run: |
4242
echo "KUBERNETES_VERSION=v1.23.1" >> $GITHUB_ENV
43-
echo "OPERATOR_SDK_VERSION=v0.19.4" >> $GITHUB_ENV
44-
echo "MINIKUBE_VERSION=v1.24.0" >> $GITHUB_ENV
43+
echo "MINIKUBE_VERSION=v1.25.2" >> $GITHUB_ENV
4544
echo "KUBERNETES_CONFIG_FILE=$HOME/.kube/config" >> $GITHUB_ENV
4645
echo "CHANGE_MINIKUBE_NONE_USER=true" >> $GITHUB_ENV
4746
- name: minikube setup
4847
run: |
4948
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
5049
curl -Lo minikube https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
51-
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/
5250
sudo mount --make-rshared /
5351
sudo apt-get install -y conntrack
5452
CHANGE_MINIKUBE_NONE_USER=true

Makefile

+5-8
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,16 @@
88

99
SHELL=/bin/bash -o pipefail
1010
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
11-
CRD_OPTIONS ?= "crd:trivialVersions=true"
11+
CRD_OPTIONS ?= "crd"
1212

1313
PROJECT_NAME=zookeeper-operator
1414
EXPORTER_NAME=zookeeper-exporter
1515
APP_NAME=zookeeper
16-
KUBE_VERSION=1.20.13
1716
REPO=pravega/$(PROJECT_NAME)
1817
TEST_REPO=testzkop/$(PROJECT_NAME)
1918
APP_REPO=pravega/$(APP_NAME)
2019
ALTREPO=emccorp/$(PROJECT_NAME)
2120
APP_ALTREPO=emccorp/$(APP_NAME)
22-
OSDK_VERSION=$(shell operator-sdk version | cut -f2 -d'"')
2321
VERSION=$(shell git describe --always --tags --dirty | tr -d "v" | sed "s/\(.*\)-g`git rev-parse --short HEAD`/\1/")
2422
GIT_SHA=$(shell git rev-parse --short HEAD)
2523
TEST_IMAGE=$(TEST_REPO)-testimages:$(VERSION)
@@ -87,7 +85,7 @@ ifeq (, $(shell which controller-gen))
8785
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
8886
cd $$CONTROLLER_GEN_TMP_DIR ;\
8987
go mod init tmp ;\
90-
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2 ;\
88+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.0 ;\
9189
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
9290
}
9391
CONTROLLER_GEN=$(GOBIN)/controller-gen
@@ -116,10 +114,9 @@ generate:
116114
$(CONTROLLER_GEN) object paths="./..."
117115
make manifests
118116
# sync crd generated to helm-chart
119-
echo '{{- define "crd.openAPIV3Schema" }}' > charts/zookeeper-operator/templates/_crd_openapiv3schema.tpl
120-
echo 'openAPIV3Schema:' >> charts/zookeeper-operator/templates/_crd_openapiv3schema.tpl
121-
sed -e '1,/openAPIV3Schema/d' config/crd/bases/zookeeper.pravega.io_zookeeperclusters.yaml | sed -n '/served: true/!p;//q' >> charts/zookeeper-operator/templates/_crd_openapiv3schema.tpl
122-
echo '{{- end }}' >> charts/zookeeper-operator/templates/_crd_openapiv3schema.tpl
117+
echo '{{- if .Values.crd.create }}' > charts/zookeeper-operator/templates/zookeeper.pravega.io_zookeeperclusters_crd.yaml
118+
cat config/crd/bases/zookeeper.pravega.io_zookeeperclusters.yaml >> charts/zookeeper-operator/templates/zookeeper.pravega.io_zookeeperclusters_crd.yaml
119+
echo '{{- end }}' >> charts/zookeeper-operator/templates/zookeeper.pravega.io_zookeeperclusters_crd.yaml
123120

124121

125122
build: test build-go build-image

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The project is currently alpha. While no breaking API changes are currently plan
2929

3030
### Overview
3131

32-
This operator runs a Zookeeper 3.7.0 cluster, and uses Zookeeper dynamic reconfiguration to handle node membership.
32+
This operator runs a Zookeeper 3.7.1 cluster, and uses Zookeeper dynamic reconfiguration to handle node membership.
3333

3434
The operator itself is built with the [Operator framework](https://github.com/operator-framework/operator-sdk).
3535

charts/zookeeper-operator/templates/_crd_openapiv3schema.tpl

-5,785
This file was deleted.

charts/zookeeper-operator/templates/_helpers.tpl

-62
Original file line numberDiff line numberDiff line change
@@ -49,65 +49,3 @@ Default volume template
4949
{{- define "chart.additionalVolumes"}}
5050
{{ toYaml .Values.additionalVolumes }}
5151
{{- end}}
52-
53-
{{- define "crd.additionalPrinterColumns" }}
54-
additionalPrinterColumns:
55-
- jsonPath: .spec.replicas
56-
description: The number of ZooKeeper servers in the ensemble
57-
name: Replicas
58-
type: integer
59-
- jsonPath: .status.readyReplicas
60-
description: The number of ZooKeeper servers in the ensemble that are in a Ready state
61-
name: Ready Replicas
62-
type: integer
63-
- jsonPath: .status.currentVersion
64-
description: The current Zookeeper version
65-
name: Version
66-
type: string
67-
- jsonPath: .spec.image.tag
68-
description: The desired Zookeeper version
69-
name: Desired Version
70-
type: string
71-
- jsonPath: .status.internalClientEndpoint
72-
description: Client endpoint internal to cluster network
73-
name: Internal Endpoint
74-
type: string
75-
- jsonPath: .status.externalClientEndpoint
76-
description: Client endpoint external to cluster network via LoadBalancer
77-
name: External Endpoint
78-
type: string
79-
- jsonPath: .metadata.creationTimestamp
80-
name: Age
81-
type: date
82-
{{- end }}
83-
84-
{{- define "crd.additionalPrinterColumnsV1Beta" }}
85-
additionalPrinterColumns:
86-
- JSONPath: .spec.replicas
87-
description: The number of ZooKeeper servers in the ensemble
88-
name: Replicas
89-
type: integer
90-
- JSONPath: .status.readyReplicas
91-
description: The number of ZooKeeper servers in the ensemble that are in a Ready state
92-
name: Ready Replicas
93-
type: integer
94-
- JSONPath: .status.currentVersion
95-
description: The current Zookeeper version
96-
name: Version
97-
type: string
98-
- JSONPath: .spec.image.tag
99-
description: The desired Zookeeper version
100-
name: Desired Version
101-
type: string
102-
- JSONPath: .status.internalClientEndpoint
103-
description: Client endpoint internal to cluster network
104-
name: Internal Endpoint
105-
type: string
106-
- JSONPath: .status.externalClientEndpoint
107-
description: Client endpoint external to cluster network via LoadBalancer
108-
name: External Endpoint
109-
type: string
110-
- JSONPath: .metadata.creationTimestamp
111-
name: Age
112-
type: date
113-
{{- end }}

0 commit comments

Comments
 (0)