Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ jobs:
run: |
sudo ln -sf `which go` `sudo which go` || true
sudo go version
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Check values schema json
uses: losisin/helm-values-schema-json-action@v3
with:
values: values.yaml
working-directory: charts/zookeeper-operator
fail-on-diff: true
- name: get go version
run: go version
- name: Gofmt and License checks
Expand Down
51 changes: 26 additions & 25 deletions charts/zookeeper-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,29 @@ The command removes all the Kubernetes components associated with the chart and

The following table lists the configurable parameters of the zookeeper-operator chart and their default values.

| Parameter | Description | Default |
| ----- | ----------- | ------ |
| `additionalEnv` | Additional Environment Variables | `[]` |
| `additionalSidecars` | Additional Sidecars Configuration | `[]` |
| `additionalVolumes` | Additional volumes required for sidecars | `[]` |
| `affinity` | Specifies scheduling constraints on pods | `{}` |
| `annotations` | Operator pod annotations | `{}` |
| `crd.create` | Create zookeeper CRD | `true` |
| `disableFinalizer` | Disable finalizer for zookeeper clusters, PVCs clean-up will be skipped.| `false` |
| `global.imagePullSecrets` | Lists of secrets to use to pull zookeeper-operator image from a private registry | `[]` |
| `hooks.backoffLimit` | backoffLimit for batch jobs | `10` |
| `hooks.delete` | Create pre-delete hook which ensures that the operator cannot be deleted until the zookeeper cluster custom resources have been cleaned up | `true` |
| `hooks.image.repository` | Image repository for batch jobs | `"lachlanevenson/k8s-kubectl"` |
| `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.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` |
| `resources` | Specifies resource requirements for the container | `{}` |
| `serviceAccount.create` | Create service account | `true` |
| `serviceAccount.name` | Name for the service account | `zookeeper-operator` |
| `tolerations` | Specifies the pod's tolerations | `[]` |
| `watchNamespace` | Namespaces to be watched | `""` |
## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| additionalEnv | list | `[]` | Additional Environment Variables |
| additionalSidecars | list | `[]` | Additional Sidecars Configuration |
| additionalVolumes | list | `[]` | Additional volumes required for sidecars |
| affinity | object | `{}` | Operator pod affinity can be set |
| annotations | object | `{}` | Pod annotations |
| crd.create | bool | `true` | Create zookeeper CRD |
| disableFinalizer | bool | `false` | Disable finalizer for zookeeper clusters, PVCs clean-up will be skipped |
| global.imagePullSecrets | list | `[]` | Lists the secrets you need to use to pull zookeeper-operator image from a private registry. |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| image.repository | string | `"ghcr.io/adobe/zookeeper-operator"` | Image repository |
| image.tag | string | `"0.2.15"` | Image tag |
| labels | object | `{}` | Additional labels to be added to resources |
| metricsBindAddress | string | `"127.0.0.1"` | |
| metricsPort | string | `"6000"` | |
| nodeSelector | object | `{}` | Operator pod node selector can be set |
| rbac.create | bool | `true` | Install RBAC roles and bindings. |
| resources | object | `{}` | Specifies resource requirements for the container |
| securityContext | object | `{}` | |
| serviceAccount.create | bool | `true` | Create service account |
| serviceAccount.name | string | `"zookeeper-operator"` | Name for the service account |
| tolerations | list | `[]` | Operator pod tolerations can be set |
| watchNamespace | string | `""` | List of namespaces where Operator watches for custom resources. |
46 changes: 46 additions & 0 deletions charts/zookeeper-operator/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Zookeeper Operator Helm Chart

Installs [Zookeeper Operator](https://github.com/pravega/zookeeper-operator) to create/configure/manage Zookeeper clusters atop Kubernetes.

## Introduction

This chart bootstraps a [Zookeeper Operator](https://github.com/pravega/zookeeper-operator) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Prerequisites
- Kubernetes 1.15+ with Beta APIs
- Helm 3.2.1+

## Installing the Chart

To install the zookeeper-operator chart, use the following command:

```bash
# Install latest version
$ helm install [RELEASE_NAME] oci://ghcr.io/adobe/helm-charts/zookeeper-operator

# Or install a specific version
$ helm install [RELEASE_NAME] oci://ghcr.io/adobe/helm-charts/zookeeper-operator --version=[VERSION]
```

> **Note:** You can view all available versions at [adobe/helm-charts/zookeeper-operator](https://github.com/adobe/zookeeper-operator/pkgs/container/helm-charts%2Fzookeeper-operator/versions?filters%5Bversion_type%5D=tagged)
- **[RELEASE_NAME]** is the release name for the zookeeper-operator chart.
- **[DEPLOYMENT_NAME]** is the name of the zookeeper-operator deployment so created. (If [RELEASE_NAME] contains the string `zookeeper-operator`, `[DEPLOYMENT_NAME] = [RELEASE_NAME]`, else `[DEPLOYMENT_NAME] = [RELEASE_NAME]-zookeeper-operator`. The [DEPLOYMENT_NAME] can however be overridden by providing `--set fullnameOverride=[DEPLOYMENT_NAME]` along with the helm install command)
- **[VERSION]** can be any stable release version for zookeeper-operator from 0.2.8 onwards.

This command deploys a zookeeper-operator on the Kubernetes cluster in its default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.

## Uninstalling the Chart

To uninstall/delete the zookeeper-operator chart, use the following command:

```
$ helm uninstall [RELEASE_NAME]
```

The command removes all the Kubernetes components associated with the chart and deletes the release.

## Configuration

The following table lists the configurable parameters of the zookeeper-operator chart and their default values.

{{ template "chart.valuesSection" . }}
10 changes: 7 additions & 3 deletions charts/zookeeper-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
Default sidecar template
*/}}
{{- define "chart.additionalSidecars"}}
{{ toYaml .Values.additionalSidecars }}
{{- end}}
{{ with .Values.additionalSidecars }}
{{- toYaml . -}}
{{- end }}
{{- end }}

{{/*
Default volume template
*/}}
{{- define "chart.additionalVolumes"}}
{{ toYaml .Values.additionalVolumes }}
{{ with .Values.additionalVolumes }}
{{- toYaml . -}}
{{- end }}
{{- end}}
8 changes: 2 additions & 6 deletions charts/zookeeper-operator/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name }}
{{- if .Values.additionalVolumes }}
volumes:
{{- include "chart.additionalVolumes" . | indent 6 }}
{{- end }}
{{- include "chart.additionalVolumes" . | indent 6 }}
containers:
- name: {{ template "zookeeper-operator.fullname" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down Expand Up @@ -58,9 +56,7 @@ spec:
resources:
{{ toYaml .Values.resources | indent 10 }}
{{- end }}
{{- if .Values.additionalSidecars }}
{{- include "chart.additionalSidecars" . | indent 6 }}
{{- end }}
{{- include "chart.additionalSidecars" . | indent 6 }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
Expand Down
97 changes: 97 additions & 0 deletions charts/zookeeper-operator/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"additionalEnv": {
"type": "array"
},
"additionalSidecars": {
"type": "array"
},
"additionalVolumes": {
"type": "array"
},
"affinity": {
"type": "object"
},
"annotations": {
"type": "object"
},
"crd": {
"type": "object",
"properties": {
"create": {
"type": "boolean"
}
}
},
"disableFinalizer": {
"type": "boolean"
},
"global": {
"type": "object",
"properties": {
"imagePullSecrets": {
"type": "array"
}
}
},
"image": {
"type": "object",
"properties": {
"pullPolicy": {
"type": "string"
},
"repository": {
"type": "string"
},
"tag": {
"type": "string"
}
}
},
"labels": {
"type": "object"
},
"metricsBindAddress": {
"type": "string"
},
"metricsPort": {
"type": "string"
},
"nodeSelector": {
"type": "object"
},
"rbac": {
"type": "object",
"properties": {
"create": {
"type": "boolean"
}
}
},
"resources": {
"type": "object"
},
"securityContext": {
"type": "object"
},
"serviceAccount": {
"type": "object",
"properties": {
"create": {
"type": "boolean"
},
"name": {
"type": "string"
}
}
},
"tolerations": {
"type": "array"
},
"watchNamespace": {
"type": "string"
}
}
}
41 changes: 26 additions & 15 deletions charts/zookeeper-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,49 @@
## Declare variables to be passed into your templates.

global:
# Lists the secrets you need to use to pull zookeeper-operator image from a private registry.
# -- Lists the secrets you need to use to pull zookeeper-operator image from a private registry.
imagePullSecrets: []
# - private-registry-key

image:
# -- Image tag
tag: 0.2.15
# -- Image repository
repository: ghcr.io/adobe/zookeeper-operator
# -- Image pull policy
pullPolicy: IfNotPresent

securityContext: {}
# runAsUser: 1001
# runAsGroup: 1001

## Additional labels to be added to resources
# -- Additional labels to be added to resources
labels: {}

## Install RBAC roles and bindings.
rbac:
# -- Install RBAC roles and bindings.
create: true

## Service account name and whether to create it.

serviceAccount:
# -- Create service account
create: true
# -- Name for the service account
name: zookeeper-operator
## Optionally specify an array of imagePullSecrets. Will override the global parameter if set
# imagePullSecrets:

## Whether to create the CRD.
crd:
# -- Create zookeeper CRD
create: true

## Specifies which namespace(s) the Operator should watch over.
## Default: An empty string means all namespaces.
## Multiple namespaces can be configured using a comma separated list of namespaces
# -- List of namespaces where Operator watches for custom resources.
watchNamespace: ""

## Operator pod resources
# -- Specifies resource requirements for the container
resources: {}
# limits:
# cpu: 2
Expand All @@ -48,29 +54,34 @@ resources: {}
# cpu: 1
# memory: 128Mi

# Scheduling constraints
# -- Operator pod node selector can be set
nodeSelector: {}
affinity: {}

# -- Operator pod tolerations can be set
tolerations: []

# Pod annotations
# -- Operator pod affinity can be set
affinity: {}

# -- Pod annotations
annotations: {}

## Additional Sidecars Configuration.
additionalSidecars: {}
# -- Additional Sidecars Configuration
additionalSidecars: []
# - name: nginx
# image: nginx:latest

## Additional Environment Variables.
additionalEnv: {}
# -- Additional Environment Variables
additionalEnv: []

## Additional volumes required for sidecars.
additionalVolumes: {}
# -- Additional volumes required for sidecars
additionalVolumes: []
# - name: volume1
# emptyDir: {}
# - name: volume2
# emptyDir: {}

# -- Disable finalizer for zookeeper clusters, PVCs clean-up will be skipped
disableFinalizer: false

## In order to enable gathering metrics by Prometheus etc... bind to 0.0.0.0
Expand Down
Loading