Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
copied helm folder and updated version to 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinkumar12345 committed Dec 17, 2019
1 parent 3f94420 commit 81d52c4
Show file tree
Hide file tree
Showing 28 changed files with 2,511 additions and 0 deletions.
7 changes: 7 additions & 0 deletions helm/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Contributors
A special thanks to the following developers for their contributions to the initial helm chart PR (sorted alphabetically):

- cryptk
- DandyDeveloper
- dcuenot
- miro-grapeup
560 changes: 560 additions & 0 deletions helm/README.md

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions helm/opendistro-es/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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
*~
# Various IDEs
.project
.idea/
*.tmproj
*.tgz
# Helm files
OWNERS
26 changes: 26 additions & 0 deletions helm/opendistro-es/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2019 Viasat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.

appVersion: 1.0.0
description: 'Open Distro for Elasticsearch'
engine: gotpl
kubeVersion: ^1.10.0-0
maintainers:
- email: derek.heldt-werle@viasat.com
name: Derek Heldt-Werle
- email: kalvin.chau@viasat.com
name: Kalvin Chau
name: opendistro-es
sources:
- https://pages.git.viasat.com/ATG/charts
version: 1.1.0
125 changes: 125 additions & 0 deletions helm/opendistro-es/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Copyright 2019 Viasat, Inc.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
A copy of the License is located at
http://www.apache.org/licenses/LICENSE-2.0
or in the "license" file accompanying this file. This file is distributed
on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing
permissions and limitations under the License.
*/}}

{{/*
Expand the name of the chart.
*/}}
{{- define "opendistro-es.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 "opendistro-es.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 -}}


{{/*
Define standard labels for frequently used metadata.
*/}}
{{- define "opendistro-es.labels.standard" -}}
app: {{ template "opendistro-es.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "opendistro-es.kibana.serviceAccountName" -}}
{{- if .Values.kibana.serviceAccount.create -}}
{{ default (include "opendistro-es.fullname" .) .Values.kibana.serviceAccount.name }}-kibana
{{- else -}}
{{ default "default" .Values.kibana.serviceAccount.name }}
{{- end -}}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "opendistro-es.elasticsearch.serviceAccountName" -}}
{{- if .Values.elasticsearch.serviceAccount.create -}}
{{ default (include "opendistro-es.fullname" .) .Values.elasticsearch.serviceAccount.name }}-es
{{- else -}}
{{ default "default" .Values.elasticsearch.serviceAccount.name }}
{{- end -}}
{{- end -}}

{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "opendistro-es.imagePullSecrets" -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
Also, we can not use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- else if or .Values.kibana.imagePullSecrets .Values.elasticsearch.imagePullSecrets .Values.elasticsearch.initContainer.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.kibana.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- range .Values.elasticsearch.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- range .Values.elasticsearch.initContainer.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end -}}
{{- else if or .Values.kibana.imagePullSecrets .Values.elasticsearch.imagePullSecrets .Values.elasticsearch.initContainer.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.kibana.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- range .Values.elasticsearch.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- range .Values.elasticsearch.initContainer.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end -}}
{{- end -}}

{{- define "master-nodes" -}}
{{- template "opendistro-es.fullname" . -}}-master
{{- end -}}

{{- define "initial-master-nodes" -}}
{{- $replicas := .Values.elasticsearch.master.replicas | int }}
{{- range $i, $e := untilStep 0 $replicas 1 -}}
{{ template "master-nodes" $ }}-{{ $i }},
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2019 Viasat, Inc.
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.

{{ if .Values.elasticsearch.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "opendistro-es.elasticsearch.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "opendistro-es.labels.standard" . | indent 4 }}
{{ end }}

Loading

0 comments on commit 81d52c4

Please sign in to comment.