summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/elasticsearch/components
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/elasticsearch/components')
-rw-r--r--kubernetes/common/elasticsearch/components/Makefile51
-rw-r--r--kubernetes/common/elasticsearch/components/curator/hooks/job.install.yaml4
-rw-r--r--kubernetes/common/elasticsearch/components/curator/requirements.yaml3
-rw-r--r--kubernetes/common/elasticsearch/components/curator/templates/configmap.yaml2
-rw-r--r--kubernetes/common/elasticsearch/components/curator/templates/cronjob.yaml4
-rw-r--r--kubernetes/common/elasticsearch/components/curator/templates/podsecuritypolicy.yaml2
-rw-r--r--kubernetes/common/elasticsearch/components/curator/templates/role.yaml2
-rw-r--r--kubernetes/common/elasticsearch/components/curator/templates/rolebinding.yaml2
-rw-r--r--kubernetes/common/elasticsearch/components/curator/templates/serviceaccount.yaml2
-rw-r--r--kubernetes/common/elasticsearch/components/curator/values.yaml20
-rw-r--r--kubernetes/common/elasticsearch/components/data/requirements.yaml3
-rw-r--r--kubernetes/common/elasticsearch/components/data/templates/pv.yaml2
-rw-r--r--kubernetes/common/elasticsearch/components/data/templates/serviceaccount.yaml2
-rw-r--r--kubernetes/common/elasticsearch/components/data/templates/statefulset.yaml20
-rw-r--r--kubernetes/common/elasticsearch/components/data/values.yaml42
-rw-r--r--kubernetes/common/elasticsearch/components/master/requirements.yaml3
-rw-r--r--kubernetes/common/elasticsearch/components/master/templates/pv.yaml2
-rw-r--r--kubernetes/common/elasticsearch/components/master/templates/serviceaccount.yaml2
-rw-r--r--kubernetes/common/elasticsearch/components/master/templates/statefulset.yaml20
-rw-r--r--kubernetes/common/elasticsearch/components/master/templates/svc.yaml4
-rw-r--r--kubernetes/common/elasticsearch/components/master/values.yaml65
21 files changed, 172 insertions, 85 deletions
diff --git a/kubernetes/common/elasticsearch/components/Makefile b/kubernetes/common/elasticsearch/components/Makefile
new file mode 100644
index 0000000000..f2e7a1fb82
--- /dev/null
+++ b/kubernetes/common/elasticsearch/components/Makefile
@@ -0,0 +1,51 @@
+# Copyright © 2020 Samsung Electronics
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License 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.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES := soHelpers
+HELM_BIN := helm
+HELM_CHARTS := soHelpers $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+ @echo "\n[$@]"
+ @make package-$@
+
+make-%:
+ @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+ @if [ -f $*/requirements.yaml ]; then $(HELM_BIN) dep up $*; fi
+
+lint-%: dep-%
+ @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) lint $*; fi
+
+package-%: lint-%
+ @mkdir -p $(PACKAGE_DIR)
+ @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+ @$(HELM_BIN) repo index $(PACKAGE_DIR)
+
+clean:
+ @rm -f */requirements.lock
+ @rm -f *tgz */charts/*tgz
+ @rm -rf $(PACKAGE_DIR)
+%:
+ @:
diff --git a/kubernetes/common/elasticsearch/components/curator/hooks/job.install.yaml b/kubernetes/common/elasticsearch/components/curator/hooks/job.install.yaml
index 7e73420e13..e1d6cbabbb 100644
--- a/kubernetes/common/elasticsearch/components/curator/hooks/job.install.yaml
+++ b/kubernetes/common/elasticsearch/components/curator/hooks/job.install.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
# 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.enabled }}
{{- range $kind, $enabled := .Values.hooks }}
{{- if $enabled }}
@@ -45,7 +47,7 @@ spec:
{{- end }}
containers:
- name: {{ template "common.fullname" . }}-curator
- image: {{printf "%s/%s:%s" (include "common.repository" .) .Values.image.imageName .Values.image.tag }}
+ image: {{printf "%s/%s" (include "repositoryGenerator.repository" .) .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
volumeMounts:
- name: config-volume
diff --git a/kubernetes/common/elasticsearch/components/curator/requirements.yaml b/kubernetes/common/elasticsearch/components/curator/requirements.yaml
index e9a5a5f61a..fbdf7b8489 100644
--- a/kubernetes/common/elasticsearch/components/curator/requirements.yaml
+++ b/kubernetes/common/elasticsearch/components/curator/requirements.yaml
@@ -16,3 +16,6 @@ dependencies:
- name: common
version: ~6.x-0
repository: 'file://../../../common'
+ - name: repositoryGenerator
+ version: ~6.x-0
+ repository: 'file://../../../repositoryGenerator'
diff --git a/kubernetes/common/elasticsearch/components/curator/templates/configmap.yaml b/kubernetes/common/elasticsearch/components/curator/templates/configmap.yaml
index dc2a430922..2af57aae77 100644
--- a/kubernetes/common/elasticsearch/components/curator/templates/configmap.yaml
+++ b/kubernetes/common/elasticsearch/components/curator/templates/configmap.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
# 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.enabled }}
apiVersion: v1
kind: ConfigMap
diff --git a/kubernetes/common/elasticsearch/components/curator/templates/cronjob.yaml b/kubernetes/common/elasticsearch/components/curator/templates/cronjob.yaml
index 901c0a5c06..ff63cf00b1 100644
--- a/kubernetes/common/elasticsearch/components/curator/templates/cronjob.yaml
+++ b/kubernetes/common/elasticsearch/components/curator/templates/cronjob.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
# 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.enabled }}
{{ $role := "curator" -}}
{{ $suffix := $role -}}
@@ -74,7 +76,7 @@ spec:
{{- end }}
containers:
- name: {{ template "common.fullname" . }}-curator
- image: {{printf "%s/%s:%s" (include "common.repository" .) .Values.image.imageName .Values.image.tag }}
+ image: {{printf "%s/%s" (include "repositoryGenerator.repository" .) .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
volumeMounts:
- name: config-volume
diff --git a/kubernetes/common/elasticsearch/components/curator/templates/podsecuritypolicy.yaml b/kubernetes/common/elasticsearch/components/curator/templates/podsecuritypolicy.yaml
index 6fe032d818..628cdd1d73 100644
--- a/kubernetes/common/elasticsearch/components/curator/templates/podsecuritypolicy.yaml
+++ b/kubernetes/common/elasticsearch/components/curator/templates/podsecuritypolicy.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
# 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 and .Values.enabled .Values.psp.create }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
diff --git a/kubernetes/common/elasticsearch/components/curator/templates/role.yaml b/kubernetes/common/elasticsearch/components/curator/templates/role.yaml
index 0d189f448b..f124a44c85 100644
--- a/kubernetes/common/elasticsearch/components/curator/templates/role.yaml
+++ b/kubernetes/common/elasticsearch/components/curator/templates/role.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
# 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 and .Values.enabled .Values.rbac.enabled }}
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
diff --git a/kubernetes/common/elasticsearch/components/curator/templates/rolebinding.yaml b/kubernetes/common/elasticsearch/components/curator/templates/rolebinding.yaml
index b112468dc3..f10b14231f 100644
--- a/kubernetes/common/elasticsearch/components/curator/templates/rolebinding.yaml
+++ b/kubernetes/common/elasticsearch/components/curator/templates/rolebinding.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
# 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 and .Values.enabled .Values.rbac.enabled }}
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
diff --git a/kubernetes/common/elasticsearch/components/curator/templates/serviceaccount.yaml b/kubernetes/common/elasticsearch/components/curator/templates/serviceaccount.yaml
index 0bd4ae0999..a1732cfedc 100644
--- a/kubernetes/common/elasticsearch/components/curator/templates/serviceaccount.yaml
+++ b/kubernetes/common/elasticsearch/components/curator/templates/serviceaccount.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
# 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 and .Values.enabled .Values.serviceAccount.create .Values.rbac.enabled }}
apiVersion: v1
kind: ServiceAccount
diff --git a/kubernetes/common/elasticsearch/components/curator/values.yaml b/kubernetes/common/elasticsearch/components/curator/values.yaml
index 5e0d9668d3..62964ff973 100644
--- a/kubernetes/common/elasticsearch/components/curator/values.yaml
+++ b/kubernetes/common/elasticsearch/components/curator/values.yaml
@@ -22,7 +22,7 @@ global:
mountPath: /dockerdata-nfs/backup
storageClass:
clusterName: cluster.local
-repositoryOverride: docker.io
+
#################################################################
# Application configuration defaults.
#################################################################
@@ -31,16 +31,14 @@ repositoryOverride: docker.io
##
enabled: false
name: curator
-image:
- imageName: bitnami/elasticsearch-curator
- tag: 5.8.1-debian-9-r74
- pullPolicy: IfNotPresent
- ## Optionally specify an array of imagePullSecrets.
- ## Secrets must be manually created in the namespace.
- ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
- ##
- # pullSecrets:
- # - myRegistryKeySecretName
+image: bitnami/elasticsearch-curator:5.8.1-debian-9-r74
+pullPolicy: IfNotPresent
+## Optionally specify an array of imagePullSecrets.
+## Secrets must be manually created in the namespace.
+## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
+##
+# pullSecrets:
+# - myRegistryKeySecretName
service:
port: 9200
cronjob:
diff --git a/kubernetes/common/elasticsearch/components/data/requirements.yaml b/kubernetes/common/elasticsearch/components/data/requirements.yaml
index a1f72ffc60..ba64f9630e 100644
--- a/kubernetes/common/elasticsearch/components/data/requirements.yaml
+++ b/kubernetes/common/elasticsearch/components/data/requirements.yaml
@@ -16,3 +16,6 @@ dependencies:
- name: common
version: ~6.x-0
repository: 'file://../../../common'
+ - name: repositoryGenerator
+ version: ~6.x-0
+ repository: 'file://../../../repositoryGenerator'
diff --git a/kubernetes/common/elasticsearch/components/data/templates/pv.yaml b/kubernetes/common/elasticsearch/components/data/templates/pv.yaml
index c713ec81ac..133984c800 100644
--- a/kubernetes/common/elasticsearch/components/data/templates/pv.yaml
+++ b/kubernetes/common/elasticsearch/components/data/templates/pv.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,5 +12,6 @@
# 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.
+*/}}
{{ include "common.replicaPV" (dict "dot" . "suffix" .Values.persistence.suffix )}}
diff --git a/kubernetes/common/elasticsearch/components/data/templates/serviceaccount.yaml b/kubernetes/common/elasticsearch/components/data/templates/serviceaccount.yaml
index 2ac3880886..4a8ef08946 100644
--- a/kubernetes/common/elasticsearch/components/data/templates/serviceaccount.yaml
+++ b/kubernetes/common/elasticsearch/components/data/templates/serviceaccount.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
# 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.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
diff --git a/kubernetes/common/elasticsearch/components/data/templates/statefulset.yaml b/kubernetes/common/elasticsearch/components/data/templates/statefulset.yaml
index 994b458e33..ea805c1813 100644
--- a/kubernetes/common/elasticsearch/components/data/templates/statefulset.yaml
+++ b/kubernetes/common/elasticsearch/components/data/templates/statefulset.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,11 +12,12 @@
# 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.
+*/}}
apiVersion: apps/v1
kind: StatefulSet
{{ $role := "data" -}}
{{ $suffix := $role -}}
-{{ $labels := (dict "role" $role "discovery" (include "elasticsearch.clustername" .)) -}}
+{{ $labels := (dict "role" $role "discovery" .Values.cluster_name) -}}
metadata: {{- include "common.resourceMetadata" (dict "suffix" $suffix "labels" $labels "dot" . )| nindent 2 }}
spec:
updateStrategy:
@@ -32,7 +34,8 @@ spec:
template:
metadata: {{- include "common.templateMetadata" (dict "labels" $labels "dot" .) | nindent 6 }}
spec:
-{{- include "elasticsearch.imagePullSecrets" . | nindent 6 }}
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
{{- if .Values.affinity }}
affinity: {{- include "common.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- end }}
@@ -42,7 +45,6 @@ spec:
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplValue" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
- serviceAccountName: {{ template "elasticsearch.data.serviceAccountName" . }}
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
@@ -52,7 +54,7 @@ spec:
{{- if .Values.sysctlImage.enabled }}
## Image that performs the sysctl operation to modify Kernel settings (needed sometimes to avoid boot errors)
- name: sysctl
- image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
+ image: {{ include "repositoryGenerator.image.busybox" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command:
- /bin/sh
@@ -67,7 +69,7 @@ spec:
{{- end }}
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
- name: volume-permissions
- image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
+ image: {{ include "repositoryGenerator.image.busybox" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command:
- /bin/sh
@@ -85,8 +87,8 @@ spec:
{{- end }}
{{- end }}
containers:
- - name: {{ include "common.name" . }}-elasticsearch
- image: {{ printf "%s/%s:%s" (include "common.repository" .) .Values.image.imageName .Values.image.tag }}
+ - name: {{ include "common.name" . }}-data
+ image: {{ printf "%s/%s" (include "repositoryGenerator.dockerHubRepository" .) .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
{{- if .Values.securityContext.enabled }}
securityContext:
@@ -94,9 +96,9 @@ spec:
{{- end }}
env:
- name: BITNAMI_DEBUG
- value: {{ ternary "true" "false" .Values.image.debug | quote }}
+ value: {{ ternary "true" "false" .Values.debug | quote }}
- name: ELASTICSEARCH_CLUSTER_NAME
- value: {{include "elasticsearch.clustername" .}}
+ value: {{ .Values.cluster_name }}
- name: ELASTICSEARCH_CLUSTER_HOSTS
value: {{ include "common.name" . }}-discovery
{{- if .Values.plugins }}
diff --git a/kubernetes/common/elasticsearch/components/data/values.yaml b/kubernetes/common/elasticsearch/components/data/values.yaml
index cfb7f51da3..1328a20439 100644
--- a/kubernetes/common/elasticsearch/components/data/values.yaml
+++ b/kubernetes/common/elasticsearch/components/data/values.yaml
@@ -1,4 +1,5 @@
-# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
+# Copyright (c) 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
+# Modification Copyright (c) 2020 Nokia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -21,10 +22,13 @@ global:
backup:
mountPath: /dockerdata-nfs/backup
storageClass:
-repositoryOverride: docker.io
+
#################################################################
# Application configuration defaults.
#################################################################
+
+cluster_name: onap
+
## Init containers parameters:
sysctlImage:
enabled: true
@@ -46,24 +50,22 @@ service:
- name: http-transport
port: 9300
-image:
- imageName: bitnami/elasticsearch
- tag: 6.8.6-debian-9-r23
- ## Specify a imagePullPolicy
- ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
- ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
- ##
- pullPolicy: IfNotPresent
- ## Optionally specify an array of imagePullSecrets.
- ## Secrets must be manually created in the namespace.
- ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
- ##
- # pullSecrets:
- # - myRegistryKeySecretName
- ## Set to true if you would like to see extra information on logs
- ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
- ##
- debug: false
+image: bitnami/elasticsearch:7.9.3
+## Specify a imagePullPolicy
+## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
+## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
+##
+pullPolicy: IfNotPresent
+## Optionally specify an array of imagePullSecrets.
+## Secrets must be manually created in the namespace.
+## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
+##
+# pullSecrets:
+# - myRegistryKeySecretName
+## Set to true if you would like to see extra information on logs
+## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
+##
+debug: false
## updateStrategy for ElasticSearch Data statefulset
diff --git a/kubernetes/common/elasticsearch/components/master/requirements.yaml b/kubernetes/common/elasticsearch/components/master/requirements.yaml
index a1f72ffc60..ba64f9630e 100644
--- a/kubernetes/common/elasticsearch/components/master/requirements.yaml
+++ b/kubernetes/common/elasticsearch/components/master/requirements.yaml
@@ -16,3 +16,6 @@ dependencies:
- name: common
version: ~6.x-0
repository: 'file://../../../common'
+ - name: repositoryGenerator
+ version: ~6.x-0
+ repository: 'file://../../../repositoryGenerator'
diff --git a/kubernetes/common/elasticsearch/components/master/templates/pv.yaml b/kubernetes/common/elasticsearch/components/master/templates/pv.yaml
index c713ec81ac..133984c800 100644
--- a/kubernetes/common/elasticsearch/components/master/templates/pv.yaml
+++ b/kubernetes/common/elasticsearch/components/master/templates/pv.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,5 +12,6 @@
# 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.
+*/}}
{{ include "common.replicaPV" (dict "dot" . "suffix" .Values.persistence.suffix )}}
diff --git a/kubernetes/common/elasticsearch/components/master/templates/serviceaccount.yaml b/kubernetes/common/elasticsearch/components/master/templates/serviceaccount.yaml
index 05a3af37f2..323b9fc318 100644
--- a/kubernetes/common/elasticsearch/components/master/templates/serviceaccount.yaml
+++ b/kubernetes/common/elasticsearch/components/master/templates/serviceaccount.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
# 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.serviceAccount.create }}
diff --git a/kubernetes/common/elasticsearch/components/master/templates/statefulset.yaml b/kubernetes/common/elasticsearch/components/master/templates/statefulset.yaml
index dfa3ccbacc..a35b4bf741 100644
--- a/kubernetes/common/elasticsearch/components/master/templates/statefulset.yaml
+++ b/kubernetes/common/elasticsearch/components/master/templates/statefulset.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,12 +12,13 @@
# 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.
+*/}}
apiVersion: apps/v1
kind: StatefulSet
{{ $role := "master" -}}
{{ $suffix := $role -}}
-{{ $labels := (dict "role" $role "discovery" (include "elasticsearch.clustername" .)) -}}
+{{ $labels := (dict "role" $role "discovery" .Values.cluster_name) -}}
metadata: {{- include "common.resourceMetadata" (dict "suffix" $suffix "labels" $labels "dot" . )| nindent 2 }}
spec:
updateStrategy:
@@ -30,7 +32,8 @@ spec:
template:
metadata: {{- include "common.templateMetadata" (dict "labels" $labels "dot" .) | nindent 6 }}
spec:
-{{- include "elasticsearch.imagePullSecrets" . | nindent 6 }}
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
{{- if .Values.affinity }}
affinity: {{- include "common.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- end }}
@@ -40,7 +43,6 @@ spec:
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplValue" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
- serviceAccountName: {{ template "elasticsearch.serviceAccountName" . }}
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
@@ -50,7 +52,7 @@ spec:
{{- if .Values.sysctlImage.enabled }}
## Image that performs the sysctl operation to modify Kernel settings (needed sometimes to avoid boot errors)
- name: sysctl
- image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
+ image: {{ include "repositoryGenerator.image.busybox" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command:
- /bin/sh
@@ -65,7 +67,7 @@ spec:
{{- end }}
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
- name: volume-permissions
- image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
+ image: {{ include "repositoryGenerator.image.busybox" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command:
- /bin/sh
@@ -83,8 +85,8 @@ spec:
{{- end }}
{{- end }}
containers:
- - name: {{ include "common.name" . }}-elasticsearch
- image: {{ printf "%s/%s:%s" (include "common.repository" .) .Values.image.imageName .Values.image.tag }}
+ - name: {{ include "common.name" . }}-master
+ image: {{ printf "%s/%s" (include "repositoryGenerator.dockerHubRepository" .) .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
{{- if .Values.securityContext.enabled }}
securityContext:
@@ -92,9 +94,9 @@ spec:
{{- end }}
env:
- name: BITNAMI_DEBUG
- value: {{ ternary "true" "false" .Values.image.debug | quote }}
+ value: {{ ternary "true" "false" .Values.debug | quote }}
- name: ELASTICSEARCH_CLUSTER_NAME
- value: {{ include "elasticsearch.clustername" . }}
+ value: {{ .Values.cluster_name }}
- name: ELASTICSEARCH_CLUSTER_HOSTS
value: {{ include "common.name" . }}-discovery
- name: ELASTICSEARCH_CLUSTER_MASTER_HOSTS
diff --git a/kubernetes/common/elasticsearch/components/master/templates/svc.yaml b/kubernetes/common/elasticsearch/components/master/templates/svc.yaml
index 8d66ef082e..ca94e242a4 100644
--- a/kubernetes/common/elasticsearch/components/master/templates/svc.yaml
+++ b/kubernetes/common/elasticsearch/components/master/templates/svc.yaml
@@ -1,3 +1,4 @@
+{{/*
# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,9 +12,10 @@
# 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.
+*/}}
{{ $role := "master" -}}
{{ $labels := (dict "role" $role) -}}
{{ $matchLabels := (dict "role" $role) }}
-{{ include "common.service" (dict "labels" $labels "matchLabels" $matchLabels "dot" . ) }} \ No newline at end of file
+{{ include "common.service" (dict "labels" $labels "matchLabels" $matchLabels "dot" . ) }}
diff --git a/kubernetes/common/elasticsearch/components/master/values.yaml b/kubernetes/common/elasticsearch/components/master/values.yaml
index 2862692eef..33804494e9 100644
--- a/kubernetes/common/elasticsearch/components/master/values.yaml
+++ b/kubernetes/common/elasticsearch/components/master/values.yaml
@@ -1,4 +1,5 @@
-# Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
+# Copyright (c) 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
+# Modification Copyright (c) 2020 Nokia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
#################################################################
# Global configuration defaults.
#################################################################
@@ -22,10 +22,13 @@ global:
backup:
mountPath: /dockerdata-nfs/backup
storageClass:
-repositoryOverride: docker.io
+
#################################################################
# Application configuration defaults.
#################################################################
+
+cluster_name: onap
+
## Init containers parameters:
sysctlImage:
enabled: true
@@ -41,26 +44,24 @@ name: master
##
replicaCount: 3
## master acts as master only node, choose 'no' if no further data nodes are deployed)
-dedicatednode: "yes"
+dedicatednode: 'yes'
## dedicatednode: "no"
-image:
- imageName: bitnami/elasticsearch
- tag: 6.8.6-debian-9-r23
- ## Specify a imagePullPolicy
- ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
- ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
- ##
- pullPolicy: IfNotPresent
- ## Optionally specify an array of imagePullSecrets.
- ## Secrets must be manually created in the namespace.
- ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
- ##
- # pullSecrets:
- # - myRegistryKeySecretName
- ## Set to true if you would like to see extra information on logs
- ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
- ##
- debug: false
+image: bitnami/elasticsearch:7.9.3
+## Specify a imagePullPolicy
+## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
+## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
+##
+pullPolicy: IfNotPresent
+## Optionally specify an array of imagePullSecrets.
+## Secrets must be manually created in the namespace.
+## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
+##
+# pullSecrets:
+# - myRegistryKeySecretName
+## Set to true if you would like to see extra information on logs
+## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
+##
+debug: false
## String to partially override common.fullname template (will maintain the release name)
##
@@ -104,12 +105,14 @@ resources:
## We usually recommend not to specify default resources and to leave this as a conscious
## choice for the user. This also increases chances charts run on environments with little
## resources, such as Minikube.
- limits: {}
+ limits:
+ cpu: 250m
+ memory: 1536Mi
# cpu: 100m
# memory: 128Mi
requests:
- cpu: 25m
- memory: 256Mi
+ cpu: 5m
+ memory: 310Mi
## Elasticsearch master-eligible container's liveness and readiness probes
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
##
@@ -162,13 +165,13 @@ persistence:
## Service parameters for master-eligible node(s)
##
service:
- suffix: "service"
- name: ""
+ suffix: 'service'
+ name: ''
## list of ports for "common.containerPorts"
## Elasticsearch transport port
ports:
- - name: http-transport
- port: 9300
+ - name: http-transport
+ port: 9300
## master-eligible service type
##
type: ClusterIP
@@ -194,10 +197,6 @@ serviceAccount:
## If not set and create is true, a name is generated using the fullname template
# name:
-
## Elasticsearch cluster name
##
clusterName: elastic-cluster
-
-
-