upgrade prometheus-operator and replace additional_scrape_config with ScrapeConfig
This commit is contained in:
parent
e240fb3e25
commit
9cdafa8ae5
|
@ -37,8 +37,12 @@ spec:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: kustomize-generated-config
|
name: kustomize-generated-config
|
||||||
key: GRAFANA_EXTERNAL_URL
|
key: GRAFANA_EXTERNAL_URL
|
||||||
# - name: GF_AUTH_ANONYMOUS_ENABLED
|
- name: GF_AUTH_ANONYMOUS_ENABLED
|
||||||
# value: "true"
|
value: "true"
|
||||||
|
- name: GF_AUTH_ANONYMOUS_ORG_NAME
|
||||||
|
value: public
|
||||||
|
- name: GF_AUTH_ANONYMOUS_ORG_ROLE
|
||||||
|
value: Viewer
|
||||||
- name: GF_INSTALL_PLUGINS
|
- name: GF_INSTALL_PLUGINS
|
||||||
value: marcusolsson-json-datasource,marcusolsson-treemap-panel
|
value: marcusolsson-json-datasource,marcusolsson-treemap-panel
|
||||||
- name: GF_FEATURE_TOGGLES_ENABLE
|
- name: GF_FEATURE_TOGGLES_ENABLE
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
resources:
|
|
||||||
- https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.63.0/bundle.yaml
|
|
||||||
|
|
||||||
patches:
|
|
||||||
- path: patches/alertmanagerconfigs.yaml
|
|
||||||
- path: patches/alertmanagers.yaml
|
|
||||||
- path: patches/podmonitors.yaml
|
|
||||||
- path: patches/probes.yaml
|
|
||||||
- path: patches/prometheuses.yaml
|
|
||||||
- path: patches/prometheusrules.yaml
|
|
||||||
- path: patches/servicemonitors.yaml
|
|
||||||
- path: patches/thanosrulers.yaml
|
|
|
@ -1,5 +0,0 @@
|
||||||
$patch: delete
|
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
|
||||||
kind: CustomResourceDefinition
|
|
||||||
metadata:
|
|
||||||
name: alertmanagerconfigs.monitoring.coreos.com
|
|
|
@ -1,5 +0,0 @@
|
||||||
$patch: delete
|
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
|
||||||
kind: CustomResourceDefinition
|
|
||||||
metadata:
|
|
||||||
name: alertmanagers.monitoring.coreos.com
|
|
|
@ -1,5 +0,0 @@
|
||||||
$patch: delete
|
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
|
||||||
kind: CustomResourceDefinition
|
|
||||||
metadata:
|
|
||||||
name: podmonitors.monitoring.coreos.com
|
|
|
@ -1,5 +0,0 @@
|
||||||
$patch: delete
|
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
|
||||||
kind: CustomResourceDefinition
|
|
||||||
metadata:
|
|
||||||
name: probes.monitoring.coreos.com
|
|
|
@ -1,5 +0,0 @@
|
||||||
$patch: delete
|
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
|
||||||
kind: CustomResourceDefinition
|
|
||||||
metadata:
|
|
||||||
name: prometheuses.monitoring.coreos.com
|
|
|
@ -1,5 +0,0 @@
|
||||||
$patch: delete
|
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
|
||||||
kind: CustomResourceDefinition
|
|
||||||
metadata:
|
|
||||||
name: prometheusrules.monitoring.coreos.com
|
|
|
@ -1,5 +0,0 @@
|
||||||
$patch: delete
|
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
|
||||||
kind: CustomResourceDefinition
|
|
||||||
metadata:
|
|
||||||
name: servicemonitors.monitoring.coreos.com
|
|
|
@ -1,5 +0,0 @@
|
||||||
$patch: delete
|
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
|
||||||
kind: CustomResourceDefinition
|
|
||||||
metadata:
|
|
||||||
name: thanosrulers.monitoring.coreos.com
|
|
|
@ -1,8 +1,5 @@
|
||||||
resources:
|
resources:
|
||||||
- bundle/
|
- https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.76.2/bundle.yaml
|
||||||
- https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.63.0/stripped-down-crds.yaml
|
|
||||||
|
|
||||||
namespace: kube-system
|
|
||||||
|
|
||||||
commonLabels:
|
commonLabels:
|
||||||
app.kubernetes.io/part-of: monitoring
|
app.kubernetes.io/part-of: monitoring
|
|
@ -16,10 +16,10 @@ secretGenerator:
|
||||||
literals:
|
literals:
|
||||||
- username=changeme
|
- username=changeme
|
||||||
- password=changeme
|
- password=changeme
|
||||||
- name: additional-scrape-configs
|
# - name: additional-scrape-configs
|
||||||
behavior: create
|
# behavior: create
|
||||||
literals:
|
# literals:
|
||||||
- prometheus-additional.yaml=
|
# - prometheus-additional.yaml=
|
||||||
|
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: kustomize-generated-config
|
- name: kustomize-generated-config
|
||||||
|
|
|
@ -5,5 +5,5 @@ nameReference:
|
||||||
path: spec/remoteWrite/basicAuth/username/name
|
path: spec/remoteWrite/basicAuth/username/name
|
||||||
- kind: Prometheus
|
- kind: Prometheus
|
||||||
path: spec/remoteWrite/basicAuth/password/name
|
path: spec/remoteWrite/basicAuth/password/name
|
||||||
- kind: Prometheus
|
# - kind: Prometheus
|
||||||
path: spec/additionalScrapeConfigs/name
|
# path: spec/additionalScrapeConfigs/name
|
||||||
|
|
|
@ -18,9 +18,12 @@ spec:
|
||||||
probeSelector:
|
probeSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
monitor: prometheus
|
monitor: prometheus
|
||||||
additionalScrapeConfigs:
|
scrapeConfigSelector:
|
||||||
name: additional-scrape-configs
|
matchLabels:
|
||||||
key: prometheus-additional.yaml
|
monitor: prometheus
|
||||||
|
# additionalScrapeConfigs:
|
||||||
|
# name: additional-scrape-configs
|
||||||
|
# key: prometheus-additional.yaml
|
||||||
# remoteWrite:
|
# remoteWrite:
|
||||||
# - url: changeme
|
# - url: changeme
|
||||||
# basicAuth:
|
# basicAuth:
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
- job_name: additional/bastion-haproxy
|
|
||||||
static_configs:
|
|
||||||
- targets: ["192.168.20.10:8080"]
|
|
||||||
|
|
|
@ -9,6 +9,8 @@ resources:
|
||||||
- ../../overlays/actual
|
- ../../overlays/actual
|
||||||
- ../../overlays/llm
|
- ../../overlays/llm
|
||||||
|
|
||||||
|
- resources/prometheus/scrapeconfig.yaml
|
||||||
|
|
||||||
buildMetadata:
|
buildMetadata:
|
||||||
- originAnnotations
|
- originAnnotations
|
||||||
|
|
||||||
|
@ -45,13 +47,13 @@ images:
|
||||||
- name: ghcr.io/sillytavern/sillytavern
|
- name: ghcr.io/sillytavern/sillytavern
|
||||||
newTag: 1.12.4
|
newTag: 1.12.4
|
||||||
|
|
||||||
secretGenerator:
|
# secretGenerator:
|
||||||
- name: prometheus-additional-scrape-configs
|
# - name: prometheus-additional-scrape-configs
|
||||||
type: Opaque
|
# type: Opaque
|
||||||
namespace: monitoring
|
# namespace: monitoring
|
||||||
behavior: replace
|
# behavior: replace
|
||||||
files:
|
# files:
|
||||||
- prometheus-additional.yaml=configurations/prometheus/prometheus-additional.yaml
|
# - prometheus-additional.yaml=configurations/prometheus/prometheus-additional.yaml
|
||||||
|
|
||||||
# allow "kubectl apply -l app.kubernetes.io/managed-by=kustomize --prune ..."
|
# allow "kubectl apply -l app.kubernetes.io/managed-by=kustomize --prune ..."
|
||||||
commonLabels:
|
commonLabels:
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
apiVersion: monitoring.coreos.com/v1alpha1
|
||||||
|
kind: ScrapeConfig
|
||||||
|
metadata:
|
||||||
|
name: static-config
|
||||||
|
namespace: monitoring
|
||||||
|
labels:
|
||||||
|
monitor: prometheus
|
||||||
|
spec:
|
||||||
|
staticConfigs:
|
||||||
|
- labels:
|
||||||
|
job: external/bastion-haproxy
|
||||||
|
targets:
|
||||||
|
- 192.168.20.10:8080
|
||||||
|
- labels:
|
||||||
|
job: external/node_exporter
|
||||||
|
targets:
|
||||||
|
- 192.168.10.10:9100
|
||||||
|
- 192.168.10.11:9100
|
||||||
|
- 192.168.10.12:9100
|
||||||
|
- 192.168.20.21:9100
|
||||||
|
- 192.168.20.22:9100
|
||||||
|
- 192.168.20.23:9100
|
||||||
|
- 192.168.20.24:9100
|
||||||
|
- labels:
|
||||||
|
job: external/satisfactory-server
|
||||||
|
targets:
|
||||||
|
- 192.168.20.31:9777
|
||||||
|
- 192.168.20.31:9100
|
Loading…
Reference in New Issue