Add Prometheus versions and replacements

This change adds the Prometheus chart, repo, and image version to the
versions catalogue so they can be overridden downstream.

Signed-off-by: Drew Walters <andrew.walters@att.com>
Change-Id: Iecb2f5ccdcd8fc3e383b8b308998ec0d21a918d1
changes/96/782596/3
Drew Walters 2 years ago
parent b19021f7e6
commit 048f1b8d28

@ -18,8 +18,6 @@ spec:
labels:
storeAPI: enabled
thanos:
image: quay.io/thanos/thanos:v0.17.2
version: v0.17.2
objectStorageConfig:
name: lma-infra-object-store
key: thanos-config.yaml

@ -0,0 +1,2 @@
resources:
- ../../../function/kube-prometheus-stack/replacements

@ -7,11 +7,9 @@ spec:
interval: 5m
chart:
spec:
chart: kube-prometheus-stack
sourceRef:
kind: HelmRepository
name: prometheus-community
version: 12.8.0
interval: 1m
timeout: 5m
# Reference values at

@ -4,5 +4,4 @@ metadata:
name: prometheus-community
namespace: monitoring
spec:
url: https://prometheus-community.github.io/helm-charts
interval: 10m
interval: 10m

@ -0,0 +1,124 @@
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: kube-prometheus-stack-versions-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: quay.io/airshipit/replacement-transformer:latest
replacements:
# Helm Repo
- source:
objref:
kind: VersionsCatalogue
name: versions-treasuremap
fieldref: "{.spec.helm_repositories.kube_prometheus_stack}"
target:
objref:
kind: HelmRepository
name: prometheus-community
fieldrefs: ["{.spec}"]
# Chart
- source:
objref:
kind: VersionsCatalogue
name: versions-treasuremap
fieldref: "{.spec.charts.kube_prometheus_stack.chart}"
target:
objref:
kind: HelmRelease
name: kube-prometheus-stack
fieldrefs: ["{.spec.chart.spec.chart}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-treasuremap
fieldref: "{.spec.charts.kube_prometheus_stack.version}"
target:
objref:
kind: HelmRelease
name: kube-prometheus-stack
fieldrefs: ["{.spec.chart.version}"]
# Images
- source:
objref:
kind: VersionsCatalogue
name: versions-treasuremap
fieldref: "{.spec.images.kube_prometheus_stack.admission_webhooks}"
target:
objref:
kind: HelmRelease
name: kube-prometheus-stack
fieldrefs: ["{.spec.values.prometheusOperator.admissionWebhooks.patch.image}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-treasuremap
fieldref: "{.spec.images.kube_prometheus_stack.alertmanager}"
target:
objref:
kind: HelmRelease
name: kube-prometheus-stack
fieldrefs: ["{.spec.values.alertmanager.alertmanagerSpec.image}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-treasuremap
fieldref: "{.spec.images.kube_prometheus_stack.prometheus}"
target:
objref:
kind: HelmRelease
name: kube-prometheus-stack
fieldrefs: ["{.spec.values.prometheusOperator.prometheusSpec.image}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-treasuremap
fieldref: "{.spec.images.kube_prometheus_stack.prometheus_config_reloader}"
target:
objref:
kind: HelmRelease
name: kube-prometheus-stack
fieldrefs: ["{.spec.values.prometheusOperator.prometheusConfigReloaderImage}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-treasuremap
fieldref: "{.spec.images.kube_prometheus_stack.prometheus_operator.alertmanagerDefaultBaseImage}"
target:
objref:
kind: HelmRelease
name: kube-prometheus-stack
fieldrefs: ["{.spec.values.prometheusOperator.alertmanagerDefaultBaseImage}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-treasuremap
fieldref: "{.spec.images.kube_prometheus_stack.prometheus_operator.prometheusDefaultBaseImage}"
target:
objref:
kind: HelmRelease
name: kube-prometheus-stack
fieldrefs: ["{.spec.values.prometheusOperator.prometheusDefaultBaseImage}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-treasuremap
fieldref: "{.spec.images.kube_prometheus_stack.prometheus_operator.image}"
target:
objref:
kind: HelmRelease
name: kube-prometheus-stack
fieldrefs: ["{.spec.values.prometheusOperator.image}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-treasuremap
fieldref: "{.spec.images.kube_prometheus_stack.thanos}"
target:
objref:
kind: HelmRelease
name: kube-prometheus-stack
fieldrefs: ["{.spec.values.prometheus.prometheusSpec.thanos.image}"]

@ -8,16 +8,47 @@ spec:
helm_repositories:
grafana:
url: https://grafana.github.io/helm-charts
kube_prometheus_stack:
url: https://prometheus-community.github.io/helm-charts
charts:
grafana:
chart: grafana
version: 6.1.0
kube_prometheus_stack:
chart: kube-prometheus-stack
version: 12.8.0
images:
grafana:
repository: grafana/grafana
tag: 7.4.5
kube_prometheus_stack:
admission_webhooks:
repository: jettech/kube-webhook-certgen
tag: v1.5.0
alertmanager:
repository: quay.io/prometheus/alertmanager
tag: v0.21.0
prometheus:
repository: quay.io/prometheus/prometheus
tag: v2.24.0
prometheus_config_reloader:
repository: quay.io/prometheus-operator/prometheus-config-reloader
tag: v0.46.0
prometheus_operator:
# NOTE: For prometheus and alertmanager instances managed by the operator
# https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml#L1487
alertmanagerDefaultBaseImage: quay.io/prometheus/alertmanager
prometheusDefaultBaseImage: quay.io/prometheus/prometheus
# Prometheus operator image
image:
repository: quay.io/prometheus-operator/prometheus-operator
tag: v0.46.0
thanos:
image: quay.io/thanos/thanos:v0.17.2
version: v0.17.2
sip:
kube-rbac-proxy: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
manager: quay.io/airshipit/sip:51e7ff85d617c0e94fa98920fdbacce3ad9e6bc0

@ -1,5 +1,9 @@
resources:
- ../../../../composite/lma-infra
- ../catalogues
- lma-infra-object-store.yaml
namespace: lma-infra
transformers:
- ../../../../composite/lma-infra/replacements
namespace: lma-infra

Loading…
Cancel
Save