Skip to content

Commit

Permalink
[stable/envoy] chart version 1.0.0 (helm#5955)
Browse files Browse the repository at this point in the history
* [stable/envoy] chart version 1.0.0

* [stable/envoy] Remove trailing spaces from values.yaml

* [stable/envoy] Apply fixups per unguiculus' review of 1.0.0
  • Loading branch information
Joshua Dotson authored and k8s-ci-robot committed Jun 25, 2018
1 parent 5d890ad commit 7352955
Show file tree
Hide file tree
Showing 11 changed files with 417 additions and 0 deletions.
21 changes: 21 additions & 0 deletions stable/envoy/.helmignore
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions stable/envoy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
description: Envoy is an open source edge and service proxy, designed for cloud-native applications.
name: envoy
version: 1.0.0
appVersion: 1.6
keywords:
- envoy
- proxy
home: https://www.envoyproxy.io/
sources:
- https://github.com/envoyproxy/envoy
maintainers:
- name: josdotso
email: josdotso@cisco.com
icon: https://avatars0.githubusercontent.com/u/30125649
4 changes: 4 additions & 0 deletions stable/envoy/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
approvers:
- josdotso
reviewers:
- josdotso
5 changes: 5 additions & 0 deletions stable/envoy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# stable/envoy

[Envoy](https://www.envoyproxy.io/) is an open source edge and service proxy, designed for cloud-native applications.

All user-configurable settings, default values and some commentary about them can be found in [values.yaml](values.yaml).
Empty file.
32 changes: 32 additions & 0 deletions stable/envoy/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "envoy.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 "envoy.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 "envoy.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
14 changes: 14 additions & 0 deletions stable/envoy/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "envoy.fullname" . }}
labels:
app: {{ template "envoy.name" . }}
chart: {{ template "envoy.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{- range $key, $value := .Values.files }}
{{ $key }}: |-
{{ $value | default "" | indent 4 }}
{{- end -}}
103 changes: 103 additions & 0 deletions stable/envoy/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "envoy.fullname" . }}
labels:
app: {{ template "envoy.name" . }}
chart: {{ template "envoy.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- if .Values.service.enabled }}
serviceName: {{ .Values.service.name }}
{{- end }}
replicas: {{ .Values.replicaCount }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
selector:
matchLabels:
app: {{ template "envoy.name" . }}
release: {{ .Release.Name }}
strategy:
{{ .Values.strategy | indent 4 }}
template:
metadata:
labels:
app: {{ template "envoy.name" . }}
release: {{ .Release.Name }}
component: controller
{{- if .Values.podLabels }}
## Custom pod labels
{{- range $key, $value := .Values.podLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
annotations:
checksum/config: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- if .Values.podAnnotations }}
## Custom pod annotations
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
securityContext:
{{ toYaml .Values.securityContext | indent 8 }}

containers:

- name: envoy
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
{{ toYaml .Values.command | indent 12 }}
args:
{{ toYaml .Values.args | indent 12 }}
ports:
{{- with .Values.ports }}
{{- range $key, $port := . }}
- name: {{ $key }}
{{ toYaml $port | indent 14 }}
{{- end }}
{{- end }}

livenessProbe:
{{ toYaml .Values.livenessProbe | indent 12 }}
readinessProbe:
{{ toYaml .Values.readinessProbe | indent 12 }}
env:
{{- range $key, $value := .Values.env }}
- name: {{ $key | upper | replace "." "_" }}
value: {{ $value | quote }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
volumeMounts:
- name: config
mountPath: /config
{{- range $key, $value := .Values.secretMounts }}
- name: {{ $key }}
mountPath: {{ $value.mountPath }}
{{- end }}

{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ template "envoy.fullname" . }}
{{- range $key, $value := .Values.secretMounts }}
- name: {{ $key }}
secret:
secretName: {{ $value.secretName }}
defaultMode: {{ $value.defaultMode }}
{{- end }}
15 changes: 15 additions & 0 deletions stable/envoy/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "envoy.fullname" . }}
labels:
app: {{ template "envoy.name" . }}
chart: {{ template "envoy.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
selector:
matchLabels:
app: {{ template "envoy.name" . }}
release: {{ .Release.Name }}
{{ .Values.podDisruptionBudget | indent 2 }}
25 changes: 25 additions & 0 deletions stable/envoy/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if .Values.service.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.service.name }}
labels:
app: {{ template "envoy.name" . }}
chart: {{ template "envoy.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
{{- with .Values.service.annotations }}
{{ toYaml . | indent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
{{- range $key, $value := .Values.service.ports }}
- name: {{ $key }}
{{ toYaml $value | indent 6 }}
{{- end }}
selector:
app: {{ template "envoy.name" . }}
release: {{ .Release.Name }}
{{- end }}
Loading

0 comments on commit 7352955

Please sign in to comment.