Skip to content

Commit

Permalink
Merge branch 'pravega:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiwalyajoshi authored Jan 8, 2024
2 parents 8061d25 + 9fc6151 commit 93bb5ad
Show file tree
Hide file tree
Showing 29 changed files with 963 additions and 1,141 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
- name: Set up Go 1.21
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: "1.21"
id: go
- name: Set up Go for root
run: |
Expand Down
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG DOCKER_REGISTRY
ARG ALPINE_VERSION=3.15
FROM ${DOCKER_REGISTRY:+$DOCKER_REGISTRY/}golang:1.18-alpine${ALPINE_VERSION} as go-builder
ARG DISTROLESS_DOCKER_REGISTRY
ARG ALPINE_VERSION=3.18
FROM ${DOCKER_REGISTRY:+$DOCKER_REGISTRY/}golang:1.21-alpine${ALPINE_VERSION} as go-builder

ARG PROJECT_NAME=zookeeper-operator
ARG REPO_PATH=github.com/mesosphere/$PROJECT_NAME
Expand Down Expand Up @@ -28,14 +29,10 @@ COPY controllers/ controllers/
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /src/${PROJECT_NAME} \
-ldflags "-X ${REPO_PATH}/pkg/version.Version=${VERSION} -X ${REPO_PATH}/pkg/version.GitSHA=${GIT_SHA}" main.go

FROM ${DOCKER_REGISTRY:+$DOCKER_REGISTRY/}alpine:${ALPINE_VERSION} AS final

FROM ${DISTROLESS_DOCKER_REGISTRY:-gcr.io/}distroless/static-debian11:nonroot AS final

ARG PROJECT_NAME=zookeeper-operator

COPY --from=go-builder /src/${PROJECT_NAME} /usr/local/bin/${PROJECT_NAME}

RUN adduser -D ${PROJECT_NAME}
USER ${PROJECT_NAME}

ENTRYPOINT ["/usr/local/bin/zookeeper-operator"]
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,11 @@ build-go:
-o bin/$(EXPORTER_NAME)-windows-amd64.exe cmd/exporter/main.go

build-image:
docker build --build-arg VERSION=$(VERSION) --build-arg DOCKER_REGISTRY=$(DOCKER_REGISTRY) --build-arg GIT_SHA=$(GIT_SHA) -t $(REPO):$(VERSION) .
docker build --build-arg VERSION=$(VERSION) --build-arg DOCKER_REGISTRY=$(DOCKER_REGISTRY) --build-arg DISTROLESS_DOCKER_REGISTRY=$(DISTROLESS_DOCKER_REGISTRY) --build-arg GIT_SHA=$(GIT_SHA) -t $(REPO):$(VERSION) .
docker tag $(REPO):$(VERSION) $(REPO):latest

build-zk-image:

docker build --build-arg VERSION=$(VERSION) --build-arg DOCKER_REGISTRY=$(DOCKER_REGISTRY) --build-arg GIT_SHA=$(GIT_SHA) -t $(APP_REPO):$(VERSION) ./docker
docker tag $(APP_REPO):$(VERSION) $(APP_REPO):latest

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

### Overview

This operator runs a Zookeeper 3.7.1 cluster, and uses Zookeeper dynamic reconfiguration to handle node membership.
This operator runs a Zookeeper 3.7.2 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
2 changes: 1 addition & 1 deletion api/v1beta1/zookeepercluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const (

// DefaultZkContainerVersion is the default tag used for for the zookeeper
// container
DefaultZkContainerVersion = "0.2.14"
DefaultZkContainerVersion = "0.2.15"

// DefaultZkContainerPolicy is the default container pull policy used
DefaultZkContainerPolicy = "Always"
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/zookeepercluster_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ var _ = Describe("ZookeeperCluster Types", func() {
})

It("Checking tostring() function", func() {
Ω(z.Spec.Image.ToString()).To(Equal("pravega/zookeeper:0.2.14"))
Ω(z.Spec.Image.ToString()).To(Equal("pravega/zookeeper:0.2.15"))
})

})
Expand Down
4 changes: 2 additions & 2 deletions charts/zookeeper-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: zookeeper-operator
description: Zookeeper Operator Helm chart for Kubernetes
version: 0.2.14
appVersion: 0.2.14
version: 0.2.15
appVersion: 0.2.15
keywords:
- zookeeper
- storage
Expand Down
2 changes: 1 addition & 1 deletion charts/zookeeper-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The following table lists the configurable parameters of the zookeeper-operator
| `hooks.image.tag` | Image tag for batch jobs | `"v1.16.10"` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.repository` | Image repository | `pravega/zookeeper-operator` |
| `image.tag` | Image tag | `0.2.14` |
| `image.tag` | Image tag | `0.2.15` |
| `labels` | Operator pod labels | `{}` |
| `nodeSelector` | Map of key-value pairs to be present as labels in the node in which the pod should run | `{}` |
| `rbac.create` | Create RBAC resources | `true` |
Expand Down
5 changes: 3 additions & 2 deletions charts/zookeeper-operator/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 6000
- containerPort: {{ int .Values.metricsPort }}
name: metrics
command:
- zookeeper-operator
{{- if .Values.disableFinalizer }}
args:
- -metrics-bind-address={{ .Values.metricsBindAddress }}:{{ int .Values.metricsPort }}
{{- if .Values.disableFinalizer }}
- -disableFinalizer
{{- end }}
env:
Expand Down
Loading

0 comments on commit 93bb5ad

Please sign in to comment.