(dev-v2.6-archive) Rebase to 50b719af447594abbae7beeb4d6458a19f8e9689

(cherry picked from commit 215afb6707)

(partially cherry picked from commit baea983d2f)
pull/1680/head
Arvind Iyengar 2021-06-07 23:14:55 -07:00
parent d5196531dc
commit 23d22a40f3
No known key found for this signature in database
GPG Key ID: A8DD9BFD6C811498
5 changed files with 84 additions and 5 deletions

View File

@ -1,6 +1,6 @@
--- charts-original/Chart.yaml
+++ charts/Chart.yaml
@@ -1,5 +1,11 @@
@@ -1,7 +1,13 @@
+annotations:
+ catalog.rancher.io/certified: rancher
+ catalog.rancher.io/namespace: cattle-monitoring-system
@ -9,7 +9,11 @@
+ catalog.cattle.io/os: linux
apiVersion: v1
-name: prometheus-adapter
-version: 2.12.1
-appVersion: v0.8.3
+name: rancher-prometheus-adapter
version: 2.12.1
appVersion: v0.8.3
+version: 2.14.0
+appVersion: v0.8.4
description: A Helm chart for k8s prometheus adapter
home: https://github.com/DirectXMan12/k8s-prometheus-adapter
keywords:

View File

@ -0,0 +1,20 @@
--- charts-original/README.md
+++ charts/README.md
@@ -118,7 +118,7 @@
rules:
resource:
cpu:
- containerQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>}[3m])) by (<<.GroupBy>>)
+ containerQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>, container!=""}[3m])) by (<<.GroupBy>>)
nodeQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>, id='/'}[3m])) by (<<.GroupBy>>)
resources:
overrides:
@@ -130,7 +130,7 @@
resource: pod
containerLabel: container
memory:
- containerQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>}) by (<<.GroupBy>>)
+ containerQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>, container!=""}) by (<<.GroupBy>>)
nodeQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>,id='/'}) by (<<.GroupBy>>)
resources:
overrides:

View File

@ -0,0 +1,12 @@
--- charts-original/templates/psp.yaml
+++ charts/templates/psp.yaml
@@ -12,6 +12,9 @@
spec:
{{- if .Values.hostNetwork.enabled }}
hostNetwork: true
+ hostPorts:
+ - min: {{ .Values.listenPort }}
+ max: {{ .Values.listenPort }}
{{- end }}
fsGroup:
rule: RunAsAny

View File

@ -0,0 +1,11 @@
--- charts-original/templates/serviceaccount.yaml
+++ charts/templates/serviceaccount.yaml
@@ -9,4 +9,8 @@
heritage: {{ .Release.Service }}
name: {{ template "k8s-prometheus-adapter.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
+{{- if .Values.serviceAccount.annotations }}
+ annotations:
+{{ toYaml .Values.serviceAccount.annotations | indent 4 }}
+{{- end }}
{{- end -}}

View File

@ -1,6 +1,6 @@
--- charts-original/values.yaml
+++ charts/values.yaml
@@ -1,8 +1,12 @@
@@ -1,9 +1,13 @@
# Default values for k8s-prometheus-adapter..
+global:
+ cattle:
@ -10,7 +10,39 @@
image:
- repository: directxman12/k8s-prometheus-adapter-amd64
- tag: v0.8.3
+ repository: rancher/mirrored-directxman12-k8s-prometheus-adapter
tag: v0.8.3
+ tag: v0.8.4
pullPolicy: IfNotPresent
logLevel: 4
@@ -39,6 +43,11 @@
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:
+ # ServiceAccount annotations.
+ # Use case: AWS EKS IAM roles for service accounts
+ # ref: https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html
+ annotations: {}
+
# Custom DNS configuration to be added to prometheus-adapter pods
dnsConfig: {}
# nameservers:
@@ -81,7 +90,7 @@
# metricsQuery: sum(<<.Series>>{<<.LabelMatchers>>}) by (<<.GroupBy>>)
resource: {}
# cpu:
-# containerQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>}[3m])) by (<<.GroupBy>>)
+# containerQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>, container!=""}[3m])) by (<<.GroupBy>>)
# nodeQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>, id='/'}[3m])) by (<<.GroupBy>>)
# resources:
# overrides:
@@ -93,7 +102,7 @@
# resource: pod
# containerLabel: container
# memory:
-# containerQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>}) by (<<.GroupBy>>)
+# containerQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>, container!=""}) by (<<.GroupBy>>)
# nodeQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>,id='/'}) by (<<.GroupBy>>)
# resources:
# overrides: