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:
|
||||
name: kustomize-generated-config
|
||||
key: GRAFANA_EXTERNAL_URL
|
||||
# - name: GF_AUTH_ANONYMOUS_ENABLED
|
||||
# value: "true"
|
||||
- name: GF_AUTH_ANONYMOUS_ENABLED
|
||||
value: "true"
|
||||
- name: GF_AUTH_ANONYMOUS_ORG_NAME
|
||||
value: public
|
||||
- name: GF_AUTH_ANONYMOUS_ORG_ROLE
|
||||
value: Viewer
|
||||
- name: GF_INSTALL_PLUGINS
|
||||
value: marcusolsson-json-datasource,marcusolsson-treemap-panel
|
||||
- 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:
|
||||
- bundle/
|
||||
- https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.63.0/stripped-down-crds.yaml
|
||||
|
||||
namespace: kube-system
|
||||
- https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.76.2/bundle.yaml
|
||||
|
||||
commonLabels:
|
||||
app.kubernetes.io/part-of: monitoring
|
|
@ -16,10 +16,10 @@ secretGenerator:
|
|||
literals:
|
||||
- username=changeme
|
||||
- password=changeme
|
||||
- name: additional-scrape-configs
|
||||
behavior: create
|
||||
literals:
|
||||
- prometheus-additional.yaml=
|
||||
# - name: additional-scrape-configs
|
||||
# behavior: create
|
||||
# literals:
|
||||
# - prometheus-additional.yaml=
|
||||
|
||||
configMapGenerator:
|
||||
- name: kustomize-generated-config
|
||||
|
|
|
@ -5,5 +5,5 @@ nameReference:
|
|||
path: spec/remoteWrite/basicAuth/username/name
|
||||
- kind: Prometheus
|
||||
path: spec/remoteWrite/basicAuth/password/name
|
||||
- kind: Prometheus
|
||||
path: spec/additionalScrapeConfigs/name
|
||||
# - kind: Prometheus
|
||||
# path: spec/additionalScrapeConfigs/name
|
||||
|
|
|
@ -18,9 +18,12 @@ spec:
|
|||
probeSelector:
|
||||
matchLabels:
|
||||
monitor: prometheus
|
||||
additionalScrapeConfigs:
|
||||
name: additional-scrape-configs
|
||||
key: prometheus-additional.yaml
|
||||
scrapeConfigSelector:
|
||||
matchLabels:
|
||||
monitor: prometheus
|
||||
# additionalScrapeConfigs:
|
||||
# name: additional-scrape-configs
|
||||
# key: prometheus-additional.yaml
|
||||
# remoteWrite:
|
||||
# - url: changeme
|
||||
# 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/llm
|
||||
|
||||
- resources/prometheus/scrapeconfig.yaml
|
||||
|
||||
buildMetadata:
|
||||
- originAnnotations
|
||||
|
||||
|
@ -45,13 +47,13 @@ images:
|
|||
- name: ghcr.io/sillytavern/sillytavern
|
||||
newTag: 1.12.4
|
||||
|
||||
secretGenerator:
|
||||
- name: prometheus-additional-scrape-configs
|
||||
type: Opaque
|
||||
namespace: monitoring
|
||||
behavior: replace
|
||||
files:
|
||||
- prometheus-additional.yaml=configurations/prometheus/prometheus-additional.yaml
|
||||
# secretGenerator:
|
||||
# - name: prometheus-additional-scrape-configs
|
||||
# type: Opaque
|
||||
# namespace: monitoring
|
||||
# behavior: replace
|
||||
# files:
|
||||
# - prometheus-additional.yaml=configurations/prometheus/prometheus-additional.yaml
|
||||
|
||||
# allow "kubectl apply -l app.kubernetes.io/managed-by=kustomize --prune ..."
|
||||
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