Skip to content

Commit

Permalink
Added flag to control the network policy creation (#171)
Browse files Browse the repository at this point in the history
* Added flag to control the network policy creation

Signed-off-by: Rubem Mota <[email protected]>

* Bump Opensearch chart to 1.5.5

Signed-off-by: Rubem Mota <[email protected]>

* Fixed wrong spaces and indentation for opensearch README.md and Changelog.md

Signed-off-by: Rubem Mota <[email protected]>
  • Loading branch information
rubemlrm authored Dec 20, 2021
1 parent 64971d9 commit e45a917
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
15 changes: 11 additions & 4 deletions charts/opensearch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
### Fixed
### Security

---
## [1.5.5]
### Added
- Added `create` flag into the `networkPolicy` resource to enable the creation of a network policy as request, for the cases where an user can't create network policies but want to use this chart.
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [1.5.4]
### Added
Expand All @@ -22,7 +30,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
### Fixed
### Security

---
## [1.5.3]
### Added
Expand Down Expand Up @@ -246,7 +253,8 @@ config:
### Fixed
### Security

[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.5.4...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.5.5...HEAD
[1.5.5]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.5.4...opensearch-1.5.5
[1.5.4]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.5.3...opensearch-1.5.4
[1.5.3]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.5.2...opensearch-1.5.3
[1.5.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.5.1...opensearch-1.5.2
Expand All @@ -270,4 +278,3 @@ config:
[1.0.5]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.0.4...opensearch-1.0.5
[1.0.4]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.0.2...opensearch-1.0.4
[1.0.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.0.1...opensearch-1.0.2

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.5.4
version: 1.5.5

# 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
1 change: 1 addition & 0 deletions charts/opensearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ helm uninstall my-release
| `minimumMasterNodes` | The value for `discovery.zen.minimum_master_nodes` | `2` |
| `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`
| `nodeAffinity` | Value for the [node affinity settings][] | `{}` |
| `nodeGroup` | This is the name that will be used for each group of nodes in the cluster. The name will be `clusterName-nodeGroup-X` , `nameOverride-nodeGroup-X` if a `nameOverride` is specified, and `fullnameOverride-X` if a `fullnameOverride` is specified | `master` |
| `nodeSelector` | Configurable [nodeSelector][] so that you can target specific nodes for your OpenSearch cluster | `{}` |
Expand Down
2 changes: 2 additions & 0 deletions charts/opensearch/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.networkPolicy.create -}}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand All @@ -13,3 +14,4 @@ spec:
podSelector:
matchLabels:
{{ template "opensearch.uname" . }}-transport-client: "true"
{{- end }}
1 change: 1 addition & 0 deletions charts/opensearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ lifecycle: {}
keystore: []

networkPolicy:
create: false
## Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now.
## In order for a Pod to access OpenSearch, it needs to have the following label:
## {{ template "uname" . }}-client: "true"
Expand Down

0 comments on commit e45a917

Please sign in to comment.