Skip to content

Commit

Permalink
Expose all fields below spec in eck-elasticsearch Helm chart (#6492)
Browse files Browse the repository at this point in the history
This exposes the 4 fields: image, podDisruptionBudget, serviceAccountName 
and revisionHistoryLimit in the eck-elasticsearch Helm chart.
  • Loading branch information
thbkrkr committed Mar 7, 2023
1 parent 4ca4611 commit ef0d718
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
13 changes: 13 additions & 0 deletions deploy/eck-elasticsearch/templates/elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,16 @@ spec:
{{- end }}
nodeSets:
{{ toYaml .Values.nodeSets | nindent 4 }}
{{- if .Values.image }}
image: {{ .Values.image }}
{{- end }}
{{- if .Values.podDisruptionBudget }}
podDisruptionBudget:
{{- toYaml .Values.podDisruptionBudget | nindent 4 }}
{{- end }}
{{- if .Values.serviceAccountName }}
serviceAccountName: {{ .Values.serviceAccountName }}
{{- end }}
{{- if .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- end }}
45 changes: 45 additions & 0 deletions deploy/eck-elasticsearch/templates/tests/elasticsearch_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,48 @@ tests:
- equal:
path: spec.auth.roles[0].secretName
value: roles-secret-1
- it: should render image properly
set:
image: my.regis.try/es:8
asserts:
- equal:
path: spec.image
value: my.regis.try/es:8
- it: should render image properly
set:
image: my.registry.com/elastic/elasticsearch:8.7.0
asserts:
- equal:
path: spec.image
value: my.registry.com/elastic/elasticsearch:8.7.0
- it: should render podDisruptionBudget properly
set:
podDisruptionBudget:
spec:
minAvailable: 2
selector:
matchLabels:
elasticsearch.k8s.elastic.co/cluster-name: quickstart
asserts:
- equal:
path: spec.podDisruptionBudget
value:
spec:
minAvailable: 2
selector:
matchLabels:
elasticsearch.k8s.elastic.co/cluster-name: quickstart
- it: should render serviceAccountName properly
set:
serviceAccountName: my-sa
asserts:
- equal:
path: spec.serviceAccountName
value: my-sa
- it: should render revisionHistoryLimit properly
set:
revisionHistoryLimit: 2
asserts:
- equal:
path: spec.revisionHistoryLimit
value: 2
27 changes: 27 additions & 0 deletions deploy/eck-elasticsearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#
version: 8.6.1

# Elasticsearch Docker image to deploy
#
# image:

# Labels that will be applied to Elasticsearch.
#
labels: {}
Expand Down Expand Up @@ -118,8 +122,31 @@ remoteClusters: {}
# VolumeClaimDeletePolicy sets the policy for handling deletion of PersistentVolumeClaims for all NodeSets.
# Possible values are DeleteOnScaledownOnly and DeleteOnScaledownAndClusterDeletion.
# Defaults to DeleteOnScaledownAndClusterDeletion if unset.
#
volumeClaimDeletePolicy: ""

# Settings to limit the disruption when pods need to be rescheduled for some reason such as upgrades or routine maintenance.
# Default budget selects all cluster pods and sets `maxUnavailable` to 1.
# To disable, set to the empty value (`{}`).
#
# podDisruptionBudget:
# spec:
# minAvailable: 2
# selector:
# matchLabels:
# elasticsearch.k8s.elastic.co/cluster-name: quickstart


# Used to check access from the current resource to a resource (for ex. a remote Elasticsearch cluster) in a different namespace.
# Can only be used if ECK is enforcing RBAC on references.
#
# serviceAccountName: ""

# Number of revisions to retain to allow rollback in the underlying StatefulSets.
# Defaults to 10.
#
# revisionHistoryLimit: 2

# Node configuration settings.
# The node roles which can be configured here are:
# - "master"
Expand Down

0 comments on commit ef0d718

Please sign in to comment.