Skip to content

Commit

Permalink
Add service specific parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
aliasboink committed Mar 25, 2024
1 parent c47fd01 commit f9291e7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion templates/backend/deployment_backend.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
name: {{ include "aggregator.fullname" . }}-backend
labels:
{{- include "aggregator.labels" . | nindent 4 }}
spec:
Expand Down
6 changes: 3 additions & 3 deletions templates/backend/service_backend.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: backend
name: {{ include "aggregator.fullname" . }}-backend
labels:
{{- include "aggregator.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
type: {{ .Values.backend.service.type }}
ports:
- port: {{ .Values.service.port }}
- port: {{ .Values.backend.service.port }}
targetPort: {{ .Values.backend.port }}
protocol: TCP
name: http
Expand Down
2 changes: 1 addition & 1 deletion templates/frontend/deployment_frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ spec:
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
ports:
- name: http
containerPort: 3000
containerPort: {{ .Values.backend.port }}
protocol: TCP
6 changes: 3 additions & 3 deletions templates/frontend/service_frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ metadata:
labels:
{{- include "aggregator.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
type: {{ .Values.frontend.service.type }}
ports:
- port: 3000
targetPort: 3000
- port: {{ .Values.frontend.service.port }}
targetPort: {{ .Values.frontend.port }}
protocol: TCP
name: http
selector:
Expand Down
12 changes: 8 additions & 4 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,24 @@ backend:
# Overrides the image tag whose default is the chart appVersion.
tag: ""

service:
type: ClusterIP
port: 80

frontend:
replicas: 1
port: 3000

image:
repository: fe
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""


service:
type: ClusterIP
port: 3000

nameOverride: ""
fullnameOverride: ""

service:
type: ClusterIP
port: 80

0 comments on commit f9291e7

Please sign in to comment.