diff --git a/.changeset/silly-ducks-rule.md b/.changeset/silly-ducks-rule.md new file mode 100644 index 0000000..6b3010d --- /dev/null +++ b/.changeset/silly-ducks-rule.md @@ -0,0 +1,7 @@ +--- +"comet-admin-v1": minor +"comet-site-v1": minor +"comet-api-v1": minor +--- + +Add configuration to expose metrics port diff --git a/charts/comet-admin-v1/templates/deployment.yaml b/charts/comet-admin-v1/templates/deployment.yaml index 29ccd7c..88006b7 100644 --- a/charts/comet-admin-v1/templates/deployment.yaml +++ b/charts/comet-admin-v1/templates/deployment.yaml @@ -44,6 +44,11 @@ spec: - name: http containerPort: 3000 protocol: TCP + {{- if .Values.metrics.enabled }} + - name: metrics + containerPort: {{ .Values.metrics.containerPorts.http }} + protocol: TCP + {{- end }} env: - name: NODE_ENV value: "{{ .Values.nodeEnv }}" diff --git a/charts/comet-admin-v1/values.yaml b/charts/comet-admin-v1/values.yaml index 3e31457..4268eaf 100644 --- a/charts/comet-admin-v1/values.yaml +++ b/charts/comet-admin-v1/values.yaml @@ -37,6 +37,11 @@ service: type: ClusterIP port: 3000 +metrics: + enabled: false + containerPorts: + http: 9466 + ingress: enabled: false annotations: diff --git a/charts/comet-api-v1/templates/deployment.yaml b/charts/comet-api-v1/templates/deployment.yaml index 67a17c0..58eed71 100644 --- a/charts/comet-api-v1/templates/deployment.yaml +++ b/charts/comet-api-v1/templates/deployment.yaml @@ -45,6 +45,11 @@ spec: - name: http containerPort: 3000 protocol: TCP + {{- if .Values.metrics.enabled }} + - name: metrics + containerPort: {{ .Values.metrics.containerPorts.http }} + protocol: TCP + {{- end }} envFrom: {{- if .Values.env }} - configMapRef: diff --git a/charts/comet-api-v1/values.yaml b/charts/comet-api-v1/values.yaml index ad33f40..2eaa47e 100644 --- a/charts/comet-api-v1/values.yaml +++ b/charts/comet-api-v1/values.yaml @@ -43,6 +43,11 @@ service: type: ClusterIP port: 3000 +metrics: + enabled: false + containerPorts: + http: 9465 + ingress: enabled: false annotations: diff --git a/charts/comet-site-v1/templates/deployment.yaml b/charts/comet-site-v1/templates/deployment.yaml index ad152e8..bb041d5 100644 --- a/charts/comet-site-v1/templates/deployment.yaml +++ b/charts/comet-site-v1/templates/deployment.yaml @@ -132,6 +132,11 @@ spec: - name: http containerPort: 3000 protocol: TCP + {{- if .Values.metrics.enabled }} + - name: metrics + containerPort: {{ .Values.metrics.containerPorts.http }} + protocol: TCP + {{- end }} livenessProbe: httpGet: path: /api/status diff --git a/charts/comet-site-v1/values.yaml b/charts/comet-site-v1/values.yaml index 6b2d526..9e9c1a6 100644 --- a/charts/comet-site-v1/values.yaml +++ b/charts/comet-site-v1/values.yaml @@ -24,6 +24,11 @@ service: type: ClusterIP port: 3000 +metrics: + enabled: false + containerPorts: + http: 9464 + resources: limits: memory: 200Mi