mirror of https://git.rancher.io/charts
Merge pull request #2410 from aiyengar2/fix_upgrade_issue
Remove faulty capabilities checks from node-exporter and kube-state-metrics and fix references to 9100 portpull/2412/head
commit
bfb245c69d
Binary file not shown.
|
@ -8,16 +8,12 @@ metadata:
|
|||
rules:
|
||||
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
|
||||
{{- if semverCompare "> 1.15.0-0" $kubeTargetVersion }}
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
|
||||
- apiGroups: ['policy']
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
- apiGroups: ['extensions']
|
||||
{{- end }}
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
|
||||
resources: ['podsecuritypolicies']
|
||||
verbs: ['use']
|
||||
resourceNames:
|
||||
- {{ template "kube-state-metrics.fullname" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ template "prometheus-node-exporter.namespace" . }} -l "app.kubernetes.io/name={{ template "prometheus-node-exporter.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
echo "Visit http://127.0.0.1:9100 to use your application"
|
||||
kubectl port-forward --namespace {{ template "prometheus-node-exporter.namespace" . }} $POD_NAME 9100
|
||||
echo "Visit http://127.0.0.1:{{ .Values.service.port }} to use your application"
|
||||
kubectl port-forward --namespace {{ template "prometheus-node-exporter.namespace" . }} $POD_NAME {{ .Values.service.port }}
|
||||
{{- end }}
|
||||
|
|
|
@ -12,6 +12,6 @@ subsets:
|
|||
{{- end }}
|
||||
ports:
|
||||
- name: {{ .Values.service.portName }}
|
||||
port: 9100
|
||||
port: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
|
|
|
@ -6,7 +6,6 @@ metadata:
|
|||
name: psp-{{ template "prometheus-node-exporter.fullname" . }}
|
||||
labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }}
|
||||
rules:
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
|
||||
- apiGroups: ['extensions']
|
||||
resources: ['podsecuritypolicies']
|
||||
verbs: ['use']
|
||||
|
@ -14,4 +13,3 @@ rules:
|
|||
- {{ template "prometheus-node-exporter.fullname" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -8470,7 +8470,7 @@ entries:
|
|||
catalog.cattle.io/upstream-version: 19.0.3
|
||||
apiVersion: v2
|
||||
appVersion: 0.59.1
|
||||
created: "2023-02-09T12:09:18.068738-08:00"
|
||||
created: "2023-02-10T15:33:23.729015-08:00"
|
||||
dependencies:
|
||||
- condition: grafana.enabled
|
||||
name: grafana
|
||||
|
@ -8541,7 +8541,7 @@ entries:
|
|||
description: Collects several related Helm charts, Grafana dashboards, and Prometheus
|
||||
rules combined with documentation and scripts to provide easy to operate end-to-end
|
||||
Kubernetes cluster monitoring with Prometheus using the Prometheus Operator.
|
||||
digest: 3907fb8dd90fd0f17b116ab7acd8580a3602ea17ac34550127c6b6afab45dfd8
|
||||
digest: 655e8fe1f29979950dfe1900ad3ee2a3392dc7235e54d90e4fff79bb4e2e56b2
|
||||
home: https://github.com/prometheus-operator/kube-prometheus
|
||||
icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png
|
||||
keywords:
|
||||
|
|
|
@ -6,20 +6,3 @@
|
|||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
@@ -8,12 +8,16 @@
|
||||
rules:
|
||||
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
|
||||
{{- if semverCompare "> 1.15.0-0" $kubeTargetVersion }}
|
||||
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
|
||||
- apiGroups: ['policy']
|
||||
+{{- end }}
|
||||
{{- else }}
|
||||
- apiGroups: ['extensions']
|
||||
{{- end }}
|
||||
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
|
||||
resources: ['podsecuritypolicies']
|
||||
verbs: ['use']
|
||||
resourceNames:
|
||||
- {{ template "kube-state-metrics.fullname" . }}
|
||||
+{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- charts-original/templates/NOTES.txt
|
||||
+++ charts/templates/NOTES.txt
|
||||
@@ -10,6 +10,6 @@
|
||||
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ template "prometheus-node-exporter.namespace" . }} -l "app.kubernetes.io/name={{ template "prometheus-node-exporter.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
- echo "Visit http://127.0.0.1:9100 to use your application"
|
||||
- kubectl port-forward --namespace {{ template "prometheus-node-exporter.namespace" . }} $POD_NAME 9100
|
||||
+ echo "Visit http://127.0.0.1:{{ .Values.service.port }} to use your application"
|
||||
+ kubectl port-forward --namespace {{ template "prometheus-node-exporter.namespace" . }} $POD_NAME {{ .Values.service.port }}
|
||||
{{- end }}
|
|
@ -0,0 +1,10 @@
|
|||
--- charts-original/templates/endpoints.yaml
|
||||
+++ charts/templates/endpoints.yaml
|
||||
@@ -12,6 +12,6 @@
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: {{ .Values.service.portName }}
|
||||
- port: 9100
|
||||
+ port: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
|
@ -1,23 +1,9 @@
|
|||
--- charts-original/templates/psp-clusterrole.yaml
|
||||
+++ charts/templates/psp-clusterrole.yaml
|
||||
@@ -1,15 +1,17 @@
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- if .Values.rbac.create }}
|
||||
-{{- if .Values.rbac.pspEnabled }}
|
||||
+{{- if .Values.global.cattle.psp.enabled }}
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: psp-{{ template "prometheus-node-exporter.fullname" . }}
|
||||
labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }}
|
||||
rules:
|
||||
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
|
||||
- apiGroups: ['extensions']
|
||||
resources: ['podsecuritypolicies']
|
||||
verbs: ['use']
|
||||
resourceNames:
|
||||
- {{ template "prometheus-node-exporter.fullname" . }}
|
||||
+{{- end }}
|
||||
{{- end }}
|
||||
-{{- end }}
|
||||
+{{- end }}
|
||||
\ No newline at end of file
|
||||
|
|
Loading…
Reference in New Issue