Skip to content

Commit

Permalink
Add cgimap endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Sep 12, 2023
1 parent 8bc80ea commit 600fbd2
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 4 deletions.
26 changes: 26 additions & 0 deletions osm-seed/templates/web/web-ingress-cgimap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{- if and .Values.web.enabled (eq .Values.serviceType "ClusterIP") }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "osm-seed.fullname" . }}-ingress-web
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod-issuer
spec:
tls:
- hosts:
- web.{{ .Values.domain }}
secretName: {{ template "osm-seed.fullname" . }}-secret-web

rules:
- host: web.{{ .Values.domain }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ template "osm-seed.fullname" . }}-web-cgimap
port:
number: 80
{{- end }}
49 changes: 49 additions & 0 deletions osm-seed/templates/web/web-service-cgimap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{{- if .Values.web.enabled -}}
{{- if .Values.web.cgimap.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ template "osm-seed.fullname" . }}-web-cgimap
labels:
app: {{ template "osm-seed.name" . }}
component: web-service-cgimap
environment: {{ .Values.environment }}
release: {{ .Release.Name }}
annotations:
{{- if eq .Values.serviceType "LoadBalancer" }}
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "300"
{{- end }}
{{- if and (eq .Values.serviceType "LoadBalancer") .Values.AWS_SSL_ARN }}
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: {{ .Values.AWS_SSL_ARN }}
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https
{{- end }}
{{- if eq .Values.serviceType "ClusterIP" }}
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod-issuer
{{- else }}
fake.annotation: fake
{{- end }}
{{- with .Values.web.serviceAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}

spec:
type: {{ .Values.serviceType }}
ports:
- port: 80
targetPort: 81
protocol: TCP
name: http
{{- if and (eq .Values.serviceType "LoadBalancer") .Values.AWS_SSL_ARN }}
- port: 443
targetPort: 81
protocol: TCP
name: https
{{- end }}
selector:
app: {{ template "osm-seed.name" . }}
release: {{ .Release.Name }}
run: {{ .Release.Name }}-web
{{- end }}
{{- end }}
5 changes: 1 addition & 4 deletions osm-seed/templates/web/web-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,14 @@ metadata:
{{- with .Values.web.serviceAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}

spec:
type: {{ .Values.serviceType }}
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
- port: 81
targetPort: 81
protocol: TCP
name: cgimap
{{- if and (eq .Values.serviceType "LoadBalancer") .Values.AWS_SSL_ARN }}
- port: 443
targetPort: http
Expand Down
2 changes: 2 additions & 0 deletions osm-seed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ web:
minReplicas: 1
maxReplicas: 3
cpuUtilization: 80
cgimap:
enabled: true

# ====================================================================================================
# Variables for memcached. Memcached is used to store session cookies
Expand Down

0 comments on commit 600fbd2

Please sign in to comment.