Skip to content

Commit

Permalink
Ensure correct port is used for health checks
Browse files Browse the repository at this point in the history
  • Loading branch information
soapy1 committed Jan 27, 2025
1 parent 412cb67 commit 3f1e60f
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ async def http_exception_handler(
return JSONResponse(
{
"status": "error",
"message": exc,
"message": exc.detail,
},
status_code=exc.status_code,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ spec:
livenessProbe:
httpGet:
path: /api/v1/
port: 8080
port: {{ .Values.apiServer.port }}
initialDelaySeconds: {{ .Values.apiServer.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.apiServer.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.apiServer.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.apiServer.livenessProbe.failureThreshold }}
readinessProbe:
httpGet:
path: /api/v1/
port: 8080
port: {{ .Values.apiServer.port }}
initialDelaySeconds: {{ .Values.apiServer.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.apiServer.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.apiServer.readinessProbe.timeoutSeconds }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
spec:
type: NodePort
ports:
- port: 8080
- port: {{ .Values.apiServer.port }}
nodePort: {{ .Values.apiServer.nodePort }}
targetPort: {{ .Values.apiServer.port }}
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,22 @@ spec:
value: {{ .Values.uiServer.appEnv.logoutPageUrl }}
- name: REACT_APP_URL_BASENAME
value: {{ .Values.uiServer.appEnv.urlBasename }}
- name: DEBUG
value: express:*
- name: PORT
value: "8080"
value: "{{ .Values.uiServer.port }}"
ports:
- containerPort: {{ .Values.uiServer.port }}
livenessProbe:
httpGet:
# TODO: it would be nice to have a "ok" endpoint on the ui
path: /status
port: 8080
port: {{ .Values.uiServer.port }}
initialDelaySeconds: {{ .Values.uiServer.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.uiServer.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.uiServer.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.uiServer.livenessProbe.failureThreshold }}
readinessProbe:
httpGet:
path: /status
port: 8080
port: {{ .Values.uiServer.port }}
initialDelaySeconds: {{ .Values.uiServer.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.uiServer.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.uiServer.readinessProbe.timeoutSeconds }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
spec:
type: NodePort
ports:
- port: 8080
- port: {{ .Values.uiServer.port }}
nodePort: {{ .Values.uiServer.nodePort }}
targetPort: {{ .Values.uiServer.port }}
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ spec:
- "conda-store-worker"
- "--config"
- "/etc/conda-store/conda_store_config.py"
ports:
- containerPort: {{ .Values.worker.port }}
{{ template "worker.resources" . }}
env:
- name: POSTGRES_USERNAME
Expand Down
8 changes: 4 additions & 4 deletions conda-store-server/install/conda-store/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ apiServer:
# Node port for the API Server K8 service
nodePort: 30501

# Port the service will be accessible on. To port forward this service
# Port (internal) the service will be accessible on. To port forward this service
# try `kubectl port-forward -n conda-store service/conda-store-api-server <port>:8080`
port: 8081
port: 8080

# Number of API Servers replica pods to start up
replicas: 1
Expand Down Expand Up @@ -83,7 +83,7 @@ uiServer:
# Node port for the UI Server K8 service
nodePort: 30500

# Port the service will be accessible on. To port forward this service
# Port (internal) the service will be accessible on. To port forward this service
# try `kubectl port-forward -n conda-store service/conda-store-ui-server <port>:8080`
port: 8080

Expand All @@ -92,7 +92,7 @@ uiServer:

# Image to use for the ui server
image:
repository: quansight/conda-store-server
repository: ghcr.io/conda-incubator/conda-store-ui
pullPolicy: IfNotPresent
tag: 2024.6.1

Expand Down
1 change: 0 additions & 1 deletion examples/helm/tmpl/values.local.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ uiServer:
logoutPageUrl: http://localhost:8081/logout?next=/

worker:
port: 8080
replicas: 1
image:
repository: {{ (datasource "defaults").image.repository }}
Expand Down

0 comments on commit 3f1e60f

Please sign in to comment.