diff --git a/udc-containers/pom.xml b/udc-containers/pom.xml
index 6d7904768..e44612a27 100644
--- a/udc-containers/pom.xml
+++ b/udc-containers/pom.xml
@@ -11,7 +11,7 @@
udc-containers
- UDC :: Containers :: Parent
+ UDC :: Containers
pom
diff --git a/udc-helm/udc/Chart.yaml b/udc-helm/udc/Chart.yaml
new file mode 100644
index 000000000..e216d06db
--- /dev/null
+++ b/udc-helm/udc/Chart.yaml
@@ -0,0 +1,8 @@
+name: udc
+version: 1.0.0
+sources:
+ - https://github.com/kvendingoldo/udc-petclinic
+maintainers:
+ - name: Alex Sharov
+ email: kvendingoldo@gmail.com
+engine: gotpl
diff --git a/udc-helm/udc/templates/_helpers.tpl b/udc-helm/udc/templates/_helpers.tpl
new file mode 100644
index 000000000..d3dfc2415
--- /dev/null
+++ b/udc-helm/udc/templates/_helpers.tpl
@@ -0,0 +1,10 @@
+{{/* vim: set filetype=mustache: */}}
+
+{{- define "name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "fullname" -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/udc-helm/udc/templates/autoscale.yaml b/udc-helm/udc/templates/autoscale.yaml
new file mode 100644
index 000000000..457e3928d
--- /dev/null
+++ b/udc-helm/udc/templates/autoscale.yaml
@@ -0,0 +1,12 @@
+---
+kind: HorizontalPodAutoscaler
+apiVersion: autoscaling/v1
+metadata:
+ name: {{ template "fullname" . }}
+spec:
+ scaleTargetRef:
+ kind: Deployment
+ name: {{ template "fullname" . }}
+ maxReplicas: {{ .Values.scale.maxReplicas }}
+ minReplicas: {{ .Values.scale.minReplicas }}
+ targetCPUUtilizationPercentage: 70
diff --git a/udc-helm/udc/templates/configmap.yaml b/udc-helm/udc/templates/configmap.yaml
new file mode 100644
index 000000000..7418f4017
--- /dev/null
+++ b/udc-helm/udc/templates/configmap.yaml
@@ -0,0 +1,14 @@
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ labels:
+ component: {{ template "name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+ environment: {{ .Values.global.environment }}
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+ name: {{ template "fullname" . }}
+data:
+ application.properties: |-
+{{ .Files.Get "files/application.properties" | indent 4 }}
diff --git a/udc-helm/udc/templates/deployment.yaml b/udc-helm/udc/templates/deployment.yaml
new file mode 100644
index 000000000..f3a78c206
--- /dev/null
+++ b/udc-helm/udc/templates/deployment.yaml
@@ -0,0 +1,39 @@
+---
+kind: Deployment
+apiVersion: extensions/v1beta1
+metadata:
+ labels:
+ component: {{ template "name" . }}
+ chart: {{ .Chart.Name }}
+ environment: {{ .Values.global.environment }}
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+ version: {{ .Values.global.version }}
+ name: {{ template "fullname" . }}
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ component: {{ template "name" . }}
+ chart: {{ .Chart.Name }}
+ environment: {{ .Values.global.environment }}
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+ version: {{ .Values.global.version }}
+ name: {{ template "fullname" . }}
+ spec:
+ containers:
+ - name: {{ .Values.container.name }}
+ image: '{{ .Values.container.image }}:{{ .Values.global.version }}'
+ imagePullPolicy: Always
+ ports:
+ - containerPort: 8080
+ protocol: TCP
+ volumeMounts:
+ - mountPath: /udc/apps/petclinic/properties
+ name: config-volume
+ volumes:
+ - name: config-volume
+ configMap:
+ name: {{ template "fullname" . }}
diff --git a/udc-helm/udc/templates/svc.yaml b/udc-helm/udc/templates/svc.yaml
new file mode 100644
index 000000000..932c1f8c8
--- /dev/null
+++ b/udc-helm/udc/templates/svc.yaml
@@ -0,0 +1,23 @@
+---
+kind: Service
+apiVersion: v1
+metadata:
+ labels:
+ component: {{ template "name" . }}
+ chart: {{ .Chart.Name }}
+ environment: {{ .Values.global.environment }}
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+ version: {{ .Values.global.version }}
+ name: {{ template "fullname" . }}
+spec:
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
+ selector:
+ component: {{ template "name" . }}
+ chart: {{ .Chart.Name }}
+ environment: {{ .Values.global.environment }}
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
diff --git a/udc-helm/udc/values.yaml b/udc-helm/udc/values.yaml
new file mode 100644
index 000000000..8062db8e4
--- /dev/null
+++ b/udc-helm/udc/values.yaml
@@ -0,0 +1,6 @@
+container:
+ name: udc-backend
+ image: gcr.io/TODO
+scale:
+ maxReplicas: 3
+ minReplicas: 1