[CORD-3057] Charts for the hippie-oss service
Change-Id: Icbdfd3bec6a43d99b6a56988e25b523879941b5f
diff --git a/examples/image-tag-candidate.yaml b/examples/image-tag-candidate.yaml
index 71f614a..6c6480e 100644
--- a/examples/image-tag-candidate.yaml
+++ b/examples/image-tag-candidate.yaml
@@ -45,3 +45,5 @@
rcord_synchronizerImage: 'xosproject/rcord-synchronizer:candidate'
simpleexampleservice:
simpleexampleservice_synchronizerImage: 'xosproject/simpleexampleservice-synchronizer:candidate'
+
+hippieOSS_synchronizerImage: 'xosproject/hippie-oss-synchronizer:candidate'
diff --git a/xos-services/hippie-oss/.helmignore b/xos-services/hippie-oss/.helmignore
new file mode 100644
index 0000000..f0c1319
--- /dev/null
+++ b/xos-services/hippie-oss/.helmignore
@@ -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/xos-services/hippie-oss/Chart.yaml b/xos-services/hippie-oss/Chart.yaml
new file mode 100644
index 0000000..5bf1244
--- /dev/null
+++ b/xos-services/hippie-oss/Chart.yaml
@@ -0,0 +1,21 @@
+---
+
+# Copyright 2018-present Open Networking Foundation
+#
+# 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.
+
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for XOS's "hippie-oss" service
+name: hippie-oss
+version: 0.1.0
diff --git a/xos-services/hippie-oss/templates/_helpers.tpl b/xos-services/hippie-oss/templates/_helpers.tpl
new file mode 100644
index 0000000..f395a0c
--- /dev/null
+++ b/xos-services/hippie-oss/templates/_helpers.tpl
@@ -0,0 +1,82 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Copyright 2018-present Open Networking Foundation
+
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "hippie-oss.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 "hippie-oss.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 "hippie-oss.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "hippie-oss.serviceConfig" -}}
+name: hippie-oss
+accessor:
+ username: {{ .Values.xosAdminUser | quote }}
+ password: {{ .Values.xosAdminPassword | quote }}
+ endpoint: xos-core:50051
+event_bus:
+ endpoint: cord-kafka-kafka
+ kind: kafka
+required_models:
+ - HippieOSSService
+ - HippieOSSServiceInstance
+ - RCORDSubscriber
+dependency_graph: "/opt/xos/synchronizers/hippie-oss/model-deps"
+model_policies_dir: "/opt/xos/synchronizers/hippie-oss/model_policies"
+models_dir: "/opt/xos/synchronizers/hippie-oss/models"
+steps_dir: "/opt/xos/synchronizers/hippie-oss/steps"
+logging:
+ version: 1
+ handlers:
+ console:
+ class: logging.StreamHandler
+ file:
+ class: logging.handlers.RotatingFileHandler
+ filename: /var/log/xos.log
+ maxBytes: 10485760
+ backupCount: 5
+ loggers:
+ 'multistructlog':
+ handlers:
+ - console
+ - file
+ level: DEBUG
+{{- end -}}
diff --git a/xos-services/hippie-oss/templates/_tosca.tpl b/xos-services/hippie-oss/templates/_tosca.tpl
new file mode 100644
index 0000000..70caa17
--- /dev/null
+++ b/xos-services/hippie-oss/templates/_tosca.tpl
@@ -0,0 +1,30 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Copyright 2018-present Open Networking Foundation
+
+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.
+*/}}
+{{- define "volt.serviceTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+description: Set up VOLT service
+imports:
+ - custom_types/hippieossservice.yaml
+
+topology_template:
+ node_templates:
+ service#hippie-oss:
+ type: tosca.nodes.HippieOSSService
+ properties:
+ name: hippie-oss
+ kind: OSS
+{{- end -}}
diff --git a/xos-services/hippie-oss/templates/configmap.yaml b/xos-services/hippie-oss/templates/configmap.yaml
new file mode 100644
index 0000000..492fcae
--- /dev/null
+++ b/xos-services/hippie-oss/templates/configmap.yaml
@@ -0,0 +1,22 @@
+---
+# Copyright 2018-present Open Networking Foundation
+#
+# 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.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: hippie-oss
+data:
+ serviceConfig: |
+{{ include "hippie-oss.serviceConfig" . | indent 4 }}
diff --git a/xos-services/hippie-oss/templates/deployment.yaml b/xos-services/hippie-oss/templates/deployment.yaml
new file mode 100644
index 0000000..811fb8a
--- /dev/null
+++ b/xos-services/hippie-oss/templates/deployment.yaml
@@ -0,0 +1,77 @@
+---
+
+# Copyright 2018-present Open Networking Foundation
+#
+# 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.
+
+apiVersion: apps/v1beta2
+kind: Deployment
+metadata:
+ name: {{ template "hippie-oss.fullname" . }}
+ labels:
+ app: {{ template "hippie-oss.name" . }}
+ chart: {{ template "hippie-oss.chart" . }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ selector:
+ matchLabels:
+ app: {{ template "hippie-oss.name" . }}
+ release: {{ .Release.Name }}
+ template:
+ metadata:
+ labels:
+ app: {{ template "hippie-oss.name" . }}
+ release: {{ .Release.Name }}
+ annotations:
+ checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+ spec:
+ containers:
+ - name: {{ .Chart.Name }}
+ image: {{ .Values.hippieOSS_synchronizerImage | quote }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
+ resources:
+{{ toYaml .Values.resources | indent 12 }}
+ volumeMounts:
+ - name: hippie-oss-config
+ mountPath: /opt/xos/synchronizers/hippie-oss/config.yaml
+ subPath: config.yaml
+ - name: certchain-volume
+ mountPath: /usr/local/share/ca-certificates/local_certs.crt
+ subPath: config/ca_cert_chain.pem
+ volumes:
+ - name: hippie-oss-config
+ configMap:
+ name: hippie-oss
+ items:
+ - key: serviceConfig
+ path: config.yaml
+ - name: certchain-volume
+ configMap:
+ name: ca-certificates
+ items:
+ - key: chain
+ path: config/ca_cert_chain.pem
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml . | indent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+ affinity:
+{{ toYaml . | indent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+{{ toYaml . | indent 8 }}
+ {{- end }}
diff --git a/xos-services/hippie-oss/values.yaml b/xos-services/hippie-oss/values.yaml
new file mode 100644
index 0000000..109987a
--- /dev/null
+++ b/xos-services/hippie-oss/values.yaml
@@ -0,0 +1,38 @@
+---
+# Copyright 2018-present Open Networking Foundation
+#
+# 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.
+
+# Default values for vOLT
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+nameOverride: ""
+fullnameOverride: ""
+
+imagePullPolicy: 'Always'
+
+hippieOSS_synchronizerImage: "xosproject/hippie-oss-synchronizer:master"
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+
+resources: {}
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}