Add help chart for petclinic

This commit is contained in:
Alexander Sharov 2018-09-25 22:18:37 +04:00
parent 57a49ce3f2
commit f89bd304c8
8 changed files with 113 additions and 1 deletions

View file

@ -11,7 +11,7 @@
</parent>
<artifactId>udc-containers</artifactId>
<name>UDC :: Containers :: Parent</name>
<name>UDC :: Containers</name>
<packaging>pom</packaging>
<modules>

8
udc-helm/udc/Chart.yaml Normal file
View file

@ -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

View file

@ -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 -}}

View file

@ -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

View file

@ -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 }}

View file

@ -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" . }}

View file

@ -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 }}

6
udc-helm/udc/values.yaml Normal file
View file

@ -0,0 +1,6 @@
container:
name: udc-backend
image: gcr.io/TODO
scale:
maxReplicas: 3
minReplicas: 1