Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding checks to helm charts #248

Merged
merged 6 commits into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from 4 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
17 changes: 10 additions & 7 deletions charts/zookeeper-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,33 @@ This chart bootstraps a [Zookeeper Operator](https://github.com/pravega/zookeepe

## Installing the Chart

To install the chart with the release name `my-release`:
To install the zookeeper-operator chart, use the following commands:

```
$ helm repo add pravega https://charts.pravega.io
$ helm repo update
$ helm install my-release pravega/zookeeper-operator --version=`version`
$ helm install [RELEASE_NAME] pravega/zookeeper-operator --version=[VERSION]
```
Note: `version` can be any stable release version for zookeeper operator from 0.2.8 onwards.
where:
- **[RELEASE_NAME]** is the release name for the zookeeper-operator chart.
- **[RESOURCE_NAME]** is the name of the zookeeper-operator resource so created. (If [RELEASE_NAME] contains the string `zookeeper-operator`, `[RESOURCE_NAME] = [RELEASE_NAME]`, else `[RESOURCE_NAME] = [RELEASE_NAME]-zookeeper-operator`. The [RESOURCE_NAME] can however be overridden by providing `--set fullnameOverride=[RESOURCE_NAME]` along with the helm install command)
- **[VERSION]** can be any stable release version for zookeeper-operator from 0.2.8 onwards.

The above command deploys zookeeper-operator on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
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 deployment `my-release`:
To uninstall/delete the zookeeper-operator chart, use the following command:

```
$ helm uninstall my-release
$ 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.
The following table lists the configurable parameters of the zookeeper-operator chart and their default values.

| Parameter | Description | Default |
| ----- | ----------- | ------ |
Expand Down
8 changes: 4 additions & 4 deletions charts/zookeeper-operator/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ spec:
value: {{ template "zookeeper-operator.fullname" . }}
{{- if .Values.resources }}
resources:
{{ toYaml .Values.resources | nindent 10 }}
{{ toYaml .Values.resources | indent 10 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | nindent 8 }}
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | nindent 8 }}
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | nindent 8 }}
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
31 changes: 17 additions & 14 deletions charts/zookeeper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,42 @@ This chart creates a Zookeeper cluster in [Kubernetes](http://kubernetes.io) usi

## Installing the Chart

To install the chart with the release name `my-release`:
To install the zookeeper chart, use the following commands:

```
$ helm repo add pravega https://charts.pravega.io
$ helm repo update
$ helm install my-release pravega/zookeeper --version=`version`
$ helm install [RELEASE_NAME] pravega/zookeeper --version=[VERSION]
```
Note: `version` can be any stable release version for zookeeper from 0.2.8 onwards.
where:
- **[RELEASE_NAME]** is the release name for the zookeeper chart.
- **[CLUSTER_NAME]** is the name of the zookeeper cluster so created. (If [RELEASE_NAME] contains the string `zookeeper`, `[CLUSTER_NAME] = [RELEASE_NAME]`, else `[CLUSTER_NAME] = [RELEASE_NAME]-zookeeper`. The [CLUSTER_NAME] can however be overridden by providing `--set fullnameOverride=[CLUSTER_NAME]` along with the helm install command)
- **[VERSION]** can be any stable release version for zookeeper from 0.2.8 onwards.

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

## Upgrading the Chart

To upgrade the zookeeper cluster `my-release` from a version `x` to `y`:
To upgrade the zookeeper chart from version **[OLD_VERSION]** to version **[NEW_VERSION]**, use the following command:

```
$ helm upgrade my-release pravega/zookeeper --version=y --set image.tag=y --reuse-values --timeout 600s
$ helm upgrade [RELEASE_NAME] pravega/zookeeper --version=[NEW_VERSION] --set image.tag=[NEW_VERSION] --reuse-values --timeout 600s
```
Note: By specifying the `--reuse-values` option, the values of all parameters are retained across upgrades. However if some values need to be modified during the upgrade, the `--set` flag can be used to specify the new values of these parameters. Also, by skipping the `reuse-values` flag, the values of all parameters are reset to their default values specified in the charts published for version `y`.
Note: By specifying the `--reuse-values` option, the configuration of all parameters are retained across upgrades. However if some values need to be modified during the upgrade, the `--set` flag can be used to specify the new configuration for these parameters. Also, by skipping the `reuse-values` flag, the values of all parameters are reset to the default configuration that has been specified in the published charts for version [NEW_VERSION].

## Uninstalling the Chart

To uninstall/delete the zookeeper cluster `my-release`:
To uninstall/delete the zookeeper chart, use the following command:

```
$ helm uninstall my-release
$ helm uninstall [RELEASE_NAME]
```

The command removes all the Kubernetes components associated with the chart and deletes the release.
This 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 chart and their default values.
The following table lists the configurable parameters of the zookeeper chart and their default values.

| Parameter | Description | Default |
| ----- | ----------- | ------ |
Expand All @@ -66,8 +69,8 @@ The following table lists the configurable parameters of the Zookeeper chart and
| `pod.tolerations` | Specifies the pod's tolerations | `[]` |
| `pod.env` | List of environment variables to set in the container | `[]` |
| `pod.annotations` | Specifies the annotations to attach to pods | `{}` |
| `pod.securityContext` | Specifies the security context for the entire pod | |
| `pod.terminationGracePeriodSeconds` | Amount of time given to the pod to shutdown normally | `180` |
| `pod.securityContext` | Specifies the security context for the entire pod | `{}` |
| `pod.terminationGracePeriodSeconds` | Amount of time given to the pod to shutdown normally | `30` |
| `config.initLimit` | Amount of time (in ticks) to allow followers to connect and sync to a leader | `10` |
| `config.tickTime` | Length of a single tick which is the basic time unit used by Zookeeper (measured in milliseconds) | `2000` |
| `config.syncLimit` | Amount of time (in ticks) to allow followers to sync with Zookeeper | `2` |
Expand All @@ -77,6 +80,6 @@ The following table lists the configurable parameters of the Zookeeper chart and
| `persistence.storageClassName` | Storage class for persistent volumes | `standard` |
| `persistence.volumeSize` | Size of the volume requested for persistent volumes | `20Gi` |
| `ephemeral.emptydirvolumesource.medium` | What type of storage medium should back the directory. | `""` |
| `ephemeral.emptydirvolumesource.sizeLimit` | Total amount of local storage required for the EmptyDir volume. | |
| `ephemeral.emptydirvolumesource.sizeLimit` | Total amount of local storage required for the EmptyDir volume. | `20Gi` |
| `containers` | Application containers run with the zookeeper pod | `[]` |
| `volumes` | Named volumes that may be accessed by any container in the pod | `[]` |
34 changes: 34 additions & 0 deletions charts/zookeeper/templates/zookeeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,70 @@ spec:
domainName: {{ .Values.domainName }}
{{- end }}
kubernetesClusterDomain: {{ default "cluster.local" .Values.kubernetesClusterDomain }}
{{- if .Values.containers }}
containers:
{{ toYaml .Values.containers | indent 4 }}
{{- end }}
{{- if .Values.volumes }}
volumes:
{{ toYaml .Values.volumes | indent 4 }}
{{- end }}
labels:
{{ toYaml .Values.labels | indent 4 }}
ports:
{{ toYaml .Values.ports | indent 4 }}
{{- if .Values.pod }}
pod:
{{- if .Values.pod.labels }}
labels:
{{ toYaml .Values.pod.labels | indent 6 }}
{{- end }}
{{- if .Values.pod.nodeSelector }}
nodeSelector:
{{ toYaml .Values.pod.nodeSelector | indent 6 }}
{{- end }}
{{- if .Values.pod.affinity }}
affinity:
{{ toYaml .Values.pod.affinity | indent 6 }}
{{- end }}
{{- if .Values.pod.resources }}
resources:
{{ toYaml .Values.pod.resources | indent 6 }}
{{- end }}
{{- if .Values.pod.tolerations }}
tolerations:
{{ toYaml .Values.pod.tolerations | indent 6 }}
{{- end }}
{{- if .Values.pod.env }}
env:
{{ toYaml .Values.pod.env | indent 6 }}
{{- end }}
{{- if .Values.pod.annotations }}
annotations:
{{ toYaml .Values.pod.annotations | indent 6 }}
{{- end }}
{{- if .Values.pod.securityContext }}
securityContext:
{{ toYaml .Values.pod.securityContext | indent 6 }}
{{- end }}
{{- if .Values.pod.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.pod.terminationGracePeriodSeconds }}
{{- end }}
{{- end }}
{{- if .Values.config }}
config:
{{- if .Values.config.initLimit }}
initLimit: {{ .Values.config.initLimit }}
{{- end }}
{{- if .Values.config.tickTime }}
tickTime: {{ .Values.config.tickTime }}
{{- end }}
{{- if .Values.config.syncLimit }}
syncLimit: {{ .Values.config.syncLimit }}
{{- end }}
{{- if .Values.config.quorumListenOnAllIPs }}
quorumListenOnAllIPs: {{ .Values.config.quorumListenOnAllIPs }}
{{- end }}
{{- end }}
storageType: {{ default "persistence" .Values.storageType }}
{{- if eq (default .Values.storageType "persistence") "ephemeral" }}
Expand Down
8 changes: 4 additions & 4 deletions charts/zookeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pod: {}
# tolerations: []
# env: []
# annotations: {}
# securityContext:
# terminationGracePeriodSeconds: 180
# securityContext: {}
# terminationGracePeriodSeconds: 30

config: {}
# initLimit: 10
Expand All @@ -43,8 +43,8 @@ ephemeral:
emptydirvolumesource:
## specifying Medium for emptydirvolumesource
## accepted values - ""/Memory
#medium: ""
#sizeLimit: 20Gi
medium: ""
sizeLimit: 20Gi

hooks:
image:
Expand Down