Skip to content

Commit

Permalink
Add echoheaders testing chart
Browse files Browse the repository at this point in the history
  • Loading branch information
icereval committed Jul 11, 2017
1 parent ca9215e commit 1446e71
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 0 deletions.
6 changes: 6 additions & 0 deletions echoheaders/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: echoheaders
version: 0.1.0
description: Echoheaders server for testing
maintainers:
- name: Michael Haselton
email: [email protected]
1 change: 1 addition & 0 deletions echoheaders/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Echoheaders Helm Chart
16 changes: 16 additions & 0 deletions echoheaders/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "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).
*/}}
{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
44 changes: 44 additions & 0 deletions echoheaders/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "fullname" . }}
spec:
replicas: 1
template:
metadata:
labels:
app: {{ template "name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: echoheaders
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
ports:
- containerPort: 8080
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
{{- if .Values.resources }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- end }}
27 changes: 27 additions & 0 deletions echoheaders/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{- if .Values.ingress.enabled }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
{{- if .Values.ingress.annotations }}
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
{{- end }}
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "fullname" . }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end }}
backend:
serviceName: {{ template "fullname" . }}
servicePort: 80
{{- if .Values.ingress.rules }}
rules:
{{ toYaml .Values.ingress.rules | indent 4 }}
{{- end }}
{{- end }}
19 changes: 19 additions & 0 deletions echoheaders/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "fullname" . }}
spec:
ports:
- name: http
port: 80
targetPort: 8080
protocol: TCP
selector:
app: {{ template "name" . }}
release: {{ .Release.Name }}
type: ClusterIP
27 changes: 27 additions & 0 deletions echoheaders/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Default values for echoserver.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

image:
repository: "gcr.io/google_containers/echoserver"
tag: "1.5"
pullPolicy: "IfNotPresent"

resources:
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
tls: []
# - hosts:
# - echo.exmaple.com
# secretName: example-com-tls
rules: []
# - host: echo.example.com

0 comments on commit 1446e71

Please sign in to comment.