Skip to content

Commit

Permalink
Backport #336 #346 (#411)
Browse files Browse the repository at this point in the history
* Service port for performance analyzer (#346)

* Performance analyzer port mapping

Signed-off-by: Philipp Hölscher <phoelsch@outlook.de>

* Performance analyzer port on ci-values

Signed-off-by: Philipp Hölscher <phoelsch@outlook.de>

* Update changelog

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

---------

Signed-off-by: Philipp Hölscher <phoelsch@outlook.de>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Add hostPort support for http- and transport-ports (#336)

Signed-off-by: Christian Kuhn <phello@gmx.de>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

---------

Signed-off-by: Philipp Hölscher <phoelsch@outlook.de>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Christian Kuhn <phello@gmx.de>
Co-authored-by: Philipp Hölscher <46397932+Phoelsch@users.noreply.github.com>
Co-authored-by: Christian Kuhn <86721442+ph311o@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 23, 2023
1 parent 880a028 commit 1faad7b
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 2 deletions.
14 changes: 13 additions & 1 deletion charts/opensearch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [1.18.2]
### Added
- Service ports for performance analyzer
- Support for http- and transport-hostPort
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [1.18.1]
### Added
- Support for lifecycle in the opensearch container in the StatefulSet
Expand Down Expand Up @@ -544,7 +554,9 @@ config:
### Fixed
### Security

[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.18.0...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.18.2...HEAD
[1.18.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.18.1...opensearch-1.18.2
[1.18.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.18.0...opensearch-1.18.1
[1.18.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.17.0...opensearch-1.18.0
[1.17.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.16.1...opensearch-1.17.0
[1.16.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.16.0...opensearch-1.16.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: 1.18.1
version: 1.18.2

# 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
4 changes: 4 additions & 0 deletions charts/opensearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,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 All @@ -64,6 +65,7 @@ helm uninstall my-release
| `labels` | Configurable [labels][] applied to all OpenSearch pods | `{}` |
| `masterService` | The service name used to connect to the masters. You only need to set this if your master `nodeGroup` is set to something other than `master` | `""` |
| `maxUnavailable` | The [maxUnavailable][] value for the pod disruption budget. By default this will prevent Kubernetes from having more than 1 unhealthy pod in the node group | `1` |
| `metricsPort` | The metrics port (for Performance Analyzer) that Kubernetes will use for the service. | `9600` |
| `nameOverride` | Overrides the `clusterName` when used in the naming of resources | `""` |
| `networkHost` | Value for the `network.host OpenSearch setting` | `0.0.0.0` |
| `networkPolicy.create` | Enable network policy creation for OpenSearch | `false`
Expand Down Expand Up @@ -94,6 +96,7 @@ helm uninstall my-release
| `service.labels` | Labels to be added to non-headless service | `{}` |
| `service.loadBalancerIP` | Some cloud providers allow you to specify the [loadBalancer][] IP. If the `loadBalancerIP` field is not specified, the IP is dynamically assigned. If you specify a `loadBalancerIP` but your cloud provider does not support the feature, it is ignored. | `""` |
| `service.loadBalancerSourceRanges` | The IP ranges that are allowed to access | `[]` |
| `service.metricsPortName` | The name of the metrics port (for Performance Analyzer) within the service | `metrics` |
| `service.nodePort` | Custom [nodePort][] port that can be set if you are using `service.type: nodePort` | `""` |
| `service.transportPortName` | The name of the transport port within the service | `transport` |
| `service.type` | OpenSearch [Service Types][] | `ClusterIP` |
Expand All @@ -103,6 +106,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
1 change: 1 addition & 0 deletions charts/opensearch/ci/ci-ingress-class-name-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ enableServiceLinks: true
protocol: https
httpPort: 9200
transportPort: 9300
metricsPort: 9600

service:
labels: {}
Expand Down
1 change: 1 addition & 0 deletions charts/opensearch/ci/ci-rbac-enabled-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ enableServiceLinks: true
protocol: https
httpPort: 9200
transportPort: 9300
metricsPort: 9600

service:
labels: {}
Expand Down
1 change: 1 addition & 0 deletions charts/opensearch/ci/ci-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ enableServiceLinks: true
protocol: https
httpPort: 9200
transportPort: 9300
metricsPort: 9600

service:
labels: {}
Expand Down
2 changes: 2 additions & 0 deletions charts/opensearch/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ spec:
port: {{ .Values.httpPort }}
- name: {{ .Values.service.transportPortName | default "transport" }}
port: {{ .Values.transportPort }}
- name: {{ .Values.service.metricsPortName | default "metrics" }}
port: {{ .Values.metricsPort }}
8 changes: 8 additions & 0 deletions charts/opensearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,16 @@ 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 }}
- name: metrics
containerPort: {{ .Values.metricsPort }}
resources:
{{ toYaml .Values.resources | indent 10 }}
env:
Expand Down
4 changes: 4 additions & 0 deletions charts/opensearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ enableServiceLinks: true
protocol: https
httpPort: 9200
transportPort: 9300
metricsPort: 9600
httpHostPort: ""
transportHostPort: ""

service:
labels: {}
Expand All @@ -270,6 +273,7 @@ service:
annotations: {}
httpPortName: http
transportPortName: transport
metricsPortName: metrics
loadBalancerIP: ""
loadBalancerSourceRanges: []
externalTrafficPolicy: ""
Expand Down

0 comments on commit 1faad7b

Please sign in to comment.