This commit is contained in:
V 2025-11-18 14:29:11 +00:00
parent e7abb15fbd
commit d96b7d6a41
7 changed files with 23 additions and 15 deletions

View File

@ -0,0 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: monitoring
configMapGenerator:
- name: flux-kube-state-metrics-config
files:
- kube-state-metrics-config.yaml
options:
labels:
app.kubernetes.io/part-of: flux
app.kubernetes.io/component: monitoring

View File

@ -2,6 +2,7 @@ apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository kind: HelmRepository
metadata: metadata:
name: prometheus-community name: prometheus-community
namespace: monitoring
spec: spec:
interval: 12h interval: 12h
type: oci type: oci
@ -11,6 +12,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease kind: HelmRelease
metadata: metadata:
name: kube-prometheus-stack name: kube-prometheus-stack
namespace: monitoring
spec: spec:
serviceAccountName: flux serviceAccountName: flux
interval: 1h interval: 1h

View File

@ -1,19 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
namespace: monitoring # Namespace is specified in each file in this case due to an issue with the RoleBinding
# namespace: monitoring
resources: resources:
- namespace.yaml - namespace.yaml
- rbac.yaml - rbac.yaml
- grafana-auth-secret.yaml - grafana-auth-secret.yaml
- kube-prometheus-stack.yaml - kube-prometheus-stack.yaml
- metrics-server.yaml - metrics-server.yaml
configMapGenerator: - cm/
- name: flux-kube-state-metrics-config
files:
- kube-state-metrics-config.yaml
options:
labels:
app.kubernetes.io/part-of: flux
app.kubernetes.io/component: monitoring
configurations: configurations:
- kustomizeconfig.yaml - kustomizeconfig.yaml

View File

@ -4,6 +4,4 @@ nameReference:
fieldSpecs: fieldSpecs:
- path: spec/valuesFrom/name - path: spec/valuesFrom/name
kind: HelmRelease kind: HelmRelease
namespace:
- kind: RoleBinding

View File

@ -2,6 +2,7 @@ apiVersion: source.toolkit.fluxcd.io/v1
kind: OCIRepository kind: OCIRepository
metadata: metadata:
name: metrics-server name: metrics-server
namespace: monitoring
spec: spec:
interval: 1h interval: 1h
url: oci://ghcr.io/controlplaneio-fluxcd/charts/metrics-server url: oci://ghcr.io/controlplaneio-fluxcd/charts/metrics-server
@ -15,6 +16,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease kind: HelmRelease
metadata: metadata:
name: metrics-server name: metrics-server
namespace: monitoring
spec: spec:
serviceAccountName: flux serviceAccountName: flux
interval: 1h interval: 1h

View File

@ -1,7 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- ../base - ../base/
patches: patches:
- patch: | - patch: |
- op: replace - op: replace