-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce ECK-managed resources Helm Charts #5781
Merged
Merged
Changes from 19 commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
d273aa1
Adding initial revision of eck-stack, and eck-kibana charts.
naemono a19716a
Update Chart.yaml to have kubeversion.
naemono 25f1ad4
Update values file with more information.
naemono 67d9135
adding es resource
framsouza 210f6b3
Making things consistent across charts.
naemono 7d3311c
Adding newlines
naemono 1c29c8d
Add public documentation for eck-stack helm chart.
naemono 8507897
Adding helm test script.
naemono 222912a
add newline
naemono bdde4bc
Add makefile entry.
naemono 5457d3d
Add helm test to ci checks
naemono 81e2900
make chart.yaml consistent
naemono 8f9f8da
Adding newlines
naemono 8f091ce
Update newline
naemono c16e54d
Update readme for eck-stack
naemono 174216c
remove todo from eck-stack readme
naemono b9cffc4
quote things to passify spellcheck
naemono 0fcfb91
Quote more vars.
naemono 9ed4c4e
Fix sc2045
naemono 426121e
Updates from first round of reviews.
naemono 44a2373
Update the documentation.
naemono 5dfae51
Fix shellcheck
naemono 8325042
Add note that ECK stack helm charts are enterprise
naemono ef8d97f
Update license note in docs/orchestrating-elastic-stack-applications/…
naemono 71a9154
Update verbiage deploy/eck-stack/README.md
naemono 2ff2fbd
Update verbiage deploy/eck-stack/README.md
naemono ffb1522
Add 'the' to documentation in docs/orchestrating-elastic-stack-appli…
naemono 2c7be26
add 'the' again to docs in docs/orchestrating-elastic-stack-applicat…
naemono 60937d9
Comment out affinity section, as it won't work by default.
naemono ebb0e41
Update public documentation to be more clear.
naemono 2f4c274
Add dedicated master nodes to dedicated examples
naemono a62f8f4
Fix elasticsearch test in eck-elasticsearch chart
naemono bf15730
Fix missing default labels in Elasticsearch.
naemono bffa0b4
Make default quickstart elasticsearchRef work by default.
naemono 4474144
Removing logic that inserts namespace for elasticsearchRef, as operat…
naemono 00bc01a
Move to referencing https://helm.elastic.co helm repository.
naemono 58dde1c
Fix helm tests
naemono 35b9259
Add helm test to pr ci pipeline
naemono a4babf4
Add helm to ci-tools container.
naemono 0317433
Handling Review comments
naemono 614d3cc
Adjust default readme in deploy directory
naemono 148369a
Debugging helm unittest
naemono 04478f1
Fix shellcheck complaining about debugging messages.
naemono 777500b
Try and run helm unittest directly
naemono b5d4320
Install the correct plugin, with static version
naemono 4133b83
Adjust default values for eck-elasticsearch, and eck-kibana for the e…
naemono 0bd2310
Fix test for default elasticsearch name
naemono 5d86328
Remove debugging from helm test script.
naemono 15cffbd
Adjust chart.yaml back to using helm.elastic.co repository.
naemono 44bab71
Use sed to force local changes during helm testing, and not charts in…
naemono 0a61296
Making shellcheck happy
naemono fd43737
Add helm documentation to dev-setup.md.
naemono File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v2 | ||
name: eck-elasticsearch | ||
description: A Helm chart to deploy Elasticsearch managed by the ECK Operator. | ||
type: application | ||
version: 0.1.0 | ||
sources: | ||
- https://github.com/elastic/cloud-on-k8s | ||
- https://github.com/elastic/elasticsearch/ | ||
icon: https://helm.elastic.co/icons/elasticsearch.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
1. Check Elasticsearch cluster status | ||
$ kubectl get es --namespace={{ .Release.Namespace }} -L common.k8s.elastic.co/type=elasticsearch | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
2. Check Elasticsearch pod status | ||
$ kubectl get pods --namespace={{ .Release.Namespace }} -L common.k8s.elastic.co/type=elasticsearch | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
3. Expose Elasticsearch service | ||
$ kubectl port-forward svc/{{ .Values.name }}-es-http 9200 | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "elasticsearch.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "elasticsearch.fullname" -}} | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "elasticsearch.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "elasticsearch.labels" -}} | ||
helm.sh/chart: {{ include "elasticsearch.chart" . }} | ||
{{ include "elasticsearch.selectorLabels" . }} | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{- if .Chart.AppVersion }} | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "elasticsearch.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "elasticsearch.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
apiVersion: elasticsearch.k8s.elastic.co/v1 | ||
kind: Elasticsearch | ||
metadata: | ||
name: {{ required "A name for the Elasticsearch instance is required" .Values.name }} | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
namespace: {{ .Release.Namespace }} | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{- if .Values.labels }} | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
labels: | ||
{{- toYaml .Values.labels | indent 4 }} | ||
{{- end }} | ||
{{- if .Values.annotations }} | ||
annotations: | ||
{{- toYaml .Values.annotations | indent 4 }} | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{- end }} | ||
spec: | ||
{{- if .Values.updateStrategy }} | ||
updateStrategy: | ||
{{- toYaml .Values.updateStrategy | indent 4 }} | ||
{{- end }} | ||
{{- if .Values.secureSettings }} | ||
secureSettings: | ||
{{- toYaml .Values.secureSettings | indent 2 }} | ||
{{- end }} | ||
{{- if .Values.transport }} | ||
transport: | ||
{{- toYaml .Values.transport | indent 4 }} | ||
{{- end }} | ||
version: {{ required "An Elasticsearch version is required" .Values.version }} | ||
{{- if .Values.monitoring }} | ||
monitoring: | ||
{{- toYaml .Values.monitoring | indent 4 }} | ||
{{- end }} | ||
{{- if .Values.remoteClusters }} | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
remoteClusters: | ||
{{- toYaml .Values.remoteClusters | indent 2 }} | ||
{{- end }} | ||
{{- if eq (len .Values.nodeSets) 0 }} | ||
{{ fail "At least one nodeSet is required" }} | ||
{{- end }} | ||
nodeSets: | ||
{{ toYaml .Values.nodeSets | indent 4 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
# Default values for eck-elasticsearch. | ||
# This is a YAML-formatted file. | ||
|
||
# Name of the Elasticsearch instance. | ||
# | ||
name: "quickstart" | ||
|
||
# Version of Elasticsearch. | ||
# | ||
version: 8.2.3 | ||
|
||
# Labels that will be applied to Elasticsearch. | ||
# | ||
labels: {} | ||
|
||
# Annotations that will be applied to Elasticsearch. | ||
# | ||
annotations: {} | ||
|
||
# Settings for configuring stack monitoring. | ||
# ref: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-stack-monitoring.html | ||
# | ||
monitoring: {} | ||
|
||
# Control the Elasticsearch transport module used for internal communication between nodes. | ||
# ref: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-transport-settings.html | ||
# | ||
transport: {} | ||
|
||
# Settings to control how Elasticsearch will be accessed. | ||
# ref: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-accessing-elastic-services.html | ||
# | ||
http: {} | ||
|
||
# Control Elasticsearch Secure Settings. | ||
# ref: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-es-secure-settings.html#k8s-es-secure-settings | ||
# | ||
secureSettings: {} | ||
|
||
# Settings for limiting the number of simultaneous changes to an Elasticsearch cluster. | ||
# ref: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-update-strategy.html | ||
# | ||
# The default are the default settings for ECK. | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# | ||
updateStrategy: {} | ||
|
||
# Controlling of connectivity between remote clusters within the same kubernetes cluster. | ||
# ref: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-remote-clusters.html | ||
# | ||
remoteClusters: {} | ||
|
||
# Node configuration settings. | ||
# The node roles which can be configured here are: | ||
# - "master" | ||
# - "data_hot" | ||
# - "data_cold" | ||
# - "data_frozen" | ||
# - "data_content" | ||
# - "ml" | ||
# - "ingest" | ||
# ref: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-node-configuration.html | ||
# | ||
nodeSets: | ||
- name: default | ||
count: 1 | ||
config: | ||
node.store.allow_mmap: false | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
podTemplate: | ||
spec: | ||
containers: | ||
- name: elasticsearch | ||
resources: | ||
requests: | ||
cpu: 1 | ||
limits: | ||
memory: 1Gi | ||
# Uncomment these lines in case you want to increase vm.max_map_count and/or use initContainers. | ||
# ref: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-virtual-memory.html | ||
# | ||
# initContainers: | ||
# - name: sysctl | ||
# securityContext: | ||
# privileged: true | ||
# runAsUser: 0 | ||
# command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144'] | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v2 | ||
name: eck-kibana | ||
description: A Helm chart to deploy Kibana managed by the ECK Operator. | ||
type: application | ||
version: 0.1.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also having |
||
sources: | ||
- https://github.com/elastic/cloud-on-k8s | ||
- https://github.com/elastic/kibana | ||
icon: https://helm.elastic.co/icons/kibana.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
1. Check Kibana status | ||
$ kubectl get kibana --namespace={{ .Release.Namespace }} -L common.k8s.elastic.co/type=kibana | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
2. Check Kibana pod status | ||
$ kubectl get pods --namespace={{ .Release.Namespace }} -L common.k8s.elastic.co/type=kibana | ||
|
||
3. Expose Kibana service | ||
$ kubectl port-forward svc/{{ .Values.name }}-kb-http 9200 | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "kibana.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "kibana.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "kibana.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "kibana.labels" -}} | ||
helm.sh/chart: {{ include "kibana.chart" . }} | ||
{{ include "kibana.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "kibana.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "kibana.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "kibana.serviceAccountName" -}} | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "kibana.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
apiVersion: kibana.k8s.elastic.co/v1 | ||
kind: Kibana | ||
metadata: | ||
name: {{ required "A name for the Kibana instance is required" .Values.name }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "kibana.labels" . | nindent 4 }} | ||
{{- range $key, $value := .Values.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
annotations: | ||
{{- range $key, $value := .Values.annotations }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
naemono marked this conversation as resolved.
Show resolved
Hide resolved
|
||
spec: | ||
version: {{ required "A Kibana version is required" .Values.version }} | ||
{{- $finalSpec := .Values.spec }} | ||
{{- if and .Values.spec.elasticsearchRef ( not .Values.spec.elasticsearchRef.namespace ) }} | ||
{{- $finalSpec = mustMergeOverwrite (dict) .Values.spec (dict "elasticsearchRef" (dict "namespace" .Release.Namespace )) }} | ||
{{- end }} | ||
{{- toYaml $finalSpec | nindent 2 }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also recommend adding the
appVersion
set to the operator version.