Skip to content

Commit

Permalink
add service for API
Browse files Browse the repository at this point in the history
  • Loading branch information
bkiahstroud committed Jun 7, 2024
1 parent f7b8c9e commit cbb8a76
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions chart/princeton-manifold/templates/deployment-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ spec:
- bin/puma
- -C
- config/puma.rb
ports:
- containerPort: 3020
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.api.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down Expand Up @@ -65,6 +67,8 @@ spec:
- name: {{ .Chart.Name }}-api-cable
command:
- bin/cable
ports:
- containerPort: 3021
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.api.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down Expand Up @@ -100,6 +104,8 @@ spec:
- yarn
- run
- start
ports:
- containerPort: 3010
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.client.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
16 changes: 16 additions & 0 deletions chart/princeton-manifold/templates/service-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "princeton-manifold.fullname" . }}-api
labels:
{{- include "princeton-manifold.labels" . | nindent 4 }}
spec:
type: {{ .Values.serviceApi.type }}
ports:
- port: {{ .Values.serviceApi.port }}
targetPort: 3020
protocol: TCP
name: http
selector:
app.kubernetes.io/name: {{ include "princeton-manifold.name" . }}-api
app.kubernetes.io/instance: {{ .Release.Name }}
4 changes: 4 additions & 0 deletions chart/princeton-manifold/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ service:
type: ClusterIP
port: 80

serviceApi:
type: ClusterIP
port: 3020

ingress:
enabled: false
className: ""
Expand Down

0 comments on commit cbb8a76

Please sign in to comment.