Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
Update ports
Browse files Browse the repository at this point in the history
  • Loading branch information
manifest committed Jun 12, 2022
1 parent 366bb81 commit f2d65aa
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 52 deletions.
29 changes: 27 additions & 2 deletions chart/templates/sts.yaml → chart/templates/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ metadata:
{{- include "event.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount | default 2 }}
serviceName: {{ include "event.name" . }}-headless
serviceName: {{ include "event.name" . }}-headless-service
selector:
matchLabels:
{{- include "event.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -183,3 +183,28 @@ spec:
secretName: {{ $secret }}
{{- end }}
{{- end }}

---

apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}-headless-service
spec:
selector:
{{- include "event.selectorLabels" . | nindent 4 }}
clusterIP: None

---

apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ include "event.name" . }}-pdb
labels:
{{- include "event.labels" . | nindent 4 }}
spec:
minAvailable: 1
selector:
matchLabels:
{{- include "event.selectorLabels" . | nindent 6 }}
18 changes: 16 additions & 2 deletions chart/templates/configmap.yaml → chart/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data:
{{- $broker_id := list "mqtt-gateway" (include "event.shortNamespace" .) .Values.svc.audience | compact | join "." }}
broker_id = {{ $broker_id | quote }}
http_addr = "0.0.0.0:{{ .Values.service.ports.http }}"
http_addr = "0.0.0.0:8080"
[constraint]
payload_size = {{ .Values.constraint.payload_size }}
Expand All @@ -37,7 +37,7 @@ data:
id = {{ $kruonis_id | quote }}
[metrics.http]
bind_address = "0.0.0.0:{{ .Values.service.ports.metrics }}"
bind_address = "0.0.0.0:8888"
##
## ULMS
Expand Down Expand Up @@ -102,3 +102,17 @@ data:
{{- end }}
{{- println "" }}
{{- end }}
---

apiVersion: v1
kind: ConfigMap
metadata:
annotations: {}
labels:
{{- include "event.labels" . | nindent 4 }}
name: {{ include "event.name" . }}-environment
data:
{{- range $key, $value := .Values.env }}
{{ $key }}: {{ $value | quote }}
{{- end }}
11 changes: 0 additions & 11 deletions chart/templates/env.yaml

This file was deleted.

File renamed without changes.
26 changes: 26 additions & 0 deletions chart/templates/ingress.yaml → chart/templates/networking.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "event.serviceName" . }}
labels:
{{- include "event.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
{{- if .Values.service.ports.http }}
- name: http
port: {{ .Values.service.ports.http }}
targetPort: 8080
protocol: TCP
{{- end }}
{{- if .Values.service.ports.metrics }}
- name: metrics
port: {{ .Values.service.ports.metrics }}
targetPort: 8888
protocol: TCP
{{- end }}
selector:
{{- include "event.selectorLabels" . | nindent 4 }}

---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
Expand Down
11 changes: 0 additions & 11 deletions chart/templates/pdb.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions chart/templates/services.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ service:
type: ClusterIP
ports:
http: 8080
metrics: 8081
metrics: 8888

ingress:
host: example.org
Expand Down

0 comments on commit f2d65aa

Please sign in to comment.