Skip to content

Commit

Permalink
evolve
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Aug 24, 2022
1 parent 24b1369 commit 8c63d4c
Show file tree
Hide file tree
Showing 16 changed files with 1,052 additions and 467 deletions.
6 changes: 3 additions & 3 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ def deploy_observability():
k8s_yaml(read_file("./.tiltbuild/yaml/prometheus.observability.yaml"), allow_duplicates = True)
k8s_resource(workload = "prometheus-server", new_name = "prometheus", port_forwards = "9090", extra_pod_selectors = [{"app": "prometheus"}], labels = ["observability"])

if "capi-state-metrics" in settings.get("deploy_observability", []):
k8s_yaml(read_file("./.tiltbuild/yaml/capi-state-metrics.observability.yaml"), allow_duplicates = True)
k8s_resource(workload = "capi-state-metrics", new_name = "capi-state-metrics", port_forwards = "8081:8080", extra_pod_selectors = [{"app": "kube-state-metrics"}], labels = ["observability"])
if "kube-state-metrics" in settings.get("deploy_observability", []):
k8s_yaml(read_file("./.tiltbuild/yaml/kube-state-metrics.observability.yaml"), allow_duplicates = True)
k8s_resource(workload = "kube-state-metrics", new_name = "kube-state-metrics", extra_pod_selectors = [{"app": "kube-state-metrics"}], labels = ["observability"])

if "visualizer" in settings.get("deploy_observability", []):
k8s_yaml(read_file("./.tiltbuild/yaml/visualizer.observability.yaml"), allow_duplicates = True)
Expand Down

This file was deleted.

53 changes: 0 additions & 53 deletions hack/observability/capi-state-metrics/kustomization.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ helmCharts:
repo: https://prometheus-community.github.io/helm-charts
namespace: observability
releaseName: kube-state-metrics
valuesFile: values.yaml
valuesFile: values.yaml
82 changes: 82 additions & 0 deletions hack/observability/kube-state-metrics/chart/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
image:
# TODO(chrischdi): drop to default to released image as soon as it got released
# repository: registry.k8s.io/kube-state-metrics/kube-state-metrics
# tag: v2.5.0
# custom image which includes changes > v2.5.0 required for custom resource metrics
repository: chrischdi/kube-state-metrics
tag: v2.5.0-fe097b6c
pullPolicy: IfNotPresent

# Add the CR configuration from the config map.
volumeMounts:
- mountPath: /etc/config
name: config-volume

volumes:
- configMap:
name: kube-state-metrics-crd-config
name: config-volume

extraArgs:
- "--custom-resource-state-config-file=/etc/config/crd-config.yaml"

rbac:
extraRules:
- apiGroups:
- cluster.x-k8s.io
resources:
- clusters
- machinedeployments
- machinesets
- machines
- machinehealthchecks
verbs:
- get
- list
- watch
- apiGroups:
- controlplane.cluster.x-k8s.io
resources:
- kubeadmcontrolplanes
verbs:
- get
- list
- watch

collectors:
# CAPI CRs
- clusters
- machinedeployments
- machinesets
- machines
- machinehealthchecks
- kubeadmcontrolplanes
# We need to define all default collectors too, otherwise the helm chart does not include this resources in rbac
- certificatesigningrequests
- configmaps
- cronjobs
- daemonsets
- deployments
- endpoints
- horizontalpodautoscalers
- ingresses
- jobs
- limitranges
- mutatingwebhookconfigurations
- namespaces
- networkpolicies
- nodes
- persistentvolumeclaims
- persistentvolumes
- poddisruptionbudgets
- pods
- replicasets
- replicationcontrollers
- resourcequotas
- secrets
- services
- statefulsets
- storageclasses
- validatingwebhookconfigurations
- volumeattachments
# - verticalpodautoscalers # not a default resource, see also: https://github.com/kubernetes/kube-state-metrics#enabling-verticalpodautoscalers
Loading

0 comments on commit 8c63d4c

Please sign in to comment.