Skip to content

Commit

Permalink
feat(vpa): init component (#5678)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
  • Loading branch information
nlamirault authored Sep 5, 2024
1 parent c83060e commit ca10c3f
Show file tree
Hide file tree
Showing 7 changed files with 273 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gitops/argocd/apps/system/values-k3s-homelab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ argocd-apps:
- appName: node-problem-detector
namespace: kube-system
targetRevision: HEAD
- appName: vertical-pod-autoscaler
namespace: kube-system
targetRevision: HEAD
- appName: meilisearch
namespace: search
targetRevision: HEAD
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
# Copyright (C) Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

apiVersion: v2
type: application
name: vertical-pod-autoscaler
version: 1.0.0
appVersion: 1.0.0
dependencies:
- name: vertical-pod-autoscaler
repository: https://cowboysysop.github.io/charts
version: 9.9.0
23 changes: 23 additions & 0 deletions gitops/argocd/charts/kube-system/vertical-pod-autoscaler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# cluster-autoscaler

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 9.10.8](https://img.shields.io/badge/AppVersion-9.10.8-informational?style=flat-square)

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://kubernetes.github.io/autoscaler | cluster-autoscaler | 9.19.3 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| cluster-autoscaler.prometheusRule.additionalLabels."prometheus.io/operator" | string | `"portefaix"` | |
| cluster-autoscaler.prometheusRule.enabled | bool | `true` | |
| cluster-autoscaler.prometheusRule.namespace | string | `"monitoring"` | |
| cluster-autoscaler.serviceMonitor.enabled | bool | `true` | |
| cluster-autoscaler.serviceMonitor.namespace | string | `"monitoring"` | |
| cluster-autoscaler.serviceMonitor.selector."prometheus.io/operator" | string | `"portefaix"` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
# Copyright (C) Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

vertical-pod-autoscaler:
commonLabels:
portefaix.xyz/version: v0.54.0

admissionController:
replicaCount: 1
resources:
limits:
# cpu: 200m
memory: 512Mi
requests:
cpu: 20m
memory: 100Mi

recommender:
replicaCount: 1
resources:
limits:
# cpu: 200m
memory: 512Mi
requests:
cpu: 20m
memory: 100Mi

updater:
replicaCount: 1
resources:
limits:
# cpu: 200m
memory: 512Mi
requests:
cpu: 20m
memory: 100Mi
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
# Copyright (C) Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

vertical-pod-autoscaler:
commonLabels:
portefaix.xyz/version: v0.54.0

admissionController:
enabled: false
metrics:
serviceMonitor:
enabled: true
labels:
prometheus.io/operator: portefaix

recommender:
metrics:
serviceMonitor:
enabled: true
labels:
prometheus.io/operator: portefaix

updater:
enabled: false
metrics:
serviceMonitor:
enabled: true
labels:
prometheus.io/operator: portefaix
128 changes: 128 additions & 0 deletions gitops/argocd/charts/monitoring/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,134 @@ kube-prometheus-stack:
enabled: true
additionalLabels:
prometheus.io/operator: portefaix
rbac:
extraRules:
- apiGroups: ["autoscaling.k8s.io"]
resources: ["verticalpodautoscalers"]
verbs: ["list", "watch"]
customResourceState:
enabled: true
config:
kind: CustomResourceStateMetrics
spec:
resources:
- groupVersionKind:
group: autoscaling.k8s.io
kind: "VerticalPodAutoscaler"
version: "v1"
labelsFromPath:
verticalpodautoscaler: [metadata, name]
namespace: [metadata, namespace]
target_api_version: [spec, targetRef, apiVersion]
target_kind: [spec, targetRef, kind]
target_name: [spec, targetRef, name]
metrics:
# Labels
- name: "verticalpodautoscaler_labels"
help: "VPA container recommendations. Kubernetes labels converted to Prometheus labels"
each:
type: Info
info:
labelsFromPath:
name: [metadata, name]
# Memory Information
- name: "verticalpodautoscaler_status_recommendation_containerrecommendations_target"
help: "VPA container recommendations for memory. Target resources the VerticalPodAutoscaler recommends for the container."
each:
type: Gauge
gauge:
path: [status, recommendation, containerRecommendations]
valueFrom: [target, memory]
labelsFromPath:
container: [containerName]
commonLabels:
resource: "memory"
unit: "byte"
- name: "verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound"
help: "VPA container recommendations for memory. Minimum resources the container can use before the VerticalPodAutoscaler updater evicts it"
each:
type: Gauge
gauge:
path: [status, recommendation, containerRecommendations]
valueFrom: [lowerBound, memory]
labelsFromPath:
container: [containerName]
commonLabels:
resource: "memory"
unit: "byte"
- name: "verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound"
help: "VPA container recommendations for memory. Maximum resources the container can use before the VerticalPodAutoscaler updater evicts it"
each:
type: Gauge
gauge:
path: [status, recommendation, containerRecommendations]
valueFrom: [upperBound, memory]
labelsFromPath:
container: [containerName]
commonLabels:
resource: "memory"
unit: "byte"
- name: "verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget"
help: "VPA container recommendations for memory. Target resources the VerticalPodAutoscaler recommends for the container ignoring bounds"
each:
type: Gauge
gauge:
path: [status, recommendation, containerRecommendations]
valueFrom: [uncappedTarget, memory]
labelsFromPath:
container: [containerName]
commonLabels:
resource: "memory"
unit: "byte"
# CPU Information
- name: "verticalpodautoscaler_status_recommendation_containerrecommendations_target"
help: "VPA container recommendations for cpu. Target resources the VerticalPodAutoscaler recommends for the container."
each:
type: Gauge
gauge:
path: [status, recommendation, containerRecommendations]
valueFrom: [target, cpu]
labelsFromPath:
container: [containerName]
commonLabels:
resource: "cpu"
unit: "core"
- name: "verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound"
help: "VPA container recommendations for cpu. Minimum resources the container can use before the VerticalPodAutoscaler updater evicts it"
each:
type: Gauge
gauge:
path: [status, recommendation, containerRecommendations]
valueFrom: [lowerBound, cpu]
labelsFromPath:
container: [containerName]
commonLabels:
resource: "cpu"
unit: "core"
- name: "verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound"
help: "VPA container recommendations for cpu. Maximum resources the container can use before the VerticalPodAutoscaler updater evicts it"
each:
type: Gauge
gauge:
path: [status, recommendation, containerRecommendations]
valueFrom: [upperBound, cpu]
labelsFromPath:
container: [containerName]
commonLabels:
resource: "cpu"
unit: "core"
- name: "verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget"
help: "VPA container recommendations for cpu. Target resources the VerticalPodAutoscaler recommends for the container ignoring bounds"
each:
type: Gauge
gauge:
path: [status, recommendation, containerRecommendations]
valueFrom: [uncappedTarget, cpu]
labelsFromPath:
container: [containerName]
commonLabels:
resource: "cpu"
unit: "core"

nodeExporter:
enabled: true
Expand Down

0 comments on commit ca10c3f

Please sign in to comment.