Skip to content

Commit

Permalink
Support extraPorts in the service template. (#154)
Browse files Browse the repository at this point in the history
* Support extraPorts in the service template.
* Support extraPorts on the StatefulSet.
* Update documentation for extraPorts.
  • Loading branch information
samwho authored Jun 4, 2024
1 parent 0c21ed9 commit fa32ff8
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion couchdb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: couchdb
version: 4.5.3
version: 4.5.4
appVersion: 3.3.3
description: A database featuring seamless multi-master sync, that scales from
big data to mobile, with an intuitive HTTP/JSON API and designed for
Expand Down
6 changes: 5 additions & 1 deletion couchdb/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# NEWS

## 4.5.4

- Expose `extraPorts` and `service.extraPorts` to allow specifying arbitrary ports to be exposed from the CouchDB pods

## 4.5.3

- Fix ability to define pull secrets using `imagePullSecrets`.
- Fix ability to define pull secrets using `imagePullSecrets`.

## 4.5.2

Expand Down
2 changes: 2 additions & 0 deletions couchdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ A variety of other parameters are also configurable. See the comments in the
| `adminPassword` | auto-generated |
| `adminHash` | |
| `cookieAuthSecret` | auto-generated |
| `extraPorts` | [] (a list of ContainerPort objects) |
| `image.repository` | couchdb |
| `image.tag` | 3.3.3 |
| `image.pullPolicy` | IfNotPresent |
Expand Down Expand Up @@ -218,6 +219,7 @@ A variety of other parameters are also configurable. See the comments in the
| `service.type` | ClusterIP |
| `service.externalPort` | 5984 |
| `service.targetPort` | 5984 |
| `service.extraPorts` | [] (a list of ServicePort objects) |
| `dns.clusterDomainSuffix` | cluster.local |
| `networkPolicy.enabled` | true |
| `serviceAccount.enabled` | true |
Expand Down
3 changes: 3 additions & 0 deletions couchdb/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
- port: {{ .Values.service.externalPort }}
protocol: TCP
targetPort: {{ .Values.service.targetPort }}
{{ with .Values.service.extraPorts }}
{{- toYaml . | nindent 4 }}
{{- end }}
type: {{ .Values.service.type }}
selector:
{{ include "couchdb.ss.selector" . | indent 4 }}
Expand Down
3 changes: 3 additions & 0 deletions couchdb/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ spec:
- name: metrics
containerPort: {{ .Values.prometheusPort.port }}
{{- end }}
{{ with .Values.extraPorts }}
{{ toYaml . | indent 12 }}
{{ end }}
env:
{{- if not .Values.allowAdminParty }}
- name: COUCHDB_USER
Expand Down
12 changes: 12 additions & 0 deletions couchdb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,18 @@ service:
externalPort: 5984
targetPort: 5984
labels: {}
extraPorts: []
# - name: sqs
# port: 4984
# targetPort: 4984
# protocol: TCP

## If you need to expose any additional ports on the CouchDB container, for example
## if you're running CouchDB container with additional processes that need to
## be accessible outside of the pod, you can define them here.
extraPorts: []
# - name: sqs
# containerPort: 4984

## An Ingress resource can provide name-based virtual hosting and TLS
## termination among other things for CouchDB deployments which are accessed
Expand Down

0 comments on commit fa32ff8

Please sign in to comment.