Skip to content

Commit 2983f1a

Browse files
masonCheinTian
authored andcommitted
fix: add new svc to control mirror stop
1 parent bdc7075 commit 2983f1a

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

charts/csghub/templates/deployment-mirror.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ spec:
112112
image: {{ include "image.generic.prefix" (list . .Values.server.image) }}
113113
imagePullPolicy: {{ or .Values.server.image.pullPolicy .Values.global.image.pullPolicy }}
114114
command: [ "/starhub-bin/starhub", "mirror", "lfs-sync", "-l", {{ .Values.server.logging.level | default "info" | quote }} ]
115+
ports:
116+
- containerPort: 8092
117+
name: mirror-lfs
118+
protocol: TCP
115119
envFrom:
116120
- configMapRef:
117121
name: {{ include "common.names.custom" (list . "server") }}
@@ -153,6 +157,11 @@ spec:
153157
cpu: "100m"
154158
memory: "256Mi"
155159
{{- end }}
160+
livenessProbe:
161+
tcpSocket:
162+
port: 8092
163+
initialDelaySeconds: 20
164+
periodSeconds: 10
156165
securityContext:
157166
{{- .Values.mirror.podSecurityContext | toYaml | nindent 12 }}
158167
{{- with .Values.mirror.nodeSelector }}

charts/csghub/templates/helpers/_ports.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Get the port number by service name
2121
"runner" 8082
2222
"portal" 8090
2323
"loki" 3100
24+
"mirror-lfs" 8092
2425
-}}
2526

2627
{{- if not (hasKey $portMap $serviceType) -}}

charts/csghub/templates/services.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,23 @@ spec:
156156
selector:
157157
{{- include "common.serviceSelectorLabels" (dict "selector" true "context" . "service" "portal") | nindent 4 }}
158158
---
159+
apiVersion: v1
160+
kind: Service
161+
metadata:
162+
name: {{ include "common.names.custom" (list . "mirror-lfs") }}
163+
namespace: {{ .Release.Namespace }}
164+
labels:
165+
{{- include "common.labels" (dict "context" . "service" "mirror-lfs") | nindent 4 }}
166+
spec:
167+
type: ClusterIP
168+
ports:
169+
- port: {{ include "csghub.svc.port" "mirror-lfs" }}
170+
targetPort: 8092
171+
protocol: TCP
172+
name: mirror-lfs
173+
selector:
174+
{{- include "common.serviceSelectorLabels" (dict "selector" true "context" . "service" "mirror-lfs") | nindent 4 }}
175+
---
159176
{{- if or (and .Values.portal.docs.host .Values.portal.docs.port) .Values.portal.docs.domain }}
160177
apiVersion: v1
161178
kind: Service
@@ -192,3 +209,4 @@ subsets:
192209
ports:
193210
- port: {{ .Values.portal.docs.port }}
194211
{{- end }}
212+
---

0 commit comments

Comments
 (0)