From 0a4b05bceae6517d599217369ab577df40f5524f Mon Sep 17 00:00:00 2001 From: Emma Sax Date: Wed, 20 Dec 2023 14:28:13 -0600 Subject: [PATCH 1/3] Allow passing in custom pod anti-affinity, as well as pod affinity (#495) * Add pod affinity and custom pod anti-affinity as optional parameters Updating URL Allow custom anti-affinity Add a custom option Haha oops Empty commit Try to version bump to a custom version Maybe this will work Use lower chart Try this Now that I know all tests pass, try to go back to 0.0.1 Put all of these back Signed-off-by: Emma Sax * Increment to 2.11.1 (#500) Signed-off-by: Divya Madala Signed-off-by: Emma Sax * Update Changelog Signed-off-by: Emma Sax * Update to 2.17.1 Signed-off-by: Emma Sax * Oops! Signed-off-by: Emma Sax --------- Signed-off-by: Emma Sax Signed-off-by: Divya Madala Co-authored-by: Divya Madala <113469545+Divyaasm@users.noreply.github.com> --- README.md | 4 ++-- charts/opensearch/CHANGELOG.md | 12 +++++++++++- charts/opensearch/Chart.yaml | 2 +- charts/opensearch/README.md | 7 +++++-- .../opensearch/ci/ci-ingress-class-name-values.yaml | 12 +++++++++++- charts/opensearch/ci/ci-rbac-enabled-values.yaml | 12 +++++++++++- charts/opensearch/ci/ci-values.yaml | 12 +++++++++++- charts/opensearch/templates/statefulset.yaml | 11 ++++++++++- charts/opensearch/values.yaml | 12 +++++++++++- 9 files changed, 73 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c60804c4..a4102804 100644 --- a/README.md +++ b/README.md @@ -74,12 +74,12 @@ extraEnvs: ## Change Logs Please review the [OpenSearch](charts/opensearch/CHANGELOG.md) and the -[OpenSearch Dashboards](charts/opensearch-dashboards/CHANGELOG.md) change logs for the latest +[OpenSearch Dashboards](charts/opensearch-dashboards/CHANGELOG.md) change logs for the latest release details. ## Contributing -See [developer guide](DEVELOPER_GUIDE.md) and [how to contribute to this project](CONTRIBUTING.md). +See [developer guide](DEVELOPER_GUIDE.md) and [how to contribute to this project](CONTRIBUTING.md). ## Getting Help diff --git a/charts/opensearch/CHANGELOG.md b/charts/opensearch/CHANGELOG.md index 87ee8251..67ebfe95 100644 --- a/charts/opensearch/CHANGELOG.md +++ b/charts/opensearch/CHANGELOG.md @@ -13,6 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Security --- +## [2.17.1] +### Added +- Added ability to specify custom pod anti-affinity and pod affinity +### Changed +### Deprecated +### Removed +### Fixed +### Security +--- ## [2.17.0] ### Added - Updated OpenSearch appVersion to 2.11.1 @@ -356,7 +365,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.17.0...HEAD +[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.17.1...HEAD +[2.17.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.17.0...opensearch-2.17.1 [2.17.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.16.1...opensearch-2.17.0 [2.16.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.16.0...opensearch-2.16.1 [2.16.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.15.0...opensearch-2.16.0 diff --git a/charts/opensearch/Chart.yaml b/charts/opensearch/Chart.yaml index a46d3189..54242ed9 100644 --- a/charts/opensearch/Chart.yaml +++ b/charts/opensearch/Chart.yaml @@ -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.17.0 +version: 2.17.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 diff --git a/charts/opensearch/README.md b/charts/opensearch/README.md index 29f994f1..7991d37a 100644 --- a/charts/opensearch/README.md +++ b/charts/opensearch/README.md @@ -38,8 +38,9 @@ helm uninstall my-release | Parameter | Description | Default | | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | | `antiAffinityTopologyKey` | The [anti-affinity][] topology key. By default this will prevent multiple Opensearch nodes from running on the same Kubernetes node | `kubernetes.io/hostname` | -| `antiAffinity` | Setting this to hard enforces the [anti-affinity][] rules. If it is set to soft it will be done "best effort". Other values will be ignored | `hard` | +| `antiAffinity` | Setting this to `hard` enforces the [anti-affinity][] rules. If it is set to `soft` it will be done "best effort". Setting it to `custom` will use whatever is set in the `customAntiAffinity` parameter. Other values will be ignored. | `hard` | | `clusterName` | This will be used as the OpenSearch cluster name and should be unique per cluster in the namespace | `opensearch-cluster` | +| `customAntiAffinity` | Allows passing in custom anti-affinity settings as defined in the [anti-affinity][] rules. Using this parameter requires setting the `antiAffinity` parameter to `custom`. | `{}` | | `enableServiceLinks` | Set to false to disabling service links, which can cause slow pod startup times when there are many services in the current namespace. | `true` | | `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` | | `config` | Allows you to add any config files in `/usr/share/opensearch/config/` such as `opensearch.yml` and `log4j2.properties`. String or map format may be used for specifying content of each configuration file. In case of string format, the whole content of the config file will be replaced by new config file value when in case of using map format content of configuration file will be a result of merge. In both cases content passed through tpl. See [values.yaml][] for an example of the formatting (passed through tpl) | `{}` | @@ -74,6 +75,7 @@ helm uninstall my-release | `nodeSelector` | Configurable [nodeSelector][] so that you can target specific nodes for your OpenSearch cluster | `{}` | | `persistence` | Enables a persistent volume for OpenSearch data. | see [values.yaml][] | | `persistence.enableInitChown` | Disable the `fsgroup-volume` initContainer that will update permissions on the persistent disk. | `true` | +| `podAffinity` | Value for the [pod affinity settings][] | `{}` | | `podAnnotations` | Configurable [annotations][] applied to all OpenSearch pods | `{}` | | `podManagementPolicy` | By default Kubernetes [deploys StatefulSets serially][]. This deploys them in parallel so that they can discover each other | `Parallel` | | `podSecurityContext` | Allows you to set the [securityContext][] for the pod | see [values.yaml][] | @@ -142,6 +144,8 @@ helm uninstall my-release [node affinity settings]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature +[pod affinity settings]: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#types-of-inter-pod-affinity-and-anti-affinity + [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ @@ -182,4 +186,3 @@ helm uninstall my-release [exampleStartup]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch/values.yaml#332 [exampleLiveness]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch/values.yaml#340 [exampleReadiness]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch/values.yaml#349 - diff --git a/charts/opensearch/ci/ci-ingress-class-name-values.yaml b/charts/opensearch/ci/ci-ingress-class-name-values.yaml index 1a26e5d5..8c9c4d5b 100644 --- a/charts/opensearch/ci/ci-ingress-class-name-values.yaml +++ b/charts/opensearch/ci/ci-ingress-class-name-values.yaml @@ -233,13 +233,23 @@ priorityClassName: "" antiAffinityTopologyKey: "kubernetes.io/hostname" # Hard means that by default pods will only be scheduled if there are enough nodes for them -# and that they will never end up on the same node. Setting this to soft will do this "best effort" +# and that they will never end up on the same node. Setting this to soft will do this "best effort". +# Setting this to custom will use what is passed into customAntiAffinity. antiAffinity: "soft" +# Allows passing in custom anti-affinity settings as defined in +# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#types-of-inter-pod-affinity-and-anti-affinity +# Using this parameter requires setting antiAffinity to custom. +customAntiAffinity: {} + # This is the node affinity settings as defined in # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature nodeAffinity: {} +# This is the pod affinity settings as defined in +# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#types-of-inter-pod-affinity-and-anti-affinity +podAffinity: {} + # The default is to deploy all pods serially. By setting this to parallel all pods are started at # the same time when bootstrapping the cluster podManagementPolicy: "Parallel" diff --git a/charts/opensearch/ci/ci-rbac-enabled-values.yaml b/charts/opensearch/ci/ci-rbac-enabled-values.yaml index 1c756735..85d5c96e 100755 --- a/charts/opensearch/ci/ci-rbac-enabled-values.yaml +++ b/charts/opensearch/ci/ci-rbac-enabled-values.yaml @@ -233,13 +233,23 @@ priorityClassName: "" antiAffinityTopologyKey: "kubernetes.io/hostname" # Hard means that by default pods will only be scheduled if there are enough nodes for them -# and that they will never end up on the same node. Setting this to soft will do this "best effort" +# and that they will never end up on the same node. Setting this to soft will do this "best effort". +# Setting this to custom will use what is passed into customAntiAffinity. antiAffinity: "soft" +# Allows passing in custom anti-affinity settings as defined in +# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#types-of-inter-pod-affinity-and-anti-affinity +# Using this parameter requires setting antiAffinity to custom. +customAntiAffinity: {} + # This is the node affinity settings as defined in # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature nodeAffinity: {} +# This is the pod affinity settings as defined in +# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#types-of-inter-pod-affinity-and-anti-affinity +podAffinity: {} + # The default is to deploy all pods serially. By setting this to parallel all pods are started at # the same time when bootstrapping the cluster podManagementPolicy: "Parallel" diff --git a/charts/opensearch/ci/ci-values.yaml b/charts/opensearch/ci/ci-values.yaml index 9b0308bd..4450d54c 100755 --- a/charts/opensearch/ci/ci-values.yaml +++ b/charts/opensearch/ci/ci-values.yaml @@ -234,13 +234,23 @@ priorityClassName: "" antiAffinityTopologyKey: "kubernetes.io/hostname" # Hard means that by default pods will only be scheduled if there are enough nodes for them -# and that they will never end up on the same node. Setting this to soft will do this "best effort" +# and that they will never end up on the same node. Setting this to soft will do this "best effort". +# Setting this to custom will use what is passed into customAntiAffinity. antiAffinity: "soft" +# Allows passing in custom anti-affinity settings as defined in +# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#types-of-inter-pod-affinity-and-anti-affinity +# Using this parameter requires setting antiAffinity to custom. +customAntiAffinity: {} + # This is the node affinity settings as defined in # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature nodeAffinity: {} +# This is the pod affinity settings as defined in +# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#types-of-inter-pod-affinity-and-anti-affinity +podAffinity: {} + # The default is to deploy all pods serially. By setting this to parallel all pods are started at # the same time when bootstrapping the cluster podManagementPolicy: "Parallel" diff --git a/charts/opensearch/templates/statefulset.yaml b/charts/opensearch/templates/statefulset.yaml index d5c91a80..ce26175a 100644 --- a/charts/opensearch/templates/statefulset.yaml +++ b/charts/opensearch/templates/statefulset.yaml @@ -100,7 +100,7 @@ spec: nodeSelector: {{ toYaml . | indent 8 }} {{- end }} - {{- if or (eq .Values.antiAffinity "hard") (eq .Values.antiAffinity "soft") .Values.nodeAffinity }} + {{- if or (eq .Values.antiAffinity "hard") (eq .Values.antiAffinity "soft") (eq .Values.antiAffinity "custom") .Values.nodeAffinity .Values.podAffinity }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} @@ -136,6 +136,15 @@ spec: operator: In values: - {{ include "opensearch.name" . }} + {{- else if eq .Values.antiAffinity "custom" }} + {{- with .Values.customAntiAffinity }} + podAntiAffinity: +{{ toYaml . | indent 10 }} + {{- end }} + {{- end }} + {{- with .Values.podAffinity }} + podAffinity: +{{ toYaml . | indent 10 }} {{- end }} {{- with .Values.nodeAffinity }} nodeAffinity: diff --git a/charts/opensearch/values.yaml b/charts/opensearch/values.yaml index 090cb0c8..9de9afde 100644 --- a/charts/opensearch/values.yaml +++ b/charts/opensearch/values.yaml @@ -241,13 +241,23 @@ priorityClassName: "" antiAffinityTopologyKey: "kubernetes.io/hostname" # Hard means that by default pods will only be scheduled if there are enough nodes for them -# and that they will never end up on the same node. Setting this to soft will do this "best effort" +# and that they will never end up on the same node. Setting this to soft will do this "best effort". +# Setting this to custom will use what is passed into customAntiAffinity. antiAffinity: "soft" +# Allows passing in custom anti-affinity settings as defined in +# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#types-of-inter-pod-affinity-and-anti-affinity +# Using this parameter requires setting antiAffinity to custom. +customAntiAffinity: {} + # This is the node affinity settings as defined in # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature nodeAffinity: {} +# This is the pod affinity settings as defined in +# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#types-of-inter-pod-affinity-and-anti-affinity +podAffinity: {} + # This is the pod topology spread constraints # https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ topologySpreadConstraints: [] From ec652f7f9f384c63f80a8eb847a1ded6b220b77e Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Thu, 21 Dec 2023 23:51:11 +0300 Subject: [PATCH 2/3] Fix conflicts and update the chart to 2.17.2 (#497) Signed-off-by: Prudhvi Godithi Co-authored-by: Prudhvi Godithi --- charts/opensearch/CHANGELOG.md | 14 +++++++++++++- charts/opensearch/Chart.yaml | 2 +- charts/opensearch/templates/ingress.yaml | 3 +++ charts/opensearch/values.yaml | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/charts/opensearch/CHANGELOG.md b/charts/opensearch/CHANGELOG.md index 67ebfe95..df75f452 100644 --- a/charts/opensearch/CHANGELOG.md +++ b/charts/opensearch/CHANGELOG.md @@ -12,6 +12,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed ### Fixed ### Security + +--- +## [2.17.2] +### Added +- - Allow user-defined labels on ingress resource +### Changed +### Deprecated +### Removed +### Fixed +### Security --- ## [2.17.1] ### Added @@ -365,7 +375,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.17.1...HEAD +[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.17.2...HEAD +[2.17.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.17.1...opensearch-2.17.2 [2.17.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.17.0...opensearch-2.17.1 [2.17.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.16.1...opensearch-2.17.0 [2.16.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.16.0...opensearch-2.16.1 @@ -402,3 +413,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [2.2.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.1.0...opensearch-2.2.0 [2.1.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.0.1...opensearch-2.1.0 [2.0.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.0.0...opensearch-2.0.1 + diff --git a/charts/opensearch/Chart.yaml b/charts/opensearch/Chart.yaml index 54242ed9..b40f6979 100644 --- a/charts/opensearch/Chart.yaml +++ b/charts/opensearch/Chart.yaml @@ -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.17.1 +version: 2.17.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 diff --git a/charts/opensearch/templates/ingress.yaml b/charts/opensearch/templates/ingress.yaml index 7a4d0da8..d28c304e 100644 --- a/charts/opensearch/templates/ingress.yaml +++ b/charts/opensearch/templates/ingress.yaml @@ -16,6 +16,9 @@ metadata: name: {{ $fullName }} labels: {{- include "opensearch.labels" . | nindent 4 }} + {{- with .Values.ingress.ingressLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- with .Values.ingress.annotations }} annotations: {{ toYaml . | indent 4 }} diff --git a/charts/opensearch/values.yaml b/charts/opensearch/values.yaml index 9de9afde..6e235a5c 100644 --- a/charts/opensearch/values.yaml +++ b/charts/opensearch/values.yaml @@ -402,6 +402,7 @@ ingress: annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" + ingressLabels: {} path: / hosts: - chart-example.local From 90beaed5619a36f1a6379f609605aa15c8684025 Mon Sep 17 00:00:00 2001 From: Yann Defretin Date: Fri, 22 Dec 2023 00:15:04 +0100 Subject: [PATCH 3/3] Add topology spread constraints in dashboards (#505) (#509) Signed-off-by: Yann Defretin --- charts/opensearch-dashboards/CHANGELOG.md | 1 + charts/opensearch-dashboards/Chart.yaml | 2 +- charts/opensearch-dashboards/README.md | 12 +++++----- .../templates/deployment.yaml | 4 ++++ charts/opensearch-dashboards/values.yaml | 22 +++++++++++-------- 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/charts/opensearch-dashboards/CHANGELOG.md b/charts/opensearch-dashboards/CHANGELOG.md index 205c3d04..5e726ae1 100644 --- a/charts/opensearch-dashboards/CHANGELOG.md +++ b/charts/opensearch-dashboards/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- ## [Unreleased] ### Added +- Added support for pod topology spread constraints in Dashboards ### Changed ### Deprecated ### Removed diff --git a/charts/opensearch-dashboards/Chart.yaml b/charts/opensearch-dashboards/Chart.yaml index 65e29856..2f713f0a 100644 --- a/charts/opensearch-dashboards/Chart.yaml +++ b/charts/opensearch-dashboards/Chart.yaml @@ -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.15.0 +version: 2.15.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 diff --git a/charts/opensearch-dashboards/README.md b/charts/opensearch-dashboards/README.md index e72447f4..ebd356bd 100644 --- a/charts/opensearch-dashboards/README.md +++ b/charts/opensearch-dashboards/README.md @@ -19,7 +19,7 @@ ```shell helm install my-release opensearch/opensearch-dashboards -``` + ``` The command deploys OpenSearch Dashboards with its associated components on the Kubernetes cluster in the default configuration. @@ -56,7 +56,7 @@ | `nodeSelector` | Configurable [nodeSelector][] so that you can target specific nodes for your OpenSearch cluster | `{}` | | `podAnnotations` | Configurable [annotations][] applied to all OpenSearch pods | `{}` | | `podSecurityContext` | Allows you to set the [securityContext][] for the pod | see [values.yaml][] | -| `priorityClassName` | The name of the [PriorityClass][]. No default is supplied as the PriorityClass must be created first | `""` | | +| `priorityClassName` | The name of the [PriorityClass][]. No default is supplied as the PriorityClass must be created first | `""` | | `rbac` | Configuration for creating a role, role binding and ServiceAccount as part of this Helm chart with `create: true`. Also can be used to reference an external ServiceAccount with `serviceAccountName: "externalServiceAccountName"` | see [values.yaml][] | | `resources` | Allows you to set the [resources][] for the StatefulSet | see [values.yaml][] | | `secretMounts` | Allows you easily mount a secret as a file inside the StatefulSet. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | @@ -75,11 +75,12 @@ | `service.ipFamilyPolicy` | This sets the preferred ip addresses in case of a dual-stack server, there are three options [PreferDualStack, SingleStack, RequireDualStack], [more information on dual stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/) | `""` | | `service.ipFamilies` | Sets the preferred IP variants and in which order they are preferred, the first family you list is used for the legacy .spec.ClusterIP field, [more information on dual stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/) | `""` | | `tolerations` | Configurable [tolerations][] | `[]` | +| `topologySpreadConstraints` | Configuration for pod [topologySpreadConstraints][] | `[]` | | `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` | | `extraObjects` | Array of extra K8s manifests to deploy | list `[]` | | `autoscaling` | Prerequisite: Install/Configure metrics server, to install use `kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml`, See https://github.com/kubernetes-sigs/metrics-server. Configurable pod autoscaling stratergy to scale based on `targetCPUUtilizationPercentage`, configure `minReplicas` and `maxReplicas` for desired scaling | false | -| `livenessProbe` | Configuration fields for the liveness [probe][] | see [exampleLiveness][] in `values.yaml` -| `readinessProbe` | Configuration fields for the readiness [probe][] | see [exampleReadiness][] in `values.yaml` +| `livenessProbe` | Configuration fields for the liveness [probe][] | see [exampleLiveness][] in `values.yaml`| +| `readinessProbe` | Configuration fields for the readiness [probe][] | see [exampleReadiness][] in `values.yaml`| | `startupProbe` | Configuration fields for the startup [probe][] | see [exampleStartup][] in `values.yaml` | | `plugins.enabled` | Allow/disallow to add 3rd Party / Custom plugins not offered in the default OpenSearchDashboards image | false | | `plugins.installList` | Array containing the Opensearch Dashboards plugins to be installed in container | [] | @@ -91,4 +92,5 @@ [exampleStartup]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch-dashboards/values.yaml#17 [exampleLiveness]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch-dashboards/values.yaml#27 -[exampleReadiness]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch-dashboards/values.yaml#37 \ No newline at end of file +[exampleReadiness]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch-dashboards/values.yaml#37 +[topologySpreadConstraints]: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints diff --git a/charts/opensearch-dashboards/templates/deployment.yaml b/charts/opensearch-dashboards/templates/deployment.yaml index e870fe56..f1d4916a 100644 --- a/charts/opensearch-dashboards/templates/deployment.yaml +++ b/charts/opensearch-dashboards/templates/deployment.yaml @@ -76,6 +76,10 @@ spec: {{- with .Values.tolerations }} tolerations: {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.topologySpreadConstraints }} + topologySpreadConstraints: +{- toYaml .Values.topologySpreadConstraints | nindent 8 }} {{- end }} {{- if .Values.imagePullSecrets }} imagePullSecrets: diff --git a/charts/opensearch-dashboards/values.yaml b/charts/opensearch-dashboards/values.yaml index cc3dc629..524031b4 100644 --- a/charts/opensearch-dashboards/values.yaml +++ b/charts/opensearch-dashboards/values.yaml @@ -114,16 +114,16 @@ config: {} # Dashboards TLS Config (Ensure the cert files are present before enabling SSL - # ssl: - # enabled: true - # key: /usr/share/opensearch-dashboards/certs/dashboards-key.pem - # certificate: /usr/share/opensearch-dashboards/certs/dashboards-crt.pem + # ssl: + # enabled: true + # key: /usr/share/opensearch-dashboards/certs/dashboards-key.pem + # certificate: /usr/share/opensearch-dashboards/certs/dashboards-crt.pem - # determines how dashboards will verify certificates (needs to be none for default opensearch certificates to work) - # opensearch: - # ssl: - # certificateAuthorities: /usr/share/opensearch-dashboards/certs/dashboards-root-ca.pem - # if utilizing custom CA certs for connection to opensearch, provide the CA here + # determines how dashboards will verify certificates (needs to be none for default opensearch certificates to work) + # opensearch: + # ssl: + # certificateAuthorities: /usr/share/opensearch-dashboards/certs/dashboards-root-ca.pem + # if utilizing custom CA certs for connection to opensearch, provide the CA here opensearchDashboardsYml: defaultMode: @@ -210,6 +210,10 @@ tolerations: [] affinity: {} +# This is the pod topology spread constraints +# https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ +topologySpreadConstraints: [] + # -- Array of extra K8s manifests to deploy extraObjects: [] # - apiVersion: secrets-store.csi.x-k8s.io/v1