Skip to content

Commit

Permalink
Merge branch 'master' into zk-backup-controller
Browse files Browse the repository at this point in the history
  • Loading branch information
ibumarskov committed Jun 22, 2022
2 parents 18ebfe2 + 6dea1e2 commit ed8c666
Show file tree
Hide file tree
Showing 14 changed files with 11,428 additions and 11,424 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@ jobs:
- name: Set env
run: |
echo "KUBERNETES_VERSION=v1.23.1" >> $GITHUB_ENV
echo "OPERATOR_SDK_VERSION=v0.19.4" >> $GITHUB_ENV
echo "MINIKUBE_VERSION=v1.24.0" >> $GITHUB_ENV
echo "MINIKUBE_VERSION=v1.25.2" >> $GITHUB_ENV
echo "KUBERNETES_CONFIG_FILE=$HOME/.kube/config" >> $GITHUB_ENV
echo "CHANGE_MINIKUBE_NONE_USER=true" >> $GITHUB_ENV
- name: minikube setup
run: |
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/
curl -Lo minikube https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
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/
sudo mount --make-rshared /
sudo apt-get install -y conntrack
CHANGE_MINIKUBE_NONE_USER=true
Expand Down
13 changes: 5 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,16 @@

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

PROJECT_NAME=zookeeper-operator
EXPORTER_NAME=zookeeper-exporter
APP_NAME=zookeeper
KUBE_VERSION=1.20.13
REPO=pravega/$(PROJECT_NAME)
TEST_REPO=testzkop/$(PROJECT_NAME)
APP_REPO=pravega/$(APP_NAME)
ALTREPO=emccorp/$(PROJECT_NAME)
APP_ALTREPO=emccorp/$(APP_NAME)
OSDK_VERSION=$(shell operator-sdk version | cut -f2 -d'"')
VERSION=$(shell git describe --always --tags --dirty | tr -d "v" | sed "s/\(.*\)-g`git rev-parse --short HEAD`/\1/")
GIT_SHA=$(shell git rev-parse --short HEAD)
TEST_IMAGE=$(TEST_REPO)-testimages:$(VERSION)
Expand Down Expand Up @@ -87,7 +85,7 @@ ifeq (, $(shell which controller-gen))
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$CONTROLLER_GEN_TMP_DIR ;\
go mod init tmp ;\
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2 ;\
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.0 ;\
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
}
CONTROLLER_GEN=$(GOBIN)/controller-gen
Expand Down Expand Up @@ -116,10 +114,9 @@ generate:
$(CONTROLLER_GEN) object paths="./..."
make manifests
# sync crd generated to helm-chart
echo '{{- define "crd.openAPIV3Schema" }}' > charts/zookeeper-operator/templates/_crd_openapiv3schema.tpl
echo 'openAPIV3Schema:' >> charts/zookeeper-operator/templates/_crd_openapiv3schema.tpl
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
echo '{{- end }}' >> charts/zookeeper-operator/templates/_crd_openapiv3schema.tpl
echo '{{- if .Values.crd.create }}' > charts/zookeeper-operator/templates/zookeeper.pravega.io_zookeeperclusters_crd.yaml
cat config/crd/bases/zookeeper.pravega.io_zookeeperclusters.yaml >> charts/zookeeper-operator/templates/zookeeper.pravega.io_zookeeperclusters_crd.yaml
echo '{{- end }}' >> charts/zookeeper-operator/templates/zookeeper.pravega.io_zookeeperclusters_crd.yaml


build: test build-go build-image
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The project is currently alpha. While no breaking API changes are currently plan

### Overview

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

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

Expand Down
5,785 changes: 0 additions & 5,785 deletions charts/zookeeper-operator/templates/_crd_openapiv3schema.tpl

This file was deleted.

62 changes: 0 additions & 62 deletions charts/zookeeper-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,65 +49,3 @@ Default volume template
{{- define "chart.additionalVolumes"}}
{{ toYaml .Values.additionalVolumes }}
{{- end}}

{{- define "crd.additionalPrinterColumns" }}
additionalPrinterColumns:
- jsonPath: .spec.replicas
description: The number of ZooKeeper servers in the ensemble
name: Replicas
type: integer
- jsonPath: .status.readyReplicas
description: The number of ZooKeeper servers in the ensemble that are in a Ready state
name: Ready Replicas
type: integer
- jsonPath: .status.currentVersion
description: The current Zookeeper version
name: Version
type: string
- jsonPath: .spec.image.tag
description: The desired Zookeeper version
name: Desired Version
type: string
- jsonPath: .status.internalClientEndpoint
description: Client endpoint internal to cluster network
name: Internal Endpoint
type: string
- jsonPath: .status.externalClientEndpoint
description: Client endpoint external to cluster network via LoadBalancer
name: External Endpoint
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
{{- end }}

{{- define "crd.additionalPrinterColumnsV1Beta" }}
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The number of ZooKeeper servers in the ensemble
name: Replicas
type: integer
- JSONPath: .status.readyReplicas
description: The number of ZooKeeper servers in the ensemble that are in a Ready state
name: Ready Replicas
type: integer
- JSONPath: .status.currentVersion
description: The current Zookeeper version
name: Version
type: string
- JSONPath: .spec.image.tag
description: The desired Zookeeper version
name: Desired Version
type: string
- JSONPath: .status.internalClientEndpoint
description: Client endpoint internal to cluster network
name: Internal Endpoint
type: string
- JSONPath: .status.externalClientEndpoint
description: Client endpoint external to cluster network via LoadBalancer
name: External Endpoint
type: string
- JSONPath: .metadata.creationTimestamp
name: Age
type: date
{{- end }}
Loading

0 comments on commit ed8c666

Please sign in to comment.