mirror of
https://github.com/kerberos-io/helm-charts.git
synced 2026-11-21 23:00:23 +00:00
Compare commits
2
Commits
hub-0.201.0
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cc483a67c | ||
|
|
a6981c11c0 |
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.201.0
|
||||
version: 0.202.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -929,6 +929,7 @@ kerberospipeline:
|
||||
| `kerberoshub.api.resources.limits.cpu` | CPU limit for `kerberoshub.api`. | `"250m"` |
|
||||
| `kerberoshub.api.serviceMonitor.enabled` | Create a Prometheus `ServiceMonitor` for hub-api `/metrics` on the backend port (request metrics and `mongodb_client_*` command metrics). Requires `kerberoshub.api.serviceEnabled`. | `true` |
|
||||
| `kerberoshub.api.serviceMonitor.interval` | hub-api metrics scrape interval. | `"15s"` |
|
||||
| `kerberoshub.api.blockPublicMetrics` | With `ingress: nginx`, add the `hub-api-metrics-deny` Ingress so `/metrics` answers 403 on the API, legacy and admin hosts. Prometheus scrapes the Service directly and is not affected. | `true` |
|
||||
| `kerberoshub.api.serverTLS.enabled` | Enable or disable `kerberoshub.api.serverTLS`. | `false` |
|
||||
| `kerberoshub.api.serverTLS.secretName` | Kubernetes Secret name used by `kerberoshub.api.serverTLS`. | `""` |
|
||||
| `kerberoshub.api.serverTLS.mountPath` | Filesystem path where the Hub API TLS secret is mounted. | `"/etc/hub-api/tls"` |
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
{{- if and (or (eq .Values.mode "all") (eq .Values.mode "ui")) (eq .Values.ingress "nginx") .Values.kerberoshub.api.blockPublicMetrics (.Capabilities.APIVersions.Has "networking.k8s.io/v1") -}}
|
||||
# Deny /metrics on hub-api's public hosts. hub-api serves Prometheus metrics
|
||||
# (request metrics and mongodb_client_* database, collection and command
|
||||
# names) on the same port as the API, and hub-api-ingress routes every path to
|
||||
# it. ingress-nginx applies this Ingress's annotations only to its own paths,
|
||||
# so /metrics answers 403 while every other path keeps hub-api-ingress's
|
||||
# settings. Prometheus scrapes the Service directly and is not affected.
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: hub-api-metrics-deny
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/denylist-source-range: "0.0.0.0/0,::/0"
|
||||
spec:
|
||||
ingressClassName: {{ .Values.ingress }}
|
||||
rules:
|
||||
- host: "{{ .Values.kerberoshub.api.url }}"
|
||||
http:
|
||||
paths:
|
||||
- path: /metrics
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: hub-api-svc
|
||||
port:
|
||||
number: 8081
|
||||
{{- if .Values.kerberoshub.api.legacyUrl }}
|
||||
- host: "{{ .Values.kerberoshub.api.legacyUrl }}"
|
||||
http:
|
||||
paths:
|
||||
- path: /metrics
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: hub-api-svc
|
||||
port:
|
||||
number: 8081
|
||||
{{- end }}
|
||||
- host: "admin.{{ .Values.kerberoshub.api.url }}"
|
||||
http:
|
||||
paths:
|
||||
- path: /metrics
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: hub-api-svc
|
||||
port:
|
||||
number: 80
|
||||
{{- end }}
|
||||
@@ -138,6 +138,9 @@
|
||||
"api": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"blockPublicMetrics": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"serviceMonitor": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -419,6 +419,10 @@ kerberoshub:
|
||||
serviceMonitor:
|
||||
enabled: true
|
||||
interval: 15s
|
||||
# With ingress: nginx, answer 403 for /metrics on the API hosts, so the
|
||||
# Prometheus metrics (including database and collection names) are not
|
||||
# public. Prometheus scrapes the Service directly and is not affected.
|
||||
blockPublicMetrics: true
|
||||
logLevel: "info" # possible values: trace, debug, info, warn, error
|
||||
jwtSecret: "this-is-a-secret-please-change-to-random-string" # change to a random value, this is for generating JWT tokens.
|
||||
# How long a user stays signed in (Go durations, e.g. "15m", "12h").
|
||||
|
||||
Reference in New Issue
Block a user