Add common helm chart 07/31507/10
authorMike Elliott <mike.elliott@amdocs.com>
Mon, 12 Feb 2018 20:33:55 +0000 (15:33 -0500)
committerAlexis de Talhouët <alexis.de_talhouet@bell.ca>
Fri, 23 Feb 2018 20:32:30 +0000 (20:32 +0000)
This helm chart provides common base templates that should be
included in each onap subchart. This chart is included as a
dependency within a charts requirements.yaml.

Change-Id: I0f4e155bcca31de79aa57b4ce45d26e86069ef72
Issue-ID: OOM-265
Signed-off-by: Mike Elliott <mike.elliott@amdocs.com>
kubernetes/common/common-templates/.helmignore [new file with mode: 0644]
kubernetes/common/common-templates/Chart.yaml [new file with mode: 0644]
kubernetes/common/common-templates/templates/_name.tpl [new file with mode: 0644]
kubernetes/common/common-templates/templates/_namespace.tpl [new file with mode: 0644]
kubernetes/common/common-templates/values.yaml [new file with mode: 0644]

diff --git a/kubernetes/common/common-templates/.helmignore b/kubernetes/common/common-templates/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/kubernetes/common/common-templates/Chart.yaml b/kubernetes/common/common-templates/Chart.yaml
new file mode 100644 (file)
index 0000000..0113575
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: Common templates for inclusion in other charts
+name: common-templates
+version: 2.0.0
diff --git a/kubernetes/common/common-templates/templates/_name.tpl b/kubernetes/common/common-templates/templates/_name.tpl
new file mode 100644 (file)
index 0000000..f6c221f
--- /dev/null
@@ -0,0 +1,15 @@
+{{/*
+  Expand the name of a chart.
+*/}}
+{{- define "common.name" -}}
+  {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+  Create a default fully qualified application name.
+  Truncated at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "common.fullname" -}}
+  {{- $name := default .Chart.Name .Values.nameOverride -}}
+  {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
\ No newline at end of file
diff --git a/kubernetes/common/common-templates/templates/_namespace.tpl b/kubernetes/common/common-templates/templates/_namespace.tpl
new file mode 100644 (file)
index 0000000..076fd53
--- /dev/null
@@ -0,0 +1,13 @@
+{{/*
+  Resolve the namespace to apply to a chart. The default namespace suffix
+  is the name of the chart. This can be overridden if necessary (eg. for subcharts)
+  using the following value:
+
+  - .Values.nsPrefix  : override namespace prefix
+  - .Values.nsSuffix  : override namespace suffix
+*/}}
+{{- define "common.namespace" -}}
+  {{- $prefix := default .Release.Name .Values.nsPrefix -}}
+  {{- $suffix := default .Chart.Name .Values.nsSuffix -}}
+  {{- printf "%s-%s" $prefix $suffix -}}
+{{- end -}}
diff --git a/kubernetes/common/common-templates/values.yaml b/kubernetes/common/common-templates/values.yaml
new file mode 100644 (file)
index 0000000..1128757
--- /dev/null
@@ -0,0 +1,31 @@
+#################################################################
+# Global configuration default values that can be inherited by
+# all subcharts.
+#################################################################
+global:
+  # Change to an unused port prefix range to prevent port conflicts
+  # with other instances running within the same k8s cluster
+  nodePortPrefix: 302
+
+  # image repositories
+  repository: nexus3.onap.org:10001
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+
+  # readiness check
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+
+  # logging agent
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+  # image pull policy
+  pullPolicy: Always
+
+  # default mount path root directory referenced
+  # by persistent volumes and log files
+  persistence:
+    mountPath: /dockerdata-nfs
+
+  # flag to enable debugging - application support required
+  debugEnabled: true
\ No newline at end of file