Skip to content

Commit

Permalink
adding new options for ingress configuration (#244)
Browse files Browse the repository at this point in the history
* adding new options for ingress configuration

* Update charts/netdata/values.yaml

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
  • Loading branch information
M4itee and ilyam8 authored Nov 17, 2021
1 parent a066554 commit 80abd2a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
3 changes: 3 additions & 0 deletions charts/netdata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ The following table lists the configurable parameters of the netdata chart and t
| `ingress.apiVersion` | apiVersion for the Ingress | Depends on Kubernetes version |
| `ingress.annotations` | Associate annotations to the Ingress | `kubernetes.io/ingress.class: nginx` and `kubernetes.io/tls-acme: "true"` |
| `ingress.path` | URL path for the ingress. If changed, a proxy server needs to be configured in front of netdata to translate path from a custom one to a `/` | `/` |
| `ingress.pathType` | pathType for your ingress contrller. Default value is correct for nginx. If you use yor own ingress controller, check the correct value | `Prefix` |
| `ingress.hosts` | URL hostnames for the ingress (they need to resolve to the external IP of the ingress controller) | `netdata.k8s.local` |
| `ingress.spec` | Spec section for ingress object. Everything there will be included into the object on deplyoment | `{}` |
| `ingress.spec.ingressClassName` | Ingress class declaration for Kubernetes version 1.19+. Annotation ingress.class should be removed if this type of declaration is used | `nginx` |
| `rbac.create` | if true, create & use RBAC resources | `true` |
| `rbac.pspEnabled` | Specifies whether a PodSecurityPolicy should be created. | `true` |
| `serviceAccount.create` | if true, create a service account | `true` |
Expand Down
6 changes: 5 additions & 1 deletion charts/netdata/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "netdata.name" . -}}
{{- $ingressPath := .Values.ingress.path -}}
{{- $ingressPathType := .Values.ingress.pathType -}}
{{- $apiVersion := (include "netdata.ingress.apiVersion" .) -}}

apiVersion: {{ $apiVersion }}
Expand All @@ -17,6 +18,9 @@ metadata:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- with .Values.ingress.spec }}
{{ toYaml . | indent 2 }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
Expand All @@ -28,7 +32,7 @@ spec:
paths:
- path: {{ $ingressPath }}
{{- if not (eq $apiVersion "extensions/v1beta1" "networking.k8s.io/v1beta1") }}
pathType: Prefix
pathType: {{ $ingressPathType }}
{{- end }}
backend:
{{- if eq $apiVersion "extensions/v1beta1" "networking.k8s.io/v1beta1" }}
Expand Down
13 changes: 9 additions & 4 deletions charts/netdata/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,17 @@ ingress:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
path: /
pathType: Prefix
hosts:
- netdata.k8s.local
# tls:
# - secretName: netdata-tls
# hosts:
# - netdata.k8s.local
## whole spec is going to be included into ingress spec.
## if you intend to use ingressClassName declaration, remove ingress.class from annotations
# spec:
# ingressClassName: nginx
# tls:
# - secretName: netdata-tls
# hosts:
# - netdata.k8s.local

rbac:
create: true
Expand Down

0 comments on commit 80abd2a

Please sign in to comment.