[Helm] Remove unused value and set default values explicitly (#7576)

**What this PR does / why we need it**:
`monitoring.alerts` are not used in the Loki Helm chart. This removes
it.
Furthermore, some values are referenced in the templates, but not used
in the values file. This adds the default values.

**Which issue(s) this PR fixes**:
Fixes #7575

**Special notes for your reviewer**:

https://github.com/AndersBennedsgaard/loki/blob/main/production/helm/loki/templates/single-binary/pdb.yaml#L15
should probably also be updated since `podDisruptionBudget` is not
referenced in the values file. However, I am unsure what default values
should be used.

https://github.com/AndersBennedsgaard/loki/blob/main/production/helm/loki/templates/networkpolicy.yaml#L124
should probably also be updated since the `loki.rulerSelectorLabels` is
not a valid helper function. However, I am unsure which selector labels
to use. Especially since it seems like `ruler` is not used. Perhaps any
reference to `ruler` should be removed?

**Checklist**
- [x] Reviewed the `CONTRIBUTING.md` guide
- [x] Documentation added
- [ ] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`
pull/7213/head
Anders Bennedsgaard 3 years ago committed by GitHub
parent 89d81020ce
commit b5563cee08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 94
      docs/sources/installation/helm/reference.md
  2. 8
      production/helm/loki/templates/provisioner/job-provisioner.yaml
  3. 4
      production/helm/loki/templates/tokengen/job-tokengen.yaml
  4. 26
      production/helm/loki/values.yaml

@ -81,12 +81,21 @@ null
<td><pre lang="json">
false
</pre>
</td>
</tr>
<tr>
<td>enterprise.externalConfigName</td>
<td>string</td>
<td>Name of the external config secret to use</td>
<td><pre lang="json">
""
</pre>
</td>
</tr>
<tr>
<td>enterprise.externalLicenseName</td>
<td>string</td>
<td>Name of external licesne secret to use</td>
<td>Name of external license secret to use</td>
<td><pre lang="json">
null
</pre>
@ -157,6 +166,7 @@ null
"annotations": {},
"enabled": true,
"env": [],
"extraVolumeMounts": [],
"image": {
"pullPolicy": "IfNotPresent",
"registry": "docker.io",
@ -202,6 +212,15 @@ true
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>enterprise.provisioner.extraVolumeMounts</td>
<td>list</td>
<td>Volume mounts to add to the provisioner pods</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
@ -318,6 +337,7 @@ null
"extraVolumeMounts": [],
"extraVolumes": [],
"labels": {},
"priorityClassName": "",
"securityContext": {
"fsGroup": 10001,
"runAsGroup": 10001,
@ -400,6 +420,15 @@ true
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>enterprise.tokengen.priorityClassName</td>
<td>string</td>
<td>The name of the PriorityClass for tokengen Pods</td>
<td><pre lang="json">
""
</pre>
</td>
</tr>
<tr>
@ -712,6 +741,15 @@ false
}
]
</pre>
</td>
</tr>
<tr>
<td>gateway.ingress.ingressClassName</td>
<td>string</td>
<td>Ingress Class Name. MAY be required for Kubernetes versions >= 1.18</td>
<td><pre lang="json">
""
</pre>
</td>
</tr>
<tr>
@ -1030,6 +1068,15 @@ false
<td><pre lang="json">
"loki.example.com"
</pre>
</td>
</tr>
<tr>
<td>ingress.ingressClassName</td>
<td>string</td>
<td></td>
<td><pre lang="json">
""
</pre>
</td>
</tr>
<tr>
@ -1192,6 +1239,15 @@ false
<td><pre lang="json">
"/loki/api/v1/push"
</pre>
</td>
</tr>
<tr>
<td>ingress.tls</td>
<td>list</td>
<td></td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
@ -1644,42 +1700,6 @@ false
"rootUser": "enterprise-logs"
}
</pre>
</td>
</tr>
<tr>
<td>monitoring.alerts.annotations</td>
<td>object</td>
<td>Additional annotations for the alerts PrometheusRule resource</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>monitoring.alerts.enabled</td>
<td>bool</td>
<td>If enabled, create PrometheusRule resource with Loki alerting rules</td>
<td><pre lang="json">
true
</pre>
</td>
</tr>
<tr>
<td>monitoring.alerts.labels</td>
<td>object</td>
<td>Additional labels for the alerts PrometheusRule resource</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>monitoring.alerts.namespace</td>
<td>string</td>
<td>Alternative namespace to create alerting rules PrometheusRule resource in</td>
<td><pre lang="json">
null
</pre>
</td>
</tr>
<tr>

@ -71,8 +71,8 @@ spec:
-token=canary
{{- end }}
volumeMounts:
{{- if .Values.enterprise.provisioner.extraVolumeMounts }}
{{ toYaml .Values.enterprise.provisioner.extraVolumeMounts | nindent 12 }}
{{- with .Values.enterprise.provisioner.extraVolumeMounts }}
{{ toYaml . | nindent 12 }}
{{- end }}
- name: bootstrap
mountPath: /bootstrap
@ -102,8 +102,8 @@ spec:
--from-literal=password="$(cat /bootstrap/token-canary)"
{{- end }}
volumeMounts:
{{- if .Values.enterprise.provisioner.extraVolumeMounts }}
{{ toYaml .Values.enterprise.provisioner.extraVolumeMounts | nindent 12 }}
{{- with .Values.enterprise.provisioner.extraVolumeMounts }}
{{ toYaml . | nindent 12 }}
{{- end }}
- name: bootstrap
mountPath: /bootstrap

@ -31,8 +31,8 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if .Values.enterprise.tokengen.priorityClassName }}
priorityClassName: {{ .Values.enterprise.tokengen.priorityClassName }}
{{- with .Values.enterprise.tokengen.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
securityContext:
{{- toYaml .Values.enterprise.tokengen.securityContext | nindent 8 }}

@ -290,9 +290,12 @@ enterprise:
# -- Set to true when providing an external license
useExternalLicense: false
# -- Name of external licesne secret to use
# -- Name of external license secret to use
externalLicenseName: null
# -- Name of the external config secret to use
externalConfigName: ""
# -- If enabled, the correct admin_client storage will be configured. If disabled while running enterprise,
# make sure auth is set to `type: trust`, or that `auth_enabled` is set to `false`.
adminApi:
@ -359,6 +362,8 @@ enterprise:
fsGroup: 10001
# -- Environment variables from secrets or configmaps to add to the tokengen pods
extraEnvFrom: []
# -- The name of the PriorityClass for tokengen Pods
priorityClassName: ""
# -- Configuration for `provisioner` target
provisioner:
@ -393,6 +398,8 @@ enterprise:
tag: null
# -- Docker image pull policy
pullPolicy: IfNotPresent
# -- Volume mounts to add to the provisioner pods
extraVolumeMounts: []
nginxConfig:
file: |
@ -609,17 +616,6 @@ monitoring:
# - record: node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate
# expr: sum(rate(container_cpu_usage_seconds_total[1m])) by (node, namespace, pod, container)
# Alerting rules for monitoring Loki
alerts:
# -- If enabled, create PrometheusRule resource with Loki alerting rules
enabled: true
# -- Alternative namespace to create alerting rules PrometheusRule resource in
namespace: null
# -- Additional annotations for the alerts PrometheusRule resource
annotations: {}
# -- Additional labels for the alerts PrometheusRule resource
labels: {}
# ServiceMonitor configuration
serviceMonitor:
# -- If enabled, ServiceMonitor resources for Prometheus Operator are created
@ -939,7 +935,7 @@ singleBinary:
# You'll need to supply authn configuration for your ingress controller.
ingress:
enabled: false
# ingressClassName: nginx
ingressClassName: ""
annotations: {}
# nginx.ingress.kubernetes.io/auth-type: basic
# nginx.ingress.kubernetes.io/auth-secret: loki-distributed-basic-auth
@ -971,7 +967,7 @@ ingress:
hosts:
- loki.example.com
# tls:
tls: []
# - hosts:
# - loki.example.com
# secretName: loki-distributed-tls
@ -1073,7 +1069,7 @@ gateway:
# -- Specifies whether an ingress for the gateway should be created
enabled: false
# -- Ingress Class Name. MAY be required for Kubernetes versions >= 1.18
# ingressClassName: nginx
ingressClassName: ""
# -- Annotations for the gateway ingress
annotations: {}
# -- Hosts configuration for the gateway ingress

Loading…
Cancel
Save