Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(helm)!: remove prometheus-http port declaration from coderd service spec#12214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 5 commits intomainfromcj/rm-prom-svc
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletionsdocs/admin/prometheus.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,8 +35,28 @@ The Prometheus endpoint can be enabled in the
[Helm chart's](https://github.com/coder/coder/tree/main/helm) `values.yml` by
setting the environment variable `CODER_PROMETHEUS_ADDRESS` to `0.0.0.0:2112`.
The environment variable `CODER_PROMETHEUS_ENABLE` will be enabled
automatically. A Service Endpoint will also be exposed allowing Prometheus
Service Monitors to be used.
automatically. A Service Endpoint will not be exposed; if you need to expose the
Prometheus port on a Service, (for example, to use a `ServiceMonitor`), create a
separate headless service instead:

```yaml
apiVersion: v1
kind: Service
metadata:
name: coder-prom
namespace: coder
spec:
clusterIP: None
ports:
- name: prom-http
port: 2112
protocol: TCP
targetPort: 2112
selector:
app.kubernetes.io/instance: coder
app.kubernetes.io/name: coder
type: ClusterIP
```

### Prometheus configuration

Expand Down
19 changes: 0 additions & 19 deletionshelm/coder/templates/service.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,25 +28,6 @@ spec:
nodePort: {{ .Values.coder.service.httpsNodePort }}
{{ end }}
{{- end }}
{{- range .Values.coder.env }}
{{- if eq .name "CODER_PROMETHEUS_ENABLE" }}
{{/*
This sadly has to be nested to avoid evaluating the second part
of the condition too early and potentially getting type errors if
the value is not a string (like a `valueFrom`). We do not support
`valueFrom` for this env var specifically.
*/}}
{{- if eq .value "true" }}
- name: "prometheus-http"
port: 2112
targetPort: "prometheus-http"
protocol: TCP
{{ if eq $.Values.coder.service.type "NodePort" }}
nodePort: {{ $.Values.coder.service.prometheusNodePort }}
{{ end }}
{{- end }}
{{- end }}
{{- end }}
{{- if eq "LoadBalancer" .Values.coder.service.type }}
{{- with .Values.coder.service.loadBalancerIP }}
loadBalancerIP: {{ . | quote }}
Expand Down
8 changes: 0 additions & 8 deletionshelm/coder/tests/testdata/prometheus.golden
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -93,14 +93,6 @@ spec:

nodePort:


- name: "prometheus-http"
port: 2112
targetPort: "prometheus-http"
protocol: TCP

nodePort: 31112

selector:
app.kubernetes.io/name: coder
app.kubernetes.io/instance: release-name
Expand Down
5 changes: 0 additions & 5 deletionshelm/coder/values.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -282,11 +282,6 @@ coder:
# NodePort. If not set, Kubernetes will allocate a port from the default
# range, 30000-32767.
httpsNodePort: ""
# coder.service.prometheusNodePort -- Enabled if coder.service.type is set
# to NodePort. If not set, Kubernetes will allocate a port from the default
# range, 30000-32767. The "prometheus-http" port on the coder service is
# only exposed if CODER_PROMETHEUS_ENABLE is set to true.
prometheusNodePort: ""

# coder.ingress -- The Ingress object to expose for Coder.
ingress:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp