Skip to content

Commit

Permalink
Merge branch 'main' into unique-cluster-label-loki
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheikh-Abubaker authored Nov 14, 2024
2 parents 2323328 + d9107be commit 91b484f
Show file tree
Hide file tree
Showing 23 changed files with 176 additions and 21 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,23 @@ jobs:
kubectl_version: ${{ inputs.kind_kubectl_version }}
node_image: ${{ inputs.kind_node_image }}

- name: Check Kubernetes version and apply Gateway API CRDs
if: steps.list-changed.outputs.changed == 'true'
run: |
# Get Kubernetes version and extract the major.minor version
version=$(kubectl version -o json | jq -r '.serverVersion.major + "." + .serverVersion.minor' | tr -d '+')
major_version=$(echo $version | cut -d. -f1)
minor_version=$(echo $version | cut -d. -f2)
# Compare version with 1.23. The gateway CRDs use x-kubernetes-validations, which is only supported from 1.23 onwards.
if [ "$major_version" -eq 1 ] && [ "$minor_version" -ge 23 ] || [ "$major_version" -gt 1 ]; then
echo "Kubernetes version $version >= 1.23, applying Gateway API CRDs"
kubectl apply -k https://github.com/kubernetes-sigs/gateway-api/config/crd
else
echo "Kubernetes version $version < 1.23, skipping Gateway API CRDs installation"
echo "Please use an older version of Gateway API CRDs or upgrade your Kubernetes version"
fi
- name: Run chart-testing (install)
run: |
changed=$(ct list-changed --config "${CT_CONFIGFILE}")
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/update-helm-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ jobs:
needs: [setup]
runs-on: ubuntu-latest
permissions:
contents: write # to push chart release, create release, and push tags to github
packages: write # to push package to ghcr
contents: write # allows GITHUB_TOKEN to push chart release, create release, and push tags to github
packages: write # allows GITHUB_TOKEN to push package to ghcr
env:
github_app_id: ${{ secrets.github_app_id }}
if: needs.setup.outputs.changed == 'true'
Expand Down Expand Up @@ -234,7 +234,9 @@ jobs:
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ env.AUTHTOKEN }}
# GitHub App installation token cannot push package to the org's package registry;
# using GITHUB_TOKEN here instead to avoid using PAT.
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push charts to GHCR
run: |
Expand Down
2 changes: 1 addition & 1 deletion charts/grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: grafana
version: 8.5.12
version: 8.6.0
appVersion: 11.3.0
kubeVersion: "^1.8.0-0"
description: The leading tool for querying and visualizing time series and metrics.
Expand Down
26 changes: 26 additions & 0 deletions charts/grafana/ci/with-nondefault-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,29 @@ ingress:
enabled: true
hosts:
- monitoring-{{ .Values.global.environment }}.example.com

route:
main:
enabled: true
labels:
app: monitoring-prometheus
hostnames:
- "*.example.com"
- "{{ .Values.global.environment }}.example.com"
filters:
- type: RequestHeaderModifier
requestHeaderModifier:
set:
- name: my-header-name
value: my-new-header-value
additionalRules:
- filters:
- type: RequestHeaderModifier
requestHeaderModifier:
set:
- name: my-header-name
value: my-new-header-value
matches:
- path:
type: PathPrefix
value: /foo/
44 changes: 44 additions & 0 deletions charts/grafana/templates/route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{{- range $name, $route := .Values.route }}
{{- if $route.enabled -}}
---
apiVersion: {{ $route.apiVersion | default "gateway.networking.k8s.io/v1" }}
kind: {{ $route.kind | default "HTTPRoute" }}
metadata:
{{- with $route.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "grafana.fullname" $ }}{{ if ne $name "main" }}-{{ $name }}{{ end }}
namespace: {{ template "grafana.namespace" $ }}
labels:
app: {{ template "grafana.name" $ }}-prometheus
{{- include "grafana.labels" $ | nindent 4 }}
{{- with $route.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with $route.parentRefs }}
parentRefs:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $route.hostnames }}
hostnames:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
rules:
{{- if $route.additionalRules }}
{{- tpl (toYaml $route.additionalRules) $ | nindent 4 }}
{{- end }}
- backendRefs:
- name: {{ include "grafana.fullname" $ }}
port: {{ $.Values.service.port }}
{{- with $route.filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $route.matches }}
matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
36 changes: 36 additions & 0 deletions charts/grafana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,42 @@ ingress:
# hosts:
# - chart-example.local

# -- BETA: Configure the gateway routes for the chart here.
# More routes can be added by adding a dictionary key like the 'main' route.
# Be aware that this is an early beta of this feature,
# kube-prometheus-stack does not guarantee this works and is subject to change.
# Being BETA this can/will change in the future without notice, do not use unless you want to take that risk
# [[ref]](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io%2fv1alpha2)
route:
main:
# -- Enables or disables the route
enabled: false

# -- Set the route apiVersion, e.g. gateway.networking.k8s.io/v1 or gateway.networking.k8s.io/v1alpha2
apiVersion: gateway.networking.k8s.io/v1
# -- Set the route kind
# Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute
kind: HTTPRoute

annotations: {}
labels: {}

hostnames: []
# - my-filter.example.com
parentRefs: []
# - name: acme-gw

matches:
- path:
type: PathPrefix
value: /

## Filters define the filters that are applied to requests that match this rule.
filters: []

## Additional custom rules that can be added to the route
additionalRules: []

resources: {}
# limits:
# cpu: 100m
Expand Down
2 changes: 1 addition & 1 deletion charts/rollout-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: rollout-operator
description: "Grafana rollout-operator"
type: application
version: 0.19.0
version: 0.19.1
appVersion: v0.19.1
home: https://github.com/grafana/rollout-operator
kubeVersion: ^1.10.0-0
2 changes: 1 addition & 1 deletion charts/rollout-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Helm chart for deploying [Grafana rollout-operator](https://github.com/grafana/r

# rollout-operator

![Version: 0.19.0](https://img.shields.io/badge/Version-0.19.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.19.1](https://img.shields.io/badge/AppVersion-v0.19.1-informational?style=flat-square)
![Version: 0.19.1](https://img.shields.io/badge/Version-0.19.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.19.1](https://img.shields.io/badge/AppVersion-v0.19.1-informational?style=flat-square)

Grafana rollout-operator

Expand Down
6 changes: 3 additions & 3 deletions charts/rollout-operator/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ spec:
{{- with .Values.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
{{- with .Values.serviceMonitor.relabelings }}
relabelings:
{{- with .Values.serviceMonitor.relabelings }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- toYaml . | nindent 8 }}
{{- end }}
scheme: http
{{- end -}}
4 changes: 2 additions & 2 deletions charts/synthetic-monitoring-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: v0.9.3-0-gcd7aadd
appVersion: v0.29.3
description: Grafana's Synthetic Monitoring application. The agent provides probe functionality and executes network checks for monitoring remote targets.
home: https://grafana.net
icon: https://raw.githubusercontent.com/grafana/grafana/master/public/img/logo_transparent_400x.png
Expand All @@ -15,4 +15,4 @@ name: synthetic-monitoring-agent
sources:
- https://github.com/grafana/synthetic-monitoring-agent
type: application
version: 0.5.0
version: 0.6.0
2 changes: 1 addition & 1 deletion charts/synthetic-monitoring-agent/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# synthetic-monitoring-agent

![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.9.3-0-gcd7aadd](https://img.shields.io/badge/AppVersion-v0.9.3--0--gcd7aadd-informational?style=flat-square)
![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.29.3](https://img.shields.io/badge/AppVersion-v0.29.3-informational?style=flat-square)

Grafana's Synthetic Monitoring application. The agent provides probe functionality and executes network checks for monitoring remote targets.

Expand Down
2 changes: 1 addition & 1 deletion charts/tempo-distributed/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: tempo-distributed
description: Grafana Tempo in MicroService mode
type: application
version: 1.21.0
version: 1.22.0
appVersion: 2.6.0
engine: gotpl
home: https://grafana.com/docs/tempo/latest/
Expand Down
9 changes: 7 additions & 2 deletions charts/tempo-distributed/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tempo-distributed

![Version: 1.21.0](https://img.shields.io/badge/Version-1.21.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.0](https://img.shields.io/badge/AppVersion-2.6.0-informational?style=flat-square)
![Version: 1.22.0](https://img.shields.io/badge/Version-1.22.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.0](https://img.shields.io/badge/AppVersion-2.6.0-informational?style=flat-square)

Grafana Tempo in MicroService mode

Expand Down Expand Up @@ -348,6 +348,7 @@ The memcached default args are removed and should be provided manually. The sett
| distributor.resources | object | `{}` | Resource requests and limits for the distributor |
| distributor.service.annotations | object | `{}` | Annotations for distributor service |
| distributor.service.externalTrafficPolicy | string | `nil` | If type is LoadBalancer you can set it to 'Local' [preserve the client source IP](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip) |
| distributor.service.internalTrafficPolicy | string | `"Cluster"` | https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/ |
| distributor.service.labels | object | `{}` | Labels for distributor service |
| distributor.service.loadBalancerIP | string | `""` | If type is LoadBalancer you can assign the IP to the LoadBalancer |
| distributor.service.loadBalancerSourceRanges | list | `[]` | If type is LoadBalancer limit incoming traffic from IPs. |
Expand Down Expand Up @@ -548,6 +549,8 @@ The memcached default args are removed and should be provided manually. The sett
| ingester.replicas | int | `3` | Number of replicas for the ingester |
| ingester.resources | object | `{}` | Resource requests and limits for the ingester |
| ingester.service.annotations | object | `{}` | Annotations for ingester service |
| ingester.service.internalTrafficPolicy | string | `"Cluster"` | https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/ |
| ingester.service.type | string | `"ClusterIP"` | Type of the service: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types |
| ingester.terminationGracePeriodSeconds | int | `300` | Grace period to allow the ingester to shutdown before it is killed. Especially for the ingestor, this must be increased. It must be long enough so ingesters can be gracefully shutdown flushing/transferring all data and to successfully leave the member ring on shutdown. |
| ingester.tolerations | list | `[]` | Tolerations for ingester pods |
| ingester.topologySpreadConstraints | string | Defaults to allow skew no more then 1 node per AZ | topologySpread for ingester pods. Passed through `tpl` and, thus, to be configured as string |
Expand Down Expand Up @@ -830,8 +833,10 @@ The memcached default args are removed and should be provided manually. The sett
| tempo.image.registry | string | `"docker.io"` | The Docker registry |
| tempo.image.repository | string | `"grafana/tempo"` | Docker image repository |
| tempo.image.tag | string | `nil` | Overrides the image tag whose default is the chart's appVersion |
| tempo.memberlist | object | `{"appProtocol":null}` | Memberlist service configuration. |
| tempo.memberlist | object | `{"appProtocol":null,"service":{"annotations":{}}}` | Memberlist service configuration. |
| tempo.memberlist.appProtocol | string | `nil` | Adds the appProtocol field to the memberlist service. This allows memberlist to work with istio protocol selection. Set the optional service protocol. Ex: "tcp", "http" or "https". |
| tempo.memberlist.service | object | `{"annotations":{}}` | Adds the service field to the memberlist service |
| tempo.memberlist.service.annotations | object | `{}` | Sets optional annotations to the service field of the memberlist service. |
| tempo.podAnnotations | object | `{}` | Common annotations for all pods |
| tempo.podLabels | object | `{}` | Global labels for all tempo pods |
| tempo.podSecurityContext | object | `{"fsGroup":1000}` | podSecurityContext holds pod-level security attributes and common container settings |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{{- tpl (toYaml . | nindent 4) $ }}
{{- end }}
spec:
internalTrafficPolicy: {{ .Values.distributor.service.internalTrafficPolicy }}
type: {{ .Values.distributor.service.type }}
ports:
- name: http-metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "tempo.labels" (dict "ctx" . "component" "gossip-ring") | nindent 4 }}
annotations:
{{- with .Values.tempo.memberlist.service.annotations | default dict }}
{{- toYaml . | nindent 4}}
{{- end }}
spec:
type: ClusterIP
clusterIP: None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ metadata:
{{- tpl (toYaml . | nindent 4) $ }}
{{- end }}
spec:
type: {{ .Values.ingester.service.type }}
internalTrafficPolicy: {{ .Values.ingester.service.internalTrafficPolicy }}
ports:
- name: http-metrics
port: 3100
Expand Down
10 changes: 10 additions & 0 deletions charts/tempo-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ tempo:
memberlist:
# -- Adds the appProtocol field to the memberlist service. This allows memberlist to work with istio protocol selection. Set the optional service protocol. Ex: "tcp", "http" or "https".
appProtocol: null
# -- Adds the service field to the memberlist service
service:
# -- Sets optional annotations to the service field of the memberlist service.
annotations: {}

serviceAccount:
# -- Specifies whether a ServiceAccount should be created
Expand Down Expand Up @@ -225,6 +229,10 @@ ingester:
service:
# -- Annotations for ingester service
annotations: {}
# -- Type of the service: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
type: ClusterIP
# -- https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/
internalTrafficPolicy: Cluster
# -- Adds the appProtocol field to the ingester service. This allows ingester to work with istio protocol selection.
appProtocol:
# -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https"
Expand Down Expand Up @@ -474,6 +482,8 @@ distributor:
loadBalancerSourceRanges: []
# -- If type is LoadBalancer you can set it to 'Local' [preserve the client source IP](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip)
externalTrafficPolicy: null
# -- https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/
internalTrafficPolicy: Cluster
serviceDiscovery:
# -- Annotations for distributorDiscovery service
annotations: {}
Expand Down
4 changes: 2 additions & 2 deletions charts/tempo-vulture/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: tempo-vulture
description: Grafana Tempo Vulture - A tool to monitor Tempo performance.
type: application
version: 0.6.0
appVersion: 2.5.0
version: 0.7.0
appVersion: 2.6.1
engine: gotpl
home: https://grafana.com/docs/tempo/latest/
icon: https://raw.githubusercontent.com/grafana/tempo/master/docs/tempo/website/logo_and_name.png
Expand Down
2 changes: 1 addition & 1 deletion charts/tempo-vulture/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tempo-vulture

![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.5.0](https://img.shields.io/badge/AppVersion-2.5.0-informational?style=flat-square)
![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.1](https://img.shields.io/badge/AppVersion-2.6.1-informational?style=flat-square)

Grafana Tempo Vulture - A tool to monitor Tempo performance.

Expand Down
4 changes: 2 additions & 2 deletions charts/tempo/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: tempo
description: Grafana Tempo Single Binary Mode
type: application
version: 1.12.0
appVersion: 2.5.0
version: 1.14.0
appVersion: 2.6.1
engine: gotpl
home: https://grafana.net
icon: https://raw.githubusercontent.com/grafana/tempo/master/docs/tempo/website/logo_and_name.png
Expand Down
3 changes: 2 additions & 1 deletion charts/tempo/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tempo

![Version: 1.12.0](https://img.shields.io/badge/Version-1.12.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.5.0](https://img.shields.io/badge/AppVersion-2.5.0-informational?style=flat-square)
![Version: 1.14.0](https://img.shields.io/badge/Version-1.14.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.1](https://img.shields.io/badge/AppVersion-2.6.1-informational?style=flat-square)

Grafana Tempo Single Binary Mode

Expand Down Expand Up @@ -31,6 +31,7 @@ Grafana Tempo Single Binary Mode
| networkPolicy.ingress | bool | `true` | |
| nodeSelector | object | `{}` | Node labels for pod assignment. See: https://kubernetes.io/docs/user-guide/node-selection/ |
| persistence.accessModes[0] | string | `"ReadWriteOnce"` | |
| persistence.enableStatefulSetAutoDeletePVC | bool | `false` | Enable StatefulSetAutoDeletePVC feature |
| persistence.enabled | bool | `false` | |
| persistence.size | string | `"10Gi"` | |
| podAnnotations | object | `{}` | Pod Annotations |
Expand Down
5 changes: 5 additions & 0 deletions charts/tempo/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ spec:
{{- if .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- end }}
{{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.persistence.enableStatefulSetAutoDeletePVC) (.Values.persistence.enabled) }}
persistentVolumeClaimRetentionPolicy:
whenDeleted: Delete
whenScaled: Delete
{{- end }}
selector:
matchLabels:
{{- include "tempo.selectorLabels" . | nindent 6 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/tempo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ serviceMonitor:

persistence:
enabled: false
# -- Enable StatefulSetAutoDeletePVC feature
enableStatefulSetAutoDeletePVC: false
# storageClassName: local-path
accessModes:
- ReadWriteOnce
Expand Down

0 comments on commit 91b484f

Please sign in to comment.