Skip to content
Permalink
Browse files
Add helm post-install hook to automate placement tagging in CouchDB n…
…odes (#66)

* Add placementManager Job to automate placement tagging
* Bump chart version to 3.6.0
  • Loading branch information
fsalazarh committed Jan 30, 2022
1 parent dc2899b commit 22761f957d8ac44bd76821f2c697ebcfa67abc46
Showing 6 changed files with 84 additions and 2 deletions.
@@ -1,6 +1,6 @@
apiVersion: v1
name: couchdb
version: 3.5.2
version: 3.6.0
appVersion: 3.2.1
description: A database featuring seamless multi-master sync, that scales from
big data to mobile, with an intuitive HTTP/JSON API and designed for
@@ -214,6 +214,10 @@ A variety of other parameters are also configurable. See the comments in the
| `prometheusPort.enabled` | false |
| `prometheusPort.port` | 17896 |
| `prometheusPort.bind_address` | 0.0.0.0 |
| `placementConfig.enabled` | false |
| `placementConfig.image.repository` | caligrafix/couchdb-autoscaler-placement-manager|
| `placementConfig.image.tag` | 0.1.0 |

## Feedback, Issues, Contributing

General feedback is welcome at our [user][1] or [developer][2] mailing lists.
@@ -0,0 +1,44 @@
{{- if .Values.placementConfig.enabled -}}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ template "couchdb.fullname" . }}
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
annotations:
# This is what defines this resource as a hook. Without this line, the
# job is considered part of the release.
"helm.sh/hook": post-install
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": before-hook-creation
spec:
template:
metadata:
name: "{{ .Release.Name }}"
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
spec:
restartPolicy: OnFailure
containers:
- name: placement-tagging-job
image: {{ .Values.placementConfig.image.repository }}:{{ .Values.placementConfig.image.tag }}
imagePullPolicy: Always
args: ["--placement-manager"]
envFrom:
- secretRef:
name: couchdb-couchdb
- configMapRef:
name: {{ template "couchdb.fullname" . }}
env:
- name: NAMESPACE
value: {{ .Release.Namespace }}
- name: COUCHDB_SVC
value: {{ template "couchdb.svcname" . }}
- name: COUCHDB_PORT
value: {{ .Values.service.externalPort | quote }}
{{- end -}}
@@ -221,3 +221,13 @@ sidecars: {}
# volumeMounts:
# - name: database-storage
# mountPath: /opt/couchdb/data/


# Placement manager to annotate each document in the nodes DB with "zone" attribute
# recording the zone where node has been scheduled
# Ref: https://docs.couchdb.org/en/stable/cluster/sharding.html#specifying-database-placement
placementConfig:
enabled: false
image:
repository: caligrafix/couchdb-autoscaler-placement-manager
tag: 0.1.0
BIN +11.1 KB docs/couchdb-3.6.0.tgz
Binary file not shown.
@@ -1,6 +1,30 @@
apiVersion: v1
entries:
couchdb:
- apiVersion: v1
appVersion: 3.2.1
created: "2022-01-27T12:14:55.94368627-03:00"
description: A database featuring seamless multi-master sync, that scales from
big data to mobile, with an intuitive HTTP/JSON API and designed for reliability.
digest: 8a6dc96fbf7df0f4bf1f95bd763fb523bad98dcc34282a5b3623c2a5b2b5d36a
home: https://couchdb.apache.org/
icon: http://couchdb.apache.org/CouchDB-visual-identity/logo/CouchDB-couch-symbol.svg
keywords:
- couchdb
- database
- nosql
maintainers:
- email: kocolosk@apache.org
name: kocolosk
- email: willholley@apache.org
name: willholley
name: couchdb
sources:
- https://github.com/apache/couchdb-helm
- https://github.com/apache/couchdb-docker
urls:
- https://apache.github.io/couchdb-helm/couchdb-3.6.0.tgz
version: 3.6.0
- apiVersion: v1
appVersion: 3.2.1
created: "2022-01-24T11:16:39.860979-05:00"
@@ -393,4 +417,4 @@ entries:
urls:
- https://apache.github.io/couchdb-helm/couchdb-2.2.0.tgz
version: 2.2.0
generated: "2022-01-24T11:16:39.859868-05:00"
generated: "2022-01-27T12:14:55.941950611-03:00"

0 comments on commit 22761f9

Please sign in to comment.