Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase Monitoring to 14.5.0 and update all dependencies #1072

Merged
merged 45 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
9b48b7a
Switch rancher-monitoring to Git-based package
Apr 1, 2021
f7b3b02
Move Monitoring dependencies to separate packages
Apr 3, 2021
0930423
Switch rancher-grafana to Git-based and add annotations
Apr 3, 2021
9a08473
Switch rancher-kube-state-metrics to Git-based and add annotations
Apr 3, 2021
7558257
Switch rancher-prometheus-adapter to Git-based and add annotations
Apr 3, 2021
9c3bdc6
Switch rancher-node-exporter to Git-based and add annotations
Apr 3, 2021
114dee3
Rebase to kube-prometheus-stack-10.0.0
Apr 1, 2021
4d52426
Update rancher-monitoring to new base kube-prometheus-stack-10.0.0
Apr 1, 2021
29c7109
Rebase to kube-prometheus-stack-11.0.0
Apr 2, 2021
4f7d2fb
Update rancher-monitoring to new base kube-prometheus-stack-11.0.0
Apr 2, 2021
341f393
Rebase to kube-prometheus-stack-12.0.0
Apr 2, 2021
ca36c52
Update rancher-monitoring to new base kube-prometheus-stack-12.0.0
Apr 2, 2021
341caf2
Rebase to kube-prometheus-stack-13.0.0
Apr 3, 2021
f475524
Update rancher-monitoring to new base kube-prometheus-stack-13.0.0
Apr 3, 2021
0a177dc
Rebase to kube-prometheus-stack-14.0.0
Apr 3, 2021
eccaecb
Update rancher-monitoring to new base kube-prometheus-stack-14.0.0
Apr 3, 2021
a149984
Rebase to kube-prometheus-stack-14.5.0
Apr 3, 2021
21d3134
Update rancher-monitoring to new base kube-prometheus-stack-14.5.0
Apr 3, 2021
6306271
fixup rancher-monitoring
Apr 5, 2021
760c6c3
Switch nginx port for Prometheus to 8081
Apr 5, 2021
5a45baf
Rebase to grafana-5.7.7
Apr 3, 2021
db11a0d
Update rancher-grafana to new base grafana-5.7.7
Apr 3, 2021
48d2053
Rebase to grafana-6.0.0
Apr 3, 2021
07e5ea8
Update rancher-grafana to new base grafana-6.0.0
Apr 3, 2021
0ec32a3
Rebase to grafana-6.6.4
Apr 4, 2021
71eb765
Update rancher-grafana to new base grafana-6.6.4
Apr 4, 2021
5f82fb9
fixup rancher-grafana
Apr 5, 2021
203fb85
Add linux annotations to image-renderer
Apr 5, 2021
3e0986f
Use default grafana serviceAccount if unavailable for image-renderer
Apr 5, 2021
30b0c5c
Rebase to kube-state-metrics-helm-chart-2.13.1
Apr 4, 2021
881a563
Update rancher-kube-state-metrics to new base kube-state-metrics-helm…
Apr 4, 2021
4965fac
fixup kube-state-metrics
Apr 5, 2021
52a0c53
Rebase to prometheus-node-exporter-1.16.2
Apr 4, 2021
590ac12
Update rancher-node-exporter to new base prometheus-node-exporter-1.16.2
Apr 4, 2021
5365b79
fixup node-exporter
Apr 5, 2021
3afd5bf
Rebase to prometheus-adapter-2.12.1
Apr 4, 2021
6fdf68d
Update rancher-prometheus-adapter to new base prometheus-adapter-2.12.1
Apr 4, 2021
fa37dfd
fixup prometheus-adapter
Apr 5, 2021
c66a415
Update CRD chart version
Apr 4, 2021
4edbcf6
Add original chart before all commits were made
Apr 4, 2021
e78eff9
Add chart after all commits were made
Apr 4, 2021
ce35c7b
Delete charts
Apr 4, 2021
98659f5
Patch the chart version to 1 and reset packageVersion to 00
Apr 7, 2021
4c99ae2
Patch CRD chart version
Apr 7, 2021
0163b5e
Merge branch 'dev-v2.5-source' into add_rebase_script
aiyengar2 Apr 7, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Leave this file empty to ensure that CI runs builds against the default configuration in values.yaml.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
dashboards:
my-provider:
my-awesome-dashboard:
# An empty but valid dashboard
json: |
{
"__inputs": [],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "6.3.5"
brendarearden marked this conversation as resolved.
Show resolved Hide resolved
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": null,
"links": [],
"panels": [],
"schemaVersion": 19,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": ["5s"]
},
"timezone": "",
"title": "Dummy Dashboard",
"uid": "IdcYQooWk",
"version": 1
}
datasource: Prometheus
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
dashboards:
my-provider:
my-awesome-dashboard:
gnetId: 10000
revision: 1
datasource: Prometheus
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: 'my-provider'
orgId: 1
folder: ''
type: file
updateIntervalSeconds: 10
disableDeletion: true
editable: true
options:
path: /var/lib/grafana/dashboards/my-provider
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
podLabels:
customLableA: Aaaaa
imageRenderer:
enabled: true
env:
RENDERING_ARGS: --disable-gpu,--window-size=1280x758
RENDERING_MODE: clustered
podLabels:
customLableB: Bbbbb
networkPolicy:
limitIngress: true
limitEgress: true
resources:
limits:
cpu: 1000m
memory: 1000Mi
requests:
cpu: 500m
memory: 50Mi
15 changes: 15 additions & 0 deletions packages/rancher-grafana/generated-changes/patch/Chart.yaml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- charts-original/Chart.yaml
+++ charts/Chart.yaml
@@ -1,5 +1,11 @@
+annotations:
+ catalog.rancher.io/certified: rancher
+ catalog.rancher.io/namespace: cattle-monitoring-system
+ catalog.rancher.io/release-name: rancher-grafana
+ catalog.cattle.io/hidden: "true"
+ catalog.cattle.io/os: linux
apiVersion: v2
-name: grafana
+name: rancher-grafana
version: 6.6.4
appVersion: 7.4.5
kubeVersion: '^1.8.0-0'
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
--- charts-original/templates/_helpers.tpl
+++ charts/templates/_helpers.tpl
@@ -1,3 +1,32 @@
+# Rancher
+{{- define "system_default_registry" -}}
+{{- if .Values.global.cattle.systemDefaultRegistry -}}
+{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}}
+{{- end -}}
+{{- end -}}
+
+# Windows Support
+
+{{/*
+Windows cluster will add default taint for linux nodes,
+add below linux tolerations to workloads could be scheduled to those linux nodes
+*/}}
+
+{{- define "linux-node-tolerations" -}}
+- key: "cattle.io/os"
+ value: "linux"
+ effect: "NoSchedule"
+ operator: "Equal"
+{{- end -}}
+
+{{- define "linux-node-selector" -}}
+{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
+beta.kubernetes.io/os: linux
+{{- else -}}
+kubernetes.io/os: linux
+{{- end -}}
+{{- end -}}
+
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--- charts-original/charts/grafana/templates/_pod.tpl
+++ charts/charts/grafana/templates/_pod.tpl
--- charts-original/templates/_pod.tpl
+++ charts/templates/_pod.tpl
@@ -1,4 +1,3 @@
-
{{- define "grafana.pod" -}}
{{- if .Values.schedulerName }}
schedulerName: "{{ .Values.schedulerName }}"
@@ -21,12 +20,13 @@
@@ -21,9 +20,9 @@
{{- if ( and .Values.persistence.enabled .Values.initChownData.enabled ) }}
- name: init-chown-data
{{- if .Values.initChownData.image.sha }}
Expand All @@ -17,11 +17,7 @@
{{- end }}
imagePullPolicy: {{ .Values.initChownData.image.pullPolicy }}
securityContext:
+ runAsNonRoot: false
runAsUser: 0
command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.runAsGroup }}", "/var/lib/grafana"]
resources:
@@ -41,9 +41,9 @@
@@ -42,9 +41,9 @@
{{- if .Values.dashboards }}
- name: download-dashboards
{{- if .Values.downloadDashboardsImage.sha }}
Expand All @@ -33,7 +29,7 @@
{{- end }}
imagePullPolicy: {{ .Values.downloadDashboardsImage.pullPolicy }}
command: ["/bin/sh"]
@@ -73,9 +73,9 @@
@@ -79,11 +78,16 @@
{{- if .Values.sidecar.datasources.enabled }}
- name: {{ template "grafana.name" . }}-sc-datasources
{{- if .Values.sidecar.image.sha }}
Expand All @@ -44,8 +40,15 @@
+ image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}"
{{- end }}
imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }}
+ {{- if .Values.sidecar.datasources.envFromSecret }}
+ envFrom:
+ - secretRef:
+ name: {{ tpl .Values.sidecar.datasources.envFromSecret . }}
+ {{- end }}
env:
@@ -108,9 +108,9 @@
- name: METHOD
value: LIST
@@ -118,9 +122,9 @@
{{- if .Values.sidecar.notifiers.enabled }}
- name: {{ template "grafana.name" . }}-sc-notifiers
{{- if .Values.sidecar.image.sha }}
Expand All @@ -57,7 +60,7 @@
{{- end }}
imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }}
env:
@@ -153,9 +153,9 @@
@@ -163,9 +167,9 @@
{{- if .Values.sidecar.dashboards.enabled }}
- name: {{ template "grafana.name" . }}-sc-dashboard
{{- if .Values.sidecar.image.sha }}
Expand All @@ -69,7 +72,7 @@
{{- end }}
imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }}
env:
@@ -187,9 +187,9 @@
@@ -205,9 +209,9 @@
{{- end}}
- name: {{ .Chart.Name }}
{{- if .Values.image.sha }}
Expand All @@ -81,7 +84,7 @@
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.command }}
@@ -285,7 +285,7 @@
@@ -307,7 +311,7 @@
{{- end }}
ports:
- name: {{ .Values.service.portName }}
Expand All @@ -90,7 +93,7 @@
protocol: TCP
- name: {{ .Values.podPortName }}
containerPort: 3000
@@ -352,17 +352,17 @@
@@ -380,17 +384,17 @@
{{- with .Values.extraContainers }}
{{ tpl . $ | indent 2 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
--- charts-original/templates/image-renderer-deployment.yaml
+++ charts/templates/image-renderer-deployment.yaml
@@ -42,6 +42,8 @@
{{- end }}
{{- if .Values.imageRenderer.serviceAccountName }}
serviceAccountName: "{{ .Values.imageRenderer.serviceAccountName }}"
+ {{- else }}
+ serviceAccountName: {{ template "grafana.serviceAccountName" . }}
{{- end }}
{{- if .Values.imageRenderer.securityContext }}
securityContext:
@@ -63,9 +65,9 @@
containers:
- name: {{ .Chart.Name }}-image-renderer
{{- if .Values.imageRenderer.image.sha }}
- image: "{{ .Values.imageRenderer.image.repository }}:{{ .Values.imageRenderer.image.tag }}@sha256:{{ .Values.imageRenderer.image.sha }}"
+ image: "{{ template "system_default_registry" . }}{{ .Values.imageRenderer.image.repository }}:{{ .Values.imageRenderer.image.tag }}@sha256:{{ .Values.imageRenderer.image.sha }}"
{{- else }}
- image: "{{ .Values.imageRenderer.image.repository }}:{{ .Values.imageRenderer.image.tag }}"
+ image: "{{ template "system_default_registry" . }}{{ .Values.imageRenderer.image.repository }}:{{ .Values.imageRenderer.image.tag }}"
{{- end }}
imagePullPolicy: {{ .Values.imageRenderer.image.pullPolicy }}
{{- if .Values.imageRenderer.command }}
@@ -97,16 +99,16 @@
resources:
{{ toYaml . | indent 12 }}
{{- end }}
- {{- with .Values.imageRenderer.nodeSelector }}
- nodeSelector:
+ nodeSelector: {{ include "linux-node-selector" . | nindent 8 }}
+ {{- if .Values.imageRenderer.nodeSelector }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.imageRenderer.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
- {{- with .Values.imageRenderer.tolerations }}
- tolerations:
+ tolerations: {{ include "linux-node-tolerations" . | nindent 8 }}
+ {{- if .Values.imageRenderer.tolerations }}
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--- charts-original/charts/grafana/templates/podsecuritypolicy.yaml
+++ charts/charts/grafana/templates/podsecuritypolicy.yaml
--- charts-original/templates/podsecuritypolicy.yaml
+++ charts/templates/podsecuritypolicy.yaml
@@ -6,13 +6,9 @@
namespace: {{ template "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
- annotations:
- seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
- seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default,runtime/default'
- seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
- {{- if .Values.rbac.pspUseAppArmor }}
- apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
Expand Down
Loading