Skip to content

Commit

Permalink
add crowdmap-lb chart
Browse files Browse the repository at this point in the history
tuxpiper committed Nov 15, 2021
1 parent 000870f commit f69fdf4
Showing 3 changed files with 128 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/crowdmap-lb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
name: crowdmap-lb
version: 0.0.1-alpha.1
icon: https://github.ushahidi.org/helm-charts/icon.png
102 changes: 102 additions & 0 deletions charts/crowdmap-lb/templates/nginx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
{{- if hasKey .Values "deployment" }}
{{- if .Values.deployment.annotations }}
annotations:
{{ toYaml .Values.deployment.annotations | indent 4 }}
{{- else }}
annotations: {}
{{- end }}
{{- end }}
labels:
app: crowdmap-lb
service: nginx
name: nginx
spec:
minReadySeconds: 5
progressDeadlineSeconds: 600
replicas: {{ .Values.replicas }}
selector:
matchLabels:
app: crowdmap-lb
service: nginx
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: crowdmap-lb
service: nginx
spec:
containers:
# frontline
- name: nginx
image: {{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
imagePullPolicy: Always
ports:
- containerPort: 80
name: http
protocol: TCP
resources:
limits:
cpu: {{ .Values.limits.cpu }}
memory: {{ .Values.limits.memory }}
requests:
cpu: {{ .Values.requests.cpu }}
memory: {{ .Values.requests.memory }}
terminationGracePeriodSeconds: 15

---
apiVersion: v1
kind: Service
metadata:
labels:
app: crowdmap-lb
service: nginx
name: nginx
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
selector:
app: crowdmap-lb
service: nginx
type: ClusterIP


{{- if .Values.ingress.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
{{- if .Values.ingress.annotations }}
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
{{- else }}
annotations: {}
{{- end }}
name: nginx
spec:
rules:
- host: {{ .Values.ingress.host | quote }}
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: nginx
port:
name: http
{{- if .Values.web.ingress.tls }}
tls:
{{ toYaml .Values.web.ingress.tls | indent 4 }}
{{- end -}}
{{- end }}
22 changes: 22 additions & 0 deletions charts/crowdmap-lb/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
image:
repository: mirror.gcr.io
name: crowdmap-lb
tag: latest
replicas: 1
limits:
cpu: "1"
memory: "512Mi"
requests:
cpu: "10m"
memory: "128Mi"
# deployment:
# annotations:
ingress:
enabled: false
# annotations:
# tls:
# - secretName: domain.example.com
# hosts:
# - domain.example.com
host: # domain.example.com

0 comments on commit f69fdf4

Please sign in to comment.