Skip to content

Commit

Permalink
Add hostPort support for http- and transport-ports (opensearch-projec…
Browse files Browse the repository at this point in the history
…t#336)

Signed-off-by: Christian Kuhn <phello@gmx.de>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
  • Loading branch information
ph311o authored and prathaptce committed Mar 24, 2023
1 parent 93fa81e commit c3a6fd0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion charts/opensearch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [2.9.1]
### Added
- Support for http- and transport-hostPort
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [2.9.0]
### Added
### Changed
Expand Down Expand Up @@ -168,7 +177,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security


[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.9.0...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.9.1...HEAD
[2.9.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.9.0...opensearch-2.9.1
[2.9.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.8.2...opensearch-2.9.0
[2.8.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.8.1...opensearch-2.8.2
[2.8.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.8.0...opensearch-2.8.1
Expand Down
2 changes: 1 addition & 1 deletion charts/opensearch/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.9.0
version: 2.9.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 2 additions & 0 deletions charts/opensearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ helm uninstall my-release
| `extraVolumes` | Array of extra volumes to be added | `[]` |
| `fullnameOverride` | Overrides the `clusterName` and `nodeGroup` when used in the naming of resources. This should only be used when using a single `nodeGroup`, otherwise you will have name conflicts | `""` |
| `hostAliases` | Configurable [hostAliases][] | `[]` |
| `httpHostPort` | Expose another http-port as hostPort. Refer to documentation for more information and requirements about using hostPorts. | `""` |
| `httpPort` | The http port that Kubernetes will use for the healthchecks and the service. If you change this you will also need to set `http.port` in `extraEnvs` | `9200` |
| `image.pullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` |
| `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` |
Expand Down Expand Up @@ -102,6 +103,7 @@ helm uninstall my-release
| `terminationGracePeriod` | The [terminationGracePeriod][] in seconds used when trying to stop the pod | `120` |
| `tolerations` | Configurable [tolerations][] | `[]` |
| `topologySpreadConstraints` | Configuration for pod [topologySpreadConstraints][] | `[]` |
| `transportHostPort` | Expose another transport port as hostPort. Refer to documentation for more information and requirements about using hostPorts. | `""` |
| `transportPort` | The transport port that Kubernetes will use for the service. If you change this you will also need to set transport port configuration in `extraEnvs` | `9300` |
| `updateStrategy` | The [updateStrategy][] for the StatefulSet. By default Kubernetes will wait for the cluster to be green after upgrading each pod. Setting this to `OnDelete` will allow you to manually delete each pod during upgrades | `RollingUpdate` |
| `volumeClaimTemplate` | Configuration for the [volumeClaimTemplate for StatefulSets][]. You will want to adjust the storage (default `30Gi` ) and the `storageClassName` if you are using a different storage class | see [values.yaml][] |
Expand Down
6 changes: 6 additions & 0 deletions charts/opensearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,14 @@ spec:
ports:
- name: http
containerPort: {{ .Values.httpPort }}
{{- if .Values.httpHostPort }}
hostPort: {{ .Values.httpHostPort }}
{{- end }}
- name: transport
containerPort: {{ .Values.transportPort }}
{{- if .Values.transportHostPort }}
hostPort: {{ .Values.transportHostPort }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 10 }}
env:
Expand Down
2 changes: 2 additions & 0 deletions charts/opensearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ enableServiceLinks: true
protocol: https
httpPort: 9200
transportPort: 9300
httpHostPort: ""
transportHostPort: ""

service:
labels: {}
Expand Down

0 comments on commit c3a6fd0

Please sign in to comment.