Skip to content

Commit

Permalink
Update helmchart (#66)
Browse files Browse the repository at this point in the history
* Base renew helm chart

* Create and add new enroute helm version

* Add .gitignore

Signed-off-by: Alexander Eimer <alexander.eimer@gmail.com>
  • Loading branch information
aeimer authored Dec 16, 2021
1 parent 1610869 commit a59b0aa
Show file tree
Hide file tree
Showing 16 changed files with 442 additions and 590 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_STORE
Binary file added helm-chart/enroute-0.5.0.tgz
Binary file not shown.
47 changes: 33 additions & 14 deletions helm-chart/enroute/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
apiVersion: v1
appVersion: "0.8.0"
apiVersion: v2
name: enroute
description: EnRoute API Gateway
home: https://getenroute.io/
icon: https://getenroute.io/favicon.ico
keywords:
- api gateway
- EnRoute - Envoy Route Controller
- Saaras
- envoy
- ingress
- api gateway
- EnRoute - Envoy Route Controller
- Saaras
- envoy
- ingress
maintainers:
- email: contact@saaras.io
name: contact
name: enroute
- email: contact@saaras.io
name: contact
sources:
- https://github.com/saarasio/enroute
- https://getenroute.io
- https://github.com/envoyproxy/envoy
version: 0.4.1
- https://github.com/saarasio/enroute
- https://getenroute.io
- https://github.com/envoyproxy/envoy

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v0.8.0
6 changes: 6 additions & 0 deletions helm-chart/enroute/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
###########
# EnRoute #
###########

It got installed in namespace: {{ .Release.Namespace }}

14 changes: 7 additions & 7 deletions helm-chart/enroute/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Expand the name of the chart.
*/}}
{{- define "enroute.name" -}}
{{- default .Chart.Name .Values.globalSettings.nameOverride | trunc 63 | trimSuffix "-" }}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand All @@ -11,10 +11,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "enroute.fullname" -}}
{{- if .Values.globalSettings.fullnameOverride }}
{{- .Values.globalSettings.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.globalSettings.nameOverride }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand Down Expand Up @@ -54,9 +54,9 @@ app.kubernetes.io/instance: {{ .Release.Name }}
Create the name of the service account to use
*/}}
{{- define "enroute.serviceAccountName" -}}
{{- if .Values.globalSettings.serviceAccount.create }}
{{- default (include "enroute.fullname" .) .Values.globalSettings.serviceAccount.name }}
{{- if .Values.serviceAccount.create }}
{{- default (include "enroute.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.globalSettings.serviceAccount.name }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
146 changes: 146 additions & 0 deletions helm-chart/enroute/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "enroute.fullname" . }}
labels:
{{- include "enroute.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "enroute.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "enroute.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "enroute.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
# ENROUTE CONTAINER
- image: "{{ .Values.images.enrouteService.repository }}:{{ .Values.images.enrouteService.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.images.enrouteService.pullPolicy }}
name: enroute
command: ["/bin/enroute"]
args:
- serve
- --incluster
- --envoy-service-http-port
- "8080"
- --envoy-service-https-port
- "8443"
- --mode-ingress
- --enable-ratelimit
livenessProbe:
httpGet:
path: /healthz
port: 8000
readinessProbe:
httpGet:
path: /healthz
port: 8000
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
resources:
{{- toYaml .Values.resources.enrouteService | nindent 12 }}
# REDIS CONTAINER
- image: "{{ .Values.images.redis.repository }}:{{ .Values.images.redis.tag | default "latest" }}"
imagePullPolicy: {{ .Values.images.redis.pullPolicy }}
name: redis
command: ["redis-server"]
args:
- --port
- "6379"
- --loglevel
- verbose
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
resources:
{{- toYaml .Values.resources.redis | nindent 12 }}
# ENVOY CONTAINER
- image: "{{ .Values.images.envoy.repository }}:{{ .Values.images.envoy.tag | default "latest" }}"
imagePullPolicy: {{ .Values.images.envoy.pullPolicy }}
name: envoy
ports:
- containerPort: 8080
name: http
- containerPort: 8443
name: https
command: ["envoy"]
args:
- --config-path /config/enroute.json
- --service-cluster $(ENROUTE_NAMESPACE)
- --service-node $(ENVOY_POD_NAME)
- --log-level {{ .Values.envoySettings.logLevel }}
env:
- name: ENROUTE_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: ENVOY_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
readinessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 3
periodSeconds: 3
volumeMounts:
- name: enroute-config
mountPath: /config
lifecycle:
preStop:
exec:
command: ["wget", "-qO-", "--post-data=''", "http://localhost:9001/healthcheck/fail"]
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
resources:
{{- toYaml .Values.resources.envoy | nindent 12 }}
initContainers:
- image: "{{ .Values.images.enrouteService.repository }}:{{ .Values.images.enrouteService.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.images.enrouteService.pullPolicy }}
name: envoy-initconfig
command: ["/bin/enroute"]
args:
- bootstrap
- /config/enroute.json
volumeMounts:
- name: enroute-config
mountPath: /config
env:
- name: ENROUTE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
volumes:
- name: enroute-config
emptyDir: {}
dnsPolicy: ClusterFirst
terminationGracePeriodSeconds: 30
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
114 changes: 0 additions & 114 deletions helm-chart/enroute/templates/enroute-deployment.yaml

This file was deleted.

Loading

0 comments on commit a59b0aa

Please sign in to comment.