Skip to content

Commit

Permalink
Merge branch 'main' into move-crds
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke committed Jul 6, 2023
2 parents bd0336d + b981c2b commit b4781b3
Show file tree
Hide file tree
Showing 25 changed files with 79 additions and 5,136 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prometheus Community Kubernetes Helm Charts

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Release Charts](https://github.com/prometheus-community/helm-charts/workflows/Release%20Charts/badge.svg?branch=main) [![Releases downloads](https://img.shields.io/github/downloads/prometheus-community/helm-charts/total.svg)](https://github.com/prometheus-community/helm-charts/releases)
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/prometheus-community)](https://artifacthub.io/packages/search?org=prometheus&cncf=true) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Release Charts](https://github.com/prometheus-community/helm-charts/workflows/Release%20Charts/badge.svg?branch=main) [![Releases downloads](https://img.shields.io/github/downloads/prometheus-community/helm-charts/total.svg)](https://github.com/prometheus-community/helm-charts/releases)

This functionality is in beta and is subject to change. The code is provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.

Expand All @@ -9,7 +9,7 @@ This functionality is in beta and is subject to change. The code is provided as-
[Helm](https://helm.sh) must be installed to use the charts.
Please refer to Helm's [documentation](https://helm.sh/docs/) to get started.

Once Helm is set up properly, add the repo as follows:
Once Helm is set up properly, add the repository as follows:

```console
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
Expand Down
4 changes: 2 additions & 2 deletions charts/kube-prometheus-stack/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ venv
pyvenv.cfg
!**
charts/*
!charts/kube-prometheus-stack-crds/
!charts/kube-prometheus-stack-crds/**
!charts/crds/
!charts/crds/**
Chart.lock
3 changes: 3 additions & 0 deletions charts/kube-prometheus-stack/charts/crds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: v2
name: crds
version: 0.0.0
3 changes: 3 additions & 0 deletions charts/kube-prometheus-stack/charts/crds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# crds subchart

See: https://github.com/prometheus-community/helm-charts/issues/3548

This file was deleted.

10 changes: 6 additions & 4 deletions charts/kube-prometheus-stack/hack/update_crds.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

if [[ $(uname -s) = "Darwin" ]]; then
VERSION="$(grep ^appVersion ../Chart.yaml | sed 's/appVersion: //g')"
VERSION="$(grep ^appVersion "${SCRIPT_DIR}/../Chart.yaml" | sed 's/appVersion: //g')"
else
VERSION="$(grep ^appVersion ../Chart.yaml | sed 's/appVersion:\s//g')"
VERSION="$(grep ^appVersion "${SCRIPT_DIR}/../Chart.yaml" | sed 's/appVersion:\s//g')"
fi

FILES=(
Expand All @@ -27,9 +29,9 @@ for line in "${FILES[@]}"; do

echo -e "Downloading Prometheus Operator CRD with Version ${VERSION}:\n${URL}\n"

echo "# ${URL}" > ../charts/kube-prometheus-stack-crds/crds/"${DESTINATION}"
echo "# ${URL}" > "${SCRIPT_DIR}/../charts/crds/crds/${DESTINATION}"

if ! curl --silent --retry-all-errors --fail --location "${URL}" >> ../crds/"${DESTINATION}"; then
if ! curl --silent --retry-all-errors --fail --location "${URL}" >> "${SCRIPT_DIR}/../charts/crds/crds/${DESTINATION}"; then
echo -e "Failed to download ${URL}!"
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ spec:
port: {{ .Values.alertmanager.service.port }}
targetPort: {{ .Values.alertmanager.service.targetPort }}
protocol: TCP
- name: reloader-web
port: 8080
targetPort: reloader-web
{{- if .Values.alertmanager.service.additionalPorts }}
{{ toYaml .Values.alertmanager.service.additionalPorts | indent 2 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,30 @@ spec:
{{- if .Values.alertmanager.serviceMonitor.relabelings }}
relabelings:
{{ toYaml .Values.alertmanager.serviceMonitor.relabelings | indent 6 }}
{{- end }}
- port: reloader-web
{{- if .Values.alertmanager.serviceMonitor.interval }}
interval: {{ .Values.alertmanager.serviceMonitor.interval }}
{{- end }}
{{- if .Values.alertmanager.serviceMonitor.proxyUrl }}
proxyUrl: {{ .Values.alertmanager.serviceMonitor.proxyUrl}}
{{- end }}
{{- if .Values.alertmanager.serviceMonitor.scheme }}
scheme: {{ .Values.alertmanager.serviceMonitor.scheme }}
{{- end }}
{{- if .Values.alertmanager.serviceMonitor.bearerTokenFile }}
bearerTokenFile: {{ .Values.alertmanager.serviceMonitor.bearerTokenFile }}
{{- end }}
{{- if .Values.alertmanager.serviceMonitor.tlsConfig }}
tlsConfig: {{ toYaml .Values.alertmanager.serviceMonitor.tlsConfig | nindent 6 }}
{{- end }}
path: "/metrics"
{{- if .Values.alertmanager.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{ tpl (toYaml .Values.alertmanager.serviceMonitor.metricRelabelings | indent 6) . }}
{{- end }}
{{- if .Values.alertmanager.serviceMonitor.relabelings }}
relabelings:
{{ toYaml .Values.alertmanager.serviceMonitor.relabelings | indent 6 }}
{{- end }}
{{- end }}
Loading

0 comments on commit b4781b3

Please sign in to comment.