Skip to content

Commit

Permalink
chore(deploy): change mongo charts from replicaset to statefulset (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow authored Jan 22, 2023
1 parent 5230735 commit 2cfe8ec
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 59 deletions.
28 changes: 0 additions & 28 deletions deploy/build/charts/mongodb/templates/hpa.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: {{ include "mongodb.fullname" . }}
labels:
{{- include "mongodb.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "mongodb.selectorLabels" . | nindent 6 }}
serviceName: {{ .Values.service.name }}
template:
metadata:
{{- with .Values.podAnnotations }}
Expand Down
9 changes: 1 addition & 8 deletions deploy/build/charts/mongodb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ image:
repository: mongo
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "5.0"
tag: 5.0.14

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -85,13 +85,6 @@ resources:
# cpu: 100m
# memory: 128Mi

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

nodeSelector: {}

tolerations: []
Expand Down
18 changes: 0 additions & 18 deletions runtimes/nodejs/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ export default class Config {
return secret_salt;
}

/**
* the `temp path`
*/
static get TMP_PATH(): string {
const tmp_path = process.env["TMP_PATH"] ?? path.join(process.cwd(), "tmp");
return tmp_path;
}

/**
* the logger level : 'fatal', 'error', 'warning', 'info', 'debug', 'trace'
*/
Expand All @@ -61,16 +53,6 @@ export default class Config {
return (process.env.PORT ?? 8000) as number;
}

/**
* enable cloud function logging, default is `always`
* - `always` means that all cloud functions' execution will be logged
* - `debug` means that only logging for debug invokes
* - `never` no logging any case
*/
static get ENABLE_CLOUD_FUNCTION_LOG(): "always" | "debug" | "never" {
return (process.env.ENABLE_CLOUD_FUNCTION_LOG as any) ?? "always";
}

/**
* in production deploy or not
*/
Expand Down
2 changes: 1 addition & 1 deletion runtimes/nodejs/src/support/cloud-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function createCloudSdk() {
OSS_INTERNAL_ENDPOINT: process.env.OSS_INTERNAL_ENDPOINT,
OSS_EXTERNAL_ENDPOINT: process.env.OSS_EXTERNAL_ENDPOINT,
NPM_INSTALL_FLAGS: process.env.NPM_INSTALL_FLAGS || '',
RUNTIME_IMAGE: process.env.RUNTIME_IMAGE,
RUNTIME_IMAGE: Config.RUNTIME_IMAGE,
},
}

Expand Down

0 comments on commit 2cfe8ec

Please sign in to comment.