From 71a483e3d266b2294746ed1813f97c3bd194e625 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 27 Jan 2023 11:47:36 -0800 Subject: [PATCH 01/10] [rancher-sachet] Move role+rolebinding for PSPs to psp.yaml --- .../rancher-sachet/charts/templates/psp.yaml | 30 +++++++++++++++++++ .../rancher-sachet/charts/templates/role.yaml | 17 ----------- .../charts/templates/rolebinding.yaml | 15 ---------- 3 files changed, 30 insertions(+), 32 deletions(-) delete mode 100644 packages/rancher-alerting/rancher-sachet/charts/templates/role.yaml delete mode 100644 packages/rancher-alerting/rancher-sachet/charts/templates/rolebinding.yaml diff --git a/packages/rancher-alerting/rancher-sachet/charts/templates/psp.yaml b/packages/rancher-alerting/rancher-sachet/charts/templates/psp.yaml index a474a0d32..5d6d60b36 100644 --- a/packages/rancher-alerting/rancher-sachet/charts/templates/psp.yaml +++ b/packages/rancher-alerting/rancher-sachet/charts/templates/psp.yaml @@ -28,4 +28,34 @@ spec: volumes: - 'configMap' - 'secret' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "sachet.fullname" . }}-psp + namespace: {{ include "sachet.namespace" . }} + labels: {{ include "sachet.labels" . | nindent 4 }} +rules: + - apiGroups: + - policy + resourceNames: + - {{ include "sachet.fullname" . }}-psp + resources: + - podsecuritypolicies + verbs: + - use +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "sachet.fullname" . }}-psp + namespace: {{ include "sachet.namespace" . }} + labels: {{ include "sachet.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ include "sachet.fullname" . }}-psp +subjects: + - kind: ServiceAccount + name: {{ include "sachet.fullname" . }} {{- end }} diff --git a/packages/rancher-alerting/rancher-sachet/charts/templates/role.yaml b/packages/rancher-alerting/rancher-sachet/charts/templates/role.yaml deleted file mode 100644 index 4b4296cf4..000000000 --- a/packages/rancher-alerting/rancher-sachet/charts/templates/role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ include "sachet.fullname" . }}-psp - namespace: {{ include "sachet.namespace" . }} - labels: {{ include "sachet.labels" . | nindent 4 }} -rules: - - apiGroups: - - policy - resourceNames: - - {{ include "sachet.fullname" . }}-psp - resources: - - podsecuritypolicies - verbs: - - use -{{- end }} diff --git a/packages/rancher-alerting/rancher-sachet/charts/templates/rolebinding.yaml b/packages/rancher-alerting/rancher-sachet/charts/templates/rolebinding.yaml deleted file mode 100644 index 000d7e7bd..000000000 --- a/packages/rancher-alerting/rancher-sachet/charts/templates/rolebinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ include "sachet.fullname" . }}-psp - namespace: {{ include "sachet.namespace" . }} - labels: {{ include "sachet.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ include "sachet.fullname" . }}-psp -subjects: - - kind: ServiceAccount - name: {{ include "sachet.fullname" . }} -{{- end }} From d8c28a415e26934e2e0c05ed6925bab3f2cb5c4e Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 27 Jan 2023 12:02:36 -0800 Subject: [PATCH 02/10] [rancher-sachet] Use global.cattle.psp.enabled field and bump major version --- .../rancher-alerting/rancher-sachet/charts/templates/psp.yaml | 2 +- packages/rancher-alerting/rancher-sachet/charts/values.yaml | 2 ++ packages/rancher-alerting/rancher-sachet/package.yaml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/rancher-alerting/rancher-sachet/charts/templates/psp.yaml b/packages/rancher-alerting/rancher-sachet/charts/templates/psp.yaml index 5d6d60b36..331794e3a 100644 --- a/packages/rancher-alerting/rancher-sachet/charts/templates/psp.yaml +++ b/packages/rancher-alerting/rancher-sachet/charts/templates/psp.yaml @@ -1,4 +1,4 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} +{{- if .Values.global.cattle.psp.enabled }} apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: diff --git a/packages/rancher-alerting/rancher-sachet/charts/values.yaml b/packages/rancher-alerting/rancher-sachet/charts/values.yaml index c030c6e79..c9180b143 100644 --- a/packages/rancher-alerting/rancher-sachet/charts/values.yaml +++ b/packages/rancher-alerting/rancher-sachet/charts/values.yaml @@ -4,6 +4,8 @@ global: cattle: + psp: + enabled: false systemDefaultRegistry: "" namespaceOverride: "" diff --git a/packages/rancher-alerting/rancher-sachet/package.yaml b/packages/rancher-alerting/rancher-sachet/package.yaml index 4d62795e0..d6f0ca5b6 100644 --- a/packages/rancher-alerting/rancher-sachet/package.yaml +++ b/packages/rancher-alerting/rancher-sachet/package.yaml @@ -1,3 +1,3 @@ url: local -version: 101.0.1 +version: 102.0.0 doNotRelease: true From 14fc29507779230a605451fde42fb5e909f0d393 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 27 Jan 2023 12:07:55 -0800 Subject: [PATCH 03/10] [rancher-prom2teams] Move role+rolebinding for PSPs to psp.yaml --- .../overlay/templates/psp.yaml | 30 +++++++++++++++++++ .../overlay/templates/role.yaml | 17 ----------- .../overlay/templates/rolebinding.yaml | 15 ---------- 3 files changed, 30 insertions(+), 32 deletions(-) delete mode 100644 packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/role.yaml delete mode 100644 packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/rolebinding.yaml diff --git a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/psp.yaml b/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/psp.yaml index 12295889b..e755c1e9b 100644 --- a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/psp.yaml +++ b/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/psp.yaml @@ -28,4 +28,34 @@ spec: volumes: - 'configMap' - 'secret' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "prom2teams.fullname" . }}-psp + namespace: {{ include "prom2teams.namespace" . }} + labels: {{ include "prom2teams.labels" . | nindent 4 }} +rules: + - apiGroups: + - policy + resourceNames: + - {{ include "prom2teams.fullname" . }}-psp + resources: + - podsecuritypolicies + verbs: + - use +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "prom2teams.fullname" . }}-psp + namespace: {{ include "prom2teams.namespace" . }} + labels: {{ include "prom2teams.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ include "prom2teams.fullname" . }}-psp +subjects: + - kind: ServiceAccount + name: {{ include "prom2teams.fullname" . }} {{- end }} diff --git a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/role.yaml b/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/role.yaml deleted file mode 100644 index 99ca0f990..000000000 --- a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ include "prom2teams.fullname" . }}-psp - namespace: {{ include "prom2teams.namespace" . }} - labels: {{ include "prom2teams.labels" . | nindent 4 }} -rules: - - apiGroups: - - policy - resourceNames: - - {{ include "prom2teams.fullname" . }}-psp - resources: - - podsecuritypolicies - verbs: - - use -{{- end }} diff --git a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/rolebinding.yaml b/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/rolebinding.yaml deleted file mode 100644 index d32273e0a..000000000 --- a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/rolebinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ include "prom2teams.fullname" . }}-psp - namespace: {{ include "prom2teams.namespace" . }} - labels: {{ include "prom2teams.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ include "prom2teams.fullname" . }}-psp -subjects: - - kind: ServiceAccount - name: {{ include "prom2teams.fullname" . }} -{{- end }} From c9a4aaefd3e098c67654518805b459b496076d8e Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 27 Jan 2023 12:14:12 -0800 Subject: [PATCH 04/10] [rancher-prom2teams] Use global.cattle.psp.enabled field and bump major version --- .../generated-changes/overlay/templates/psp.yaml | 2 +- .../generated-changes/patch/values.yaml.patch | 8 +++++--- packages/rancher-alerting/rancher-prom2teams/package.yaml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/psp.yaml b/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/psp.yaml index e755c1e9b..55088f8af 100644 --- a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/psp.yaml +++ b/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/psp.yaml @@ -1,4 +1,4 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} +{{- if .Values.global.cattle.psp.enabled }} apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: diff --git a/packages/rancher-alerting/rancher-prom2teams/generated-changes/patch/values.yaml.patch b/packages/rancher-alerting/rancher-prom2teams/generated-changes/patch/values.yaml.patch index 998addfa0..20a7381ee 100644 --- a/packages/rancher-alerting/rancher-prom2teams/generated-changes/patch/values.yaml.patch +++ b/packages/rancher-alerting/rancher-prom2teams/generated-changes/patch/values.yaml.patch @@ -1,11 +1,13 @@ --- charts-original/values.yaml +++ charts/values.yaml -@@ -2,9 +2,19 @@ +@@ -2,9 +2,21 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +global: + cattle: ++ psp: ++ enabled: false + systemDefaultRegistry: "" + namespaceOverride: "" + @@ -22,7 +24,7 @@ pullPolicy: IfNotPresent resources: -@@ -22,7 +32,7 @@ +@@ -22,7 +34,7 @@ prom2teams: host: 0.0.0.0 port: 8089 @@ -31,7 +33,7 @@ connectors: {} # group_alerts_by can be one of # ("name" | "description" | "instance" | "severity" | "status" | "summary" | "fingerprint" | "runbook_url") -@@ -45,3 +55,13 @@ +@@ -45,3 +57,13 @@ fsGroup: 101 # readOnlyRootFilesystem is a flag to enable readOnlyRootFilesystem for the Hazelcast security context readOnlyRootFilesystem: true diff --git a/packages/rancher-alerting/rancher-prom2teams/package.yaml b/packages/rancher-alerting/rancher-prom2teams/package.yaml index 13dd7e95b..1cfc552a7 100644 --- a/packages/rancher-alerting/rancher-prom2teams/package.yaml +++ b/packages/rancher-alerting/rancher-prom2teams/package.yaml @@ -1,5 +1,5 @@ url: https://github.com/idealista/prom2teams.git subdirectory: helm commit: d8d595292312643986f690cca5e2270eb105b59c # the commit points to the tag 4.2.0 -version: 101.0.1 +version: 102.0.0 doNotRelease: true From fb81b0ba41619c2d75b936a6cdfe5cee33deecc5 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 27 Jan 2023 12:17:38 -0800 Subject: [PATCH 05/10] [rancher-alerting-drivers] Use global.cattle.psp.enabled field and bump major version --- .../rancher-alerting-drivers/charts/templates/hardened.yaml | 4 ++-- .../rancher-alerting-drivers/charts/values.yaml | 2 ++ .../rancher-alerting/rancher-alerting-drivers/package.yaml | 2 +- release.yaml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/hardened.yaml b/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/hardened.yaml index 5a5bc247f..be1ddc12a 100644 --- a/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/hardened.yaml +++ b/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/hardened.yaml @@ -52,7 +52,7 @@ rules: - apiGroups: [""] resources: ["serviceaccounts"] verbs: ["get", "patch"] - {{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} + {{- if .Values.global.cattle.psp.enabled }} - apiGroups: ["policy"] resources: ["podsecuritypolicies"] verbs: ["use"] @@ -77,7 +77,7 @@ subjects: name: {{ include "drivers.fullname" . }}-patch-sa namespace: {{ .Release.Namespace }} --- -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} +{{- if .Values.global.cattle.psp.enabled }} apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: diff --git a/packages/rancher-alerting/rancher-alerting-drivers/charts/values.yaml b/packages/rancher-alerting/rancher-alerting-drivers/charts/values.yaml index 48b77ef94..13b1589cd 100644 --- a/packages/rancher-alerting/rancher-alerting-drivers/charts/values.yaml +++ b/packages/rancher-alerting/rancher-alerting-drivers/charts/values.yaml @@ -4,6 +4,8 @@ global: cattle: + psp: + enabled: false # the registry where all images will be pulled from systemDefaultRegistry: "" kubectl: diff --git a/packages/rancher-alerting/rancher-alerting-drivers/package.yaml b/packages/rancher-alerting/rancher-alerting-drivers/package.yaml index fb2b3008a..265d05981 100644 --- a/packages/rancher-alerting/rancher-alerting-drivers/package.yaml +++ b/packages/rancher-alerting/rancher-alerting-drivers/package.yaml @@ -1,2 +1,2 @@ url: local -version: 101.0.1 +version: 102.0.0 diff --git a/release.yaml b/release.yaml index 6794c461e..f9d075892 100644 --- a/release.yaml +++ b/release.yaml @@ -23,7 +23,7 @@ rancher-aks-operator: rancher-aks-operator-crd: - 101.0.1+up1.1.0-rc2 rancher-alerting-drivers: -- 101.0.1 +- 102.0.0 rancher-backup: - 3.0.1-rc4 rancher-backup-crd: From 5bfa7c3de381c9d5020e407a337cc93ee2bb39d5 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 27 Jan 2023 12:23:13 -0800 Subject: [PATCH 06/10] [rancher-alerting-drivers] Include validate-psp-install.yaml --- .../charts/templates/validate-psp-install.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 packages/rancher-alerting/rancher-alerting-drivers/charts/templates/validate-psp-install.yaml diff --git a/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/validate-psp-install.yaml b/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/validate-psp-install.yaml new file mode 100644 index 000000000..a30c59d3b --- /dev/null +++ b/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/validate-psp-install.yaml @@ -0,0 +1,7 @@ +#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}} +#{{- if .Values.global.cattle.psp.enabled }} +#{{- if not (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} +#{{- fail "The target cluster does not have the PodSecurityPolicy API resource. Please disable PSPs in this chart before proceeding." -}} +#{{- end }} +#{{- end }} +#{{- end }} From 485b1a05af3eda33018e8335f433b065a8f2d73a Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 27 Jan 2023 12:25:16 -0800 Subject: [PATCH 07/10] [rancher-alerting-drivers] Add global.cattle.psp.enabled to questions.yml --- .../rancher-alerting-drivers/charts/questions.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/rancher-alerting/rancher-alerting-drivers/charts/questions.yml b/packages/rancher-alerting/rancher-alerting-drivers/charts/questions.yml index 741808c23..dc9ebb596 100644 --- a/packages/rancher-alerting/rancher-alerting-drivers/charts/questions.yml +++ b/packages/rancher-alerting/rancher-alerting-drivers/charts/questions.yml @@ -2,6 +2,12 @@ categories: - monitoring namespace: cattle-monitoring-system questions: + - variable: global.cattle.psp.enabled + default: "false" + description: "Flag to enable or disable the installation of PodSecurityPolicies by this chart in the target cluster. If the cluster is running Kubernetes 1.25+, you must update this value to false." + label: "Enable PodSecurityPolicies" + type: boolean + group: "Security Settings" - variable: prom2teams.enabled default: false label: Enable Microsoft Teams From 398a62d64823f33a0a462c243f1fccd6b62788eb Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 27 Jan 2023 12:26:20 -0800 Subject: [PATCH 08/10] [rancher-alerting-drivers] Add global.cattle.psp.enabled docs to app-readme.md --- .../charts/app-readme.md | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/rancher-alerting/rancher-alerting-drivers/charts/app-readme.md b/packages/rancher-alerting/rancher-alerting-drivers/charts/app-readme.md index ea3f11801..fe228d96f 100644 --- a/packages/rancher-alerting/rancher-alerting-drivers/charts/app-readme.md +++ b/packages/rancher-alerting/rancher-alerting-drivers/charts/app-readme.md @@ -8,4 +8,22 @@ Currently, this chart supports the following Drivers: - Microsoft Teams, based on [prom2teams](https://github.com/idealista/prom2teams) - SMS, based on [Sachet](https://github.com/messagebird/sachet) -After installing rancher-alerting-drivers, please refer to the upstream documentation for each Driver for configuration options. \ No newline at end of file +After installing rancher-alerting-drivers, please refer to the upstream documentation for each Driver for configuration options. + +## Upgrading to Kubernetes v1.25+ + +Starting in Kubernetes v1.25, [Pod Security Policies](https://kubernetes.io/docs/concepts/security/pod-security-policy/) have been removed from the Kubernetes API. + +As a result, **before upgrading to Kubernetes v1.25** (or on a fresh install in a Kubernetes v1.25+ cluster), users are expected to perform an in-place upgrade of this chart with `global.cattle.psp.enabled` set to `false` if it has been previously set to `true`. +​ +> **Note:** +> In this chart release, any previous field that was associated with any PSP resources have been removed in favor of a single global field: `global.cattle.psp.enabled`. + ​ +> **Note:** +> If you upgrade your cluster to Kubernetes v1.25+ before removing PSPs via a `helm upgrade` (even if you manually clean up resources), **it will leave the Helm release in a broken state within the cluster such that further Helm operations will not work (`helm uninstall`, `helm upgrade`, etc.).** +> +> If your charts get stuck in this state, please consult the Rancher docs on how to clean up your Helm release secrets. + +Upon setting `global.cattle.psp.enabled` to false, the chart will remove any PSP resources deployed on its behalf from the cluster. This is the default setting for this chart. +​ +As a replacement for PSPs, [Pod Security Admission](https://kubernetes.io/docs/concepts/security/pod-security-admission/) should be used. Please consult the Rancher docs for more details on how to configure your chart release namespaces to work with the new Pod Security Admission and apply Pod Security Standards. \ No newline at end of file From 2384af58938b8d61fcfb3af4ac9e433fc24fd52c Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 27 Jan 2023 12:28:12 -0800 Subject: [PATCH 09/10] make remove --- .../rancher-alerting-drivers-101.0.1.tgz | Bin 8157 -> 0 bytes .../101.0.1/Chart.yaml | 27 ---- .../101.0.1/README.md | 11 -- .../101.0.1/app-readme.md | 11 -- .../101.0.1/charts/prom2teams/.helmignore | 22 --- .../101.0.1/charts/prom2teams/Chart.yaml | 10 -- .../101.0.1/charts/prom2teams/files/teams.j2 | 44 ------ .../charts/prom2teams/templates/NOTES.txt | 2 - .../charts/prom2teams/templates/_helpers.tpl | 73 ---------- .../prom2teams/templates/configmap.yaml | 39 ------ .../prom2teams/templates/deployment.yaml | 83 ------------ .../charts/prom2teams/templates/psp.yaml | 31 ----- .../charts/prom2teams/templates/role.yaml | 17 --- .../prom2teams/templates/rolebinding.yaml | 15 --- .../prom2teams/templates/service-account.yaml | 6 - .../charts/prom2teams/templates/service.yaml | 17 --- .../101.0.1/charts/prom2teams/values.yaml | 67 ---------- .../101.0.1/charts/sachet/.helmignore | 23 ---- .../101.0.1/charts/sachet/Chart.yaml | 11 -- .../101.0.1/charts/sachet/files/template.tmpl | 1 - .../101.0.1/charts/sachet/templates/NOTES.txt | 3 - .../charts/sachet/templates/_helpers.tpl | 79 ----------- .../templates/configmap-pre-install.yaml | 34 ----- .../charts/sachet/templates/deployment.yaml | 75 ----------- .../101.0.1/charts/sachet/templates/psp.yaml | 31 ----- .../101.0.1/charts/sachet/templates/role.yaml | 17 --- .../charts/sachet/templates/rolebinding.yaml | 15 --- .../sachet/templates/service-account.yaml | 6 - .../charts/sachet/templates/service.yaml | 17 --- .../101.0.1/charts/sachet/values.yaml | 67 ---------- .../101.0.1/questions.yml | 14 -- .../101.0.1/templates/NOTES.txt | 2 - .../101.0.1/templates/_helpers.tpl | 117 ---------------- .../101.0.1/templates/cluster-role.yaml | 50 ------- .../101.0.1/templates/hardened.yaml | 126 ------------------ .../101.0.1/values.yaml | 27 ---- index.yaml | 32 ----- 37 files changed, 1222 deletions(-) delete mode 100644 assets/rancher-alerting-drivers/rancher-alerting-drivers-101.0.1.tgz delete mode 100644 charts/rancher-alerting-drivers/101.0.1/Chart.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/README.md delete mode 100644 charts/rancher-alerting-drivers/101.0.1/app-readme.md delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/.helmignore delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/Chart.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/files/teams.j2 delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/NOTES.txt delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/_helpers.tpl delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/configmap.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/deployment.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/psp.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/role.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/rolebinding.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/service-account.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/service.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/values.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/.helmignore delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/Chart.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/files/template.tmpl delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/NOTES.txt delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/_helpers.tpl delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/configmap-pre-install.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/deployment.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/psp.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/role.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/rolebinding.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/service-account.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/service.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/charts/sachet/values.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/questions.yml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/templates/NOTES.txt delete mode 100644 charts/rancher-alerting-drivers/101.0.1/templates/_helpers.tpl delete mode 100644 charts/rancher-alerting-drivers/101.0.1/templates/cluster-role.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/templates/hardened.yaml delete mode 100644 charts/rancher-alerting-drivers/101.0.1/values.yaml diff --git a/assets/rancher-alerting-drivers/rancher-alerting-drivers-101.0.1.tgz b/assets/rancher-alerting-drivers/rancher-alerting-drivers-101.0.1.tgz deleted file mode 100644 index ed1e4b8b7d4f8aff939d4cc6132083b6cbede499..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8157 zcmV<3A0pr%iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8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N_U=Gf1T?u*RvV_K|Qu`7%s109#SbF|n68rbr z;`x7n?{EhH;c#>RYdzr+@PC`8!DT1dRi@2H!~Cr)b#_%ZqwnS;_Rb=smkz-Vn7z`; z_GI4Fkeg&KSmu))WLUTj1D5uuf9id%#O-J~I!WTfI0 z(u}%TgIrpZy4(^zj?7w(Q^i*pWElBm#WG~xX`4dkVOX0$)mV6$)m0&DB3(P0oRMNikP089$He`u zMH4QgaHn2!%2PNCUyGEKodBD~rIKzbxvAuB5+KCJGXo**R>vpob>~*vCr%BrxdYBE z9;%goh{c5Zug|OS-bNCA<;C%+k6-td_grnVgaxnDi*vpHq1$!4Zg0?hJzfp{)ERQw zA>LTAd1HJ5g8!^QvRrmk;`@0+bx3z??8vk|P z1h9_X#mB^aomZDN;=NYGO7g!1_Up4Y^1nax{lD(!`@ic6-va*YldFM8#(ZtA&&qhO z^-I_mdSPk#UlRNES)2Pmht>Q4dj}i;pY?=?z4?)i}mk2>J@eDRS{l7By@3S`ePrFt9-|Oz}ZuI{;!Uq3$A^xvR85#dwVSro8e}?_5tw34P zN8JDI&EUWF_xqdu-?fCtLM0M7z+;9&H8j43fxiixunC*+ornJk00960`Nji50Qvv` D#?CDC diff --git a/charts/rancher-alerting-drivers/101.0.1/Chart.yaml b/charts/rancher-alerting-drivers/101.0.1/Chart.yaml deleted file mode 100644 index 67903c067..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/Chart.yaml +++ /dev/null @@ -1,27 +0,0 @@ -annotations: - catalog.cattle.io/certified: rancher - catalog.cattle.io/display-name: Alerting Drivers - catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.26.0-0' - catalog.cattle.io/os: linux - catalog.cattle.io/permits-os: linux,windows - catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' - catalog.cattle.io/release-name: rancher-alerting-drivers - catalog.cattle.io/type: cluster-tool - catalog.cattle.io/upstream-version: 100.0.1 -apiVersion: v2 -appVersion: 1.16.0 -dependencies: -- condition: prom2teams.enabled - name: prom2teams - repository: file://./charts/prom2teams -- condition: sachet.enabled - name: sachet - repository: file://./charts/sachet -description: The manager for third-party webhook receivers used in Prometheus Alertmanager -icon: https://charts.rancher.io/assets/logos/alerting-drivers.svg -keywords: -- monitoring -- alertmanger -- webhook -name: rancher-alerting-drivers -version: 101.0.1 diff --git a/charts/rancher-alerting-drivers/101.0.1/README.md b/charts/rancher-alerting-drivers/101.0.1/README.md deleted file mode 100644 index ea3f11801..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Rancher Alerting Drivers - -This chart installs one or more [Alertmanager Webhook Receiver Integrations](https://prometheus.io/docs/operating/integrations/#alertmanager-webhook-receiver) (i.e. Drivers). - -Those Drivers can be targeted by an existing deployment of Alertmanager to send alerts to notification mechanisms that are not natively supported. - -Currently, this chart supports the following Drivers: -- Microsoft Teams, based on [prom2teams](https://github.com/idealista/prom2teams) -- SMS, based on [Sachet](https://github.com/messagebird/sachet) - -After installing rancher-alerting-drivers, please refer to the upstream documentation for each Driver for configuration options. \ No newline at end of file diff --git a/charts/rancher-alerting-drivers/101.0.1/app-readme.md b/charts/rancher-alerting-drivers/101.0.1/app-readme.md deleted file mode 100644 index ea3f11801..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/app-readme.md +++ /dev/null @@ -1,11 +0,0 @@ -# Rancher Alerting Drivers - -This chart installs one or more [Alertmanager Webhook Receiver Integrations](https://prometheus.io/docs/operating/integrations/#alertmanager-webhook-receiver) (i.e. Drivers). - -Those Drivers can be targeted by an existing deployment of Alertmanager to send alerts to notification mechanisms that are not natively supported. - -Currently, this chart supports the following Drivers: -- Microsoft Teams, based on [prom2teams](https://github.com/idealista/prom2teams) -- SMS, based on [Sachet](https://github.com/messagebird/sachet) - -After installing rancher-alerting-drivers, please refer to the upstream documentation for each Driver for configuration options. \ No newline at end of file diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/.helmignore b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/.helmignore deleted file mode 100644 index 50af03172..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/Chart.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/Chart.yaml deleted file mode 100644 index 1e0a686e8..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/Chart.yaml +++ /dev/null @@ -1,10 +0,0 @@ -annotations: - catalog.cattle.io/certified: rancher - catalog.cattle.io/hidden: "true" - catalog.cattle.io/os: linux - catalog.cattle.io/release-name: rancher-prom2teams -apiVersion: v1 -appVersion: 4.2.0 -description: A Helm chart for Prom2Teams based on the upstream https://github.com/idealista/prom2teams -name: prom2teams -version: 0.2.0 diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/files/teams.j2 b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/files/teams.j2 deleted file mode 100644 index f1cf61d4e..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/files/teams.j2 +++ /dev/null @@ -1,44 +0,0 @@ -{%- set - theme_colors = { - 'resolved' : '2DC72D', - 'critical' : '8C1A1A', - 'severe' : '8C1A1A', - 'warning' : 'FF9A0B', - 'unknown' : 'CCCCCC' - } --%} - -{ - "@type": "MessageCard", - "@context": "http://schema.org/extensions", - "themeColor": "{% if status=='resolved' %} {{ theme_colors.resolved }} {% else %} {{ theme_colors[msg_text.severity] }} {% endif %}", - "summary": "{% if status=='resolved' %}(Resolved) {% endif %}{{ msg_text.summary }}", - "title": "Prometheus alert {% if status=='resolved' %}(Resolved) {% elif status=='unknown' %} (status unknown) {% endif %}", - "sections": [{ - "activityTitle": "{{ msg_text.summary }}", - "facts": [{% if msg_text.name %}{ - "name": "Alert", - "value": "{{ msg_text.name }}" - },{% endif %}{% if msg_text.instance %}{ - "name": "In host", - "value": "{{ msg_text.instance }}" - },{% endif %}{% if msg_text.severity %}{ - "name": "Severity", - "value": "{{ msg_text.severity }}" - },{% endif %}{% if msg_text.description %}{ - "name": "Description", - "value": "{{ msg_text.description }}" - },{% endif %}{ - "name": "Status", - "value": "{{ msg_text.status }}" - }{% if msg_text.extra_labels %}{% for key in msg_text.extra_labels %},{ - "name": "{{ key }}", - "value": "{{ msg_text.extra_labels[key] }}" - }{% endfor %}{% endif %} - {% if msg_text.extra_annotations %}{% for key in msg_text.extra_annotations %},{ - "name": "{{ key }}", - "value": "{{ msg_text.extra_annotations[key] }}" - }{% endfor %}{% endif %}], - "markdown": true - }] -} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/NOTES.txt b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/NOTES.txt deleted file mode 100644 index a94c4132b..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -Prom2Teams has been installed. Check its status by running: - kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}" diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/_helpers.tpl b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/_helpers.tpl deleted file mode 100644 index ffc0fa356..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/_helpers.tpl +++ /dev/null @@ -1,73 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{- define "system_default_registry" -}} -{{- if .Values.global.cattle.systemDefaultRegistry -}} -{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} -{{- end -}} -{{- end -}} - -{{/* -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 -}} - -{{/* -Expand the name of the chart. -*/}} -{{- define "prom2teams.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "prom2teams.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Allow the release namespace to be overridden for multi-namespace deployments in combined charts -*/}} -{{- define "prom2teams.namespace" -}} -{{ default .Release.Namespace .Values.global.namespaceOverride }} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "prom2teams.labels" -}} -app.kubernetes.io/name: {{ include "prom2teams.name" . }} -helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -app.kubernetes.io/instance: {{ .Release.Name }} -release: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/configmap.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/configmap.yaml deleted file mode 100644 index ccf38953e..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/configmap.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- $valid := list "DEBUG" "INFO" "WARNING" "ERROR" "CRITICAL" -}} -{{- if not (has .Values.prom2teams.loglevel $valid) -}} -{{- fail "Invalid log level"}} -{{- end -}} -{{- if and .Values.prom2teams.connector (hasKey .Values.prom2teams.connectors "Connector") -}} -{{- fail "Invalid configuration: prom2teams.connectors can't have a connector named Connector when prom2teams.connector is set"}} -{{- end -}} -{{/* Create the configmap when the operation is helm install and the target configmap does not exist. */}} -{{- if not (lookup "v1" "ConfigMap" (include "prom2teams.namespace" . ) (include "prom2teams.fullname" .)) }} -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: {{ include "prom2teams.namespace" . }} - name: {{ include "prom2teams.fullname" . }} - labels: {{ include "prom2teams.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-install, pre-upgrade - "helm.sh/hook-weight": "3" - "helm.sh/resource-policy": keep -data: - config.ini: |- - [HTTP Server] - Host: {{ .Values.prom2teams.host }} - Port: {{ .Values.prom2teams.port }} - [Microsoft Teams] - {{- with .Values.prom2teams.connector }} - Connector: {{ . }} - {{- end }} - {{- range $key, $val := .Values.prom2teams.connectors }} - {{ $key }}: {{ $val }} - {{- end }} - [Group Alerts] - Field: {{ .Values.prom2teams.group_alerts_by }} - [Log] - Level: {{ .Values.prom2teams.loglevel }} - [Template] - Path: {{ .Values.prom2teams.templatepath }} - teams.j2: {{ .Files.Get "files/teams.j2" | quote }} - {{- end -}} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/deployment.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/deployment.yaml deleted file mode 100644 index 34f7d0f46..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/deployment.yaml +++ /dev/null @@ -1,83 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "prom2teams.fullname" . }} - namespace: {{ include "prom2teams.namespace" . }} - labels: {{ include "prom2teams.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app.kubernetes.io/name: {{ include "prom2teams.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - template: - metadata: - labels: - app.kubernetes.io/name: {{ include "prom2teams.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - spec: - serviceAccountName: {{ include "prom2teams.fullname" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: {{ toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - configMap: - name: {{ include "prom2teams.fullname" . }} - containers: - - name: {{ .Chart.Name }} - image: {{ include "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 8089 - protocol: TCP - volumeMounts: - - name: config - mountPath: /opt/prom2teams/helmconfig/ - env: - - name: APP_CONFIG_FILE - value: {{ .Values.prom2teams.config | quote }} - - name: PROM2TEAMS_PORT - value: {{ .Values.prom2teams.port | quote }} - - name: PROM2TEAMS_HOST - value: {{ .Values.prom2teams.host | quote }} - - name: PROM2TEAMS_CONNECTOR - value: {{ .Values.prom2teams.connector | quote }} - - name: PROM2TEAMS_GROUP_ALERTS_BY - value: {{ .Values.prom2teams.group_alerts_by | quote }} - - name: PROM2TEAMS_LOGLEVEL - value: {{ .Values.prom2teams.loglevel }} - {{- range $key, $value := .Values.prom2teams.extraEnv }} - - name: "{{ $key }}" - value: "{{ $value }}" - {{- end }} - resources: {{ toYaml .Values.resources | nindent 12 }} - {{- if .Values.securityContext.enabled }} - securityContext: - privileged: false - readOnlyRootFilesystem: false - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - {{- end }} - nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} - {{- if .Values.nodeSelector }} - {{- toYaml .Values.nodeSelector | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} - {{- if .Values.tolerations }} - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- if .Values.securityContext.enabled }} - securityContext: - runAsNonRoot: {{ if eq (int .Values.securityContext.runAsUser) 0 }}false{{ else }}true{{ end }} - runAsUser: {{ .Values.securityContext.runAsUser }} - runAsGroup: {{ .Values.securityContext.runAsGroup }} - fsGroup: {{ .Values.securityContext.fsGroup }} - {{- end }} - diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/psp.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/psp.yaml deleted file mode 100644 index 12295889b..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/psp.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ include "prom2teams.fullname" . }}-psp - labels: {{ include "prom2teams.labels" . | nindent 4 }} -spec: - privileged: false - allowPrivilegeEscalation: false - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'MustRunAsNonRoot' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - readOnlyRootFilesystem: false - volumes: - - 'configMap' - - 'secret' -{{- end }} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/role.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/role.yaml deleted file mode 100644 index 99ca0f990..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ include "prom2teams.fullname" . }}-psp - namespace: {{ include "prom2teams.namespace" . }} - labels: {{ include "prom2teams.labels" . | nindent 4 }} -rules: - - apiGroups: - - policy - resourceNames: - - {{ include "prom2teams.fullname" . }}-psp - resources: - - podsecuritypolicies - verbs: - - use -{{- end }} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/rolebinding.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/rolebinding.yaml deleted file mode 100644 index d32273e0a..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/rolebinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ include "prom2teams.fullname" . }}-psp - namespace: {{ include "prom2teams.namespace" . }} - labels: {{ include "prom2teams.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ include "prom2teams.fullname" . }}-psp -subjects: - - kind: ServiceAccount - name: {{ include "prom2teams.fullname" . }} -{{- end }} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/service-account.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/service-account.yaml deleted file mode 100644 index a9572c5cd..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/service-account.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "prom2teams.fullname" . }} - namespace: {{ include "prom2teams.namespace" . }} - labels: {{ include "prom2teams.labels" . | nindent 4 }} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/service.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/service.yaml deleted file mode 100644 index cc95cad35..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/templates/service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "prom2teams.fullname" . }} - namespace: {{ include "prom2teams.namespace" . }} - labels: -{{ include "prom2teams.labels" . | indent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: 8089 - protocol: TCP - name: http - selector: - app.kubernetes.io/name: {{ include "prom2teams.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/values.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/values.yaml deleted file mode 100644 index 1f21cca1a..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/prom2teams/values.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# Default values for prom2teams. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -global: - cattle: - systemDefaultRegistry: "" - namespaceOverride: "" - -nameOverride: "prom2teams" -fullnameOverride: "" - -replicaCount: 1 - -image: - repository: rancher/mirrored-idealista-prom2teams - tag: 4.2.0 - pullPolicy: IfNotPresent - -resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 200m - memory: 200Mi - -service: - type: ClusterIP - port: 8089 - -prom2teams: - host: 0.0.0.0 - port: 8089 - connector: the-connector-url - connectors: {} - # group_alerts_by can be one of - # ("name" | "description" | "instance" | "severity" | "status" | "summary" | "fingerprint" | "runbook_url") - group_alerts_by: - # loglevel can be one of (DEBUG | INFO | WARNING | ERROR | CRITICAL) - loglevel: INFO - templatepath: /opt/prom2teams/helmconfig/teams.j2 - config: /opt/prom2teams/helmconfig/config.ini - extraEnv: {} - -# Security Context properties -securityContext: - # enabled is a flag to enable Security Context - enabled: true - # runAsUser is the user ID used to run the container - runAsUser: 101 - # runAsGroup is the primary group ID used to run all processes within any container of the pod - runAsGroup: 101 - # fsGroup is the group ID associated with the container - fsGroup: 101 - # readOnlyRootFilesystem is a flag to enable readOnlyRootFilesystem for the Hazelcast security context - readOnlyRootFilesystem: true - -## Node labels for pod assignment -## Ref: https://kubernetes.io/docs/user-guide/node-selection/ -## -nodeSelector: {} - -## List of node taints to tolerate (requires Kubernetes >= 1.6) -tolerations: [] - -affinity: {} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/.helmignore b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/Chart.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/Chart.yaml deleted file mode 100644 index dd0d706a6..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -annotations: - catalog.cattle.io/certified: rancher - catalog.cattle.io/hidden: "true" - catalog.cattle.io/os: linux - catalog.cattle.io/release-name: rancher-sachet -apiVersion: v2 -appVersion: 0.3.1 -description: A Helm chart for Sachet based on the upstream https://github.com/messagebird/sachet -name: sachet -type: application -version: 1.0.1 diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/files/template.tmpl b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/files/template.tmpl deleted file mode 100644 index 08f24e138..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/files/template.tmpl +++ /dev/null @@ -1 +0,0 @@ -# reference: https://github.com/messagebird/sachet/blob/master/examples/telegram.tmpl diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/NOTES.txt b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/NOTES.txt deleted file mode 100644 index 247a91fc1..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -rancher-sachet is now installed on the cluster! -Please refer to the upstream documentation for configuration options: -https://github.com/messagebird/sachet diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/_helpers.tpl b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/_helpers.tpl deleted file mode 100644 index eaa61fee5..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/_helpers.tpl +++ /dev/null @@ -1,79 +0,0 @@ -{{- define "system_default_registry" -}} -{{- if .Values.global.cattle.systemDefaultRegistry -}} -{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} -{{- end -}} -{{- end -}} - -{{/* -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 -}} - -{{/* -Allow the release namespace to be overridden for multi-namespace deployments in combined charts -*/}} -{{- define "sachet.namespace" -}} -{{ default .Release.Namespace .Values.global.namespaceOverride }} -{{- end }} - -{{/* -Expand the name of the chart. -*/}} -{{- define "sachet.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "sachet.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "sachet.labels" -}} -helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{ include "sachet.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "sachet.selectorLabels" -}} -app.kubernetes.io/name: {{ include "sachet.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - - diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/configmap-pre-install.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/configmap-pre-install.yaml deleted file mode 100644 index e8c63ac03..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/configmap-pre-install.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{/*This file is applied when the operation is helm install and the target confimap does not exist. */}} -{{- if not (lookup "v1" "ConfigMap" (include "sachet.namespace" . ) (include "sachet.fullname" .)) }} -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: {{ include "sachet.namespace" . }} - name: {{ include "sachet.fullname" . }} - labels: {{ include "sachet.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-install, pre-upgrade - "helm.sh/hook-weight": "3" - "helm.sh/resource-policy": keep -data: - config.yaml: |- - {{- if and (not .Values.sachet.providers) (not .Values.sachet.receivers) }} - # please refer to the upstream documentation for configuration options: - # https://github.com/messagebird/sachet - # - # providers: - # aliyun: - # region_id: - # ... - # receivers: - # - name: 'team-sms' - # provider: 'aliyu' - # ... - {{- end }} - {{- with .Values.sachet.providers }} - providers: {{ toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.sachet.receivers }} - receivers: {{ toYaml . | nindent 6 }} - {{- end }} -{{- end }} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/deployment.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/deployment.yaml deleted file mode 100644 index 17215eebd..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/deployment.yaml +++ /dev/null @@ -1,75 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "sachet.fullname" . }} - namespace: {{ include "sachet.namespace" . }} - labels: {{ include "sachet.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: {{ include "sachet.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: {{ toYaml . | nindent 8 }} - {{- end }} - labels: {{ include "sachet.selectorLabels" . | nindent 8 }} - spec: - nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} - {{- if .Values.nodeSelector }} - {{- toYaml .Values.nodeSelector | nindent 8 }} - {{- end }} - tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} - {{- if .Values.tolerations }} - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: {{ toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "sachet.fullname" . }} - {{- with .Values.podSecurityContext }} - securityContext: {{ toYaml .Values.podSecurityContext | nindent 8 }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - securityContext: {{ toYaml .Values.securityContext | nindent 12 }} - image: {{ include "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 9876 - protocol: TCP - livenessProbe: - httpGet: - path: /-/live - port: http - readinessProbe: - httpGet: - path: /-/ready - port: http - volumeMounts: - - mountPath: /etc/sachet/ - name: config-volume - {{- with .Values.resources }} - resources: {{ toYaml .Values.resources | nindent 12 }} - {{- end }} - - name: config-reloader - securityContext: {{ toYaml .Values.securityContext | nindent 12 }} - image: {{ include "system_default_registry" . }}{{ .Values.configReloader.repository }}:{{ .Values.configReloader.tag }} - imagePullPolicy: {{ .Values.configReloader.pullPolicy }} - args: - - -volume-dir=/watch-config - - -webhook-method=POST - - -webhook-status-code=200 - - -webhook-url=http://127.0.0.1:{{ .Values.service.port }}/-/reload - volumeMounts: - - mountPath: /watch-config - name: config-volume - volumes: - - name: config-volume - configMap: - name: {{ include "sachet.fullname" . }} - defaultMode: 0777 diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/psp.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/psp.yaml deleted file mode 100644 index a474a0d32..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/psp.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ include "sachet.fullname" . }}-psp - labels: {{ include "sachet.labels" . | nindent 4 }} -spec: - privileged: false - allowPrivilegeEscalation: false - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'MustRunAsNonRoot' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - readOnlyRootFilesystem: false - volumes: - - 'configMap' - - 'secret' -{{- end }} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/role.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/role.yaml deleted file mode 100644 index 4b4296cf4..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ include "sachet.fullname" . }}-psp - namespace: {{ include "sachet.namespace" . }} - labels: {{ include "sachet.labels" . | nindent 4 }} -rules: - - apiGroups: - - policy - resourceNames: - - {{ include "sachet.fullname" . }}-psp - resources: - - podsecuritypolicies - verbs: - - use -{{- end }} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/rolebinding.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/rolebinding.yaml deleted file mode 100644 index 000d7e7bd..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/rolebinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ include "sachet.fullname" . }}-psp - namespace: {{ include "sachet.namespace" . }} - labels: {{ include "sachet.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ include "sachet.fullname" . }}-psp -subjects: - - kind: ServiceAccount - name: {{ include "sachet.fullname" . }} -{{- end }} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/service-account.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/service-account.yaml deleted file mode 100644 index 8833f1b3b..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/service-account.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "sachet.fullname" . }} - namespace: {{ include "sachet.namespace" . }} - labels: {{ include "sachet.labels" . | nindent 4 }} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/service.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/service.yaml deleted file mode 100644 index 216e8322c..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/templates/service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "sachet.fullname" . }} - namespace: {{ include "sachet.namespace" . }} - labels: {{ include "sachet.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - {{- if contains "NodePort" .Values.service.type }} - nodePort: {{ .Values.service.nodePort }} - {{- end }} - selector: {{ include "sachet.selectorLabels" . | nindent 4 }} diff --git a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/values.yaml b/charts/rancher-alerting-drivers/101.0.1/charts/sachet/values.yaml deleted file mode 100644 index c030c6e79..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/charts/sachet/values.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# Default values for sachet. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -global: - cattle: - systemDefaultRegistry: "" - namespaceOverride: "" - -nameOverride: "sachet" -fullnameOverride: "" - -configReloader: - repository: rancher/mirrored-jimmidyson-configmap-reload - pullPolicy: IfNotPresent - tag: v0.8.0 - -sachet: - # reference: https://github.com/messagebird/sachet/blob/master/examples/config.yaml - providers: {} - - receivers: [] - -replicaCount: 1 - -image: - repository: rancher/mirrored-messagebird-sachet - pullPolicy: IfNotPresent - tag: 0.3.1 - -imagePullSecrets: [] - -podAnnotations: {} - -podSecurityContext: - -securityContext: - runAsUser: 1000 - runAsNonRoot: true - runAsGroup: 1000 - -service: - type: ClusterIP - port: 9876 - nodePort: 30001 - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -## Node labels for pod assignment -## Ref: https://kubernetes.io/docs/user-guide/node-selection/ -## -nodeSelector: {} - -## List of node taints to tolerate (requires Kubernetes >= 1.6) -tolerations: [] - -affinity: {} diff --git a/charts/rancher-alerting-drivers/101.0.1/questions.yml b/charts/rancher-alerting-drivers/101.0.1/questions.yml deleted file mode 100644 index 741808c23..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/questions.yml +++ /dev/null @@ -1,14 +0,0 @@ -categories: - - monitoring -namespace: cattle-monitoring-system -questions: - - variable: prom2teams.enabled - default: false - label: Enable Microsoft Teams - type: boolean - group: "General" - - variable: sachet.enabled - default: false - label: Enable SMS - type: boolean - group: "General" diff --git a/charts/rancher-alerting-drivers/101.0.1/templates/NOTES.txt b/charts/rancher-alerting-drivers/101.0.1/templates/NOTES.txt deleted file mode 100644 index 59c1415e0..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -rancher-alerting-drivers is now installed on the cluster! -Please refer to the upstream documentation for each Driver for configuration options. \ No newline at end of file diff --git a/charts/rancher-alerting-drivers/101.0.1/templates/_helpers.tpl b/charts/rancher-alerting-drivers/101.0.1/templates/_helpers.tpl deleted file mode 100644 index e1dbe3370..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/templates/_helpers.tpl +++ /dev/null @@ -1,117 +0,0 @@ -{{- define "system_default_registry" -}} -{{- if .Values.global.cattle.systemDefaultRegistry -}} -{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} -{{- end -}} -{{- end -}} - -{{/* -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 -}} - -{{/* -Expand the name of the chart. -*/}} -{{- define "drivers.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "drivers.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "drivers.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "drivers.labels" -}} -helm.sh/chart: {{ include "drivers.chart" . }} -{{ include "drivers.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "drivers.selectorLabels" -}} -app.kubernetes.io/name: {{ include "drivers.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "drivers.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "drivers.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} - -{{/* -https://github.com/helm/helm/issues/4535#issuecomment-477778391 -Usage: {{ include "call-nested" (list . "SUBCHART_NAME" "TEMPLATE") }} -e.g. {{ include "call-nested" (list . "grafana" "grafana.fullname") }} -*/}} -{{- define "call-nested" }} -{{- $dot := index . 0 }} -{{- $subchart := index . 1 | splitList "." }} -{{- $template := index . 2 }} -{{- $values := $dot.Values }} -{{- range $subchart }} -{{- $values = index $values . }} -{{- end }} -{{- include $template (dict "Chart" (dict "Name" (last $subchart)) "Values" $values "Release" $dot.Release "Capabilities" $dot.Capabilities) }} -{{- end }} - - -{{/* -Get the list of configMaps to be managed -*/}} -{{- define "drivers.configmapList" -}} -{{- if .Values.sachet.enabled -}} -- {{ include "call-nested" (list . "sachet" "sachet.fullname") }} -{{- end }} -{{- if .Values.prom2teams.enabled -}} -- {{ include "call-nested" (list . "prom2teams" "prom2teams.fullname") }} -{{- end }} -{{- end }} diff --git a/charts/rancher-alerting-drivers/101.0.1/templates/cluster-role.yaml b/charts/rancher-alerting-drivers/101.0.1/templates/cluster-role.yaml deleted file mode 100644 index e3022a7ca..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/templates/cluster-role.yaml +++ /dev/null @@ -1,50 +0,0 @@ -{{- if and (not .Values.sachet.enabled) (not .Values.prom2teams.enabled) -}} -{{- fail "At least one Driver must be enabled to install the chart. " }} -{{- end -}} - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "drivers.fullname" . }}-admin - labels: {{ include "drivers.labels" . | nindent 4 }} - rbac.authorization.k8s.io/aggregate-to-admin: "true" -rules: - - apiGroups: - - "" - resources: - - configmaps - resourceNames: {{ include "drivers.configmapList" . | nindent 6 }} - verbs: - - "*" ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "drivers.fullname" . }}-edit - labels: {{ include "drivers.labels" . | nindent 4 }} - rbac.authorization.k8s.io/aggregate-to-edit: "true" -rules: - - apiGroups: - - "" - resources: - - configmaps - resourceNames: {{ include "drivers.configmapList" . | nindent 6 }} - verbs: - - "*" ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "drivers.fullname" . }}-view - labels: {{ include "drivers.labels" . | nindent 4 }} - rbac.authorization.k8s.io/aggregate-to-view: "true" -rules: - - apiGroups: - - "" - resources: - - configmaps - resourceNames: {{ include "drivers.configmapList" . | nindent 6 }} - verbs: - - 'get' - - 'list' - - 'watch' diff --git a/charts/rancher-alerting-drivers/101.0.1/templates/hardened.yaml b/charts/rancher-alerting-drivers/101.0.1/templates/hardened.yaml deleted file mode 100644 index 5a5bc247f..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/templates/hardened.yaml +++ /dev/null @@ -1,126 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "drivers.fullname" . }}-patch-sa - namespace: {{ .Release.Namespace }} - labels: {{ include "drivers.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": post-install, post-upgrade - "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation -spec: - backoffLimit: 1 - template: - spec: - serviceAccountName: {{ include "drivers.fullname" . }}-patch-sa - securityContext: - runAsNonRoot: true - runAsUser: 1000 - restartPolicy: Never - nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} -{{- if .Values.nodeSelector }} -{{ toYaml .Values.nodeSelector | indent 8 }} -{{- end }} - tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} -{{- if .Values.tolerations }} -{{ toYaml .Values.tolerations | indent 8 }} -{{- end }} - containers: - - name: {{ include "drivers.fullname" . }}-patch-sa - image: "{{ include "system_default_registry" . }}{{ .Values.global.kubectl.repository }}:{{ .Values.global.kubectl.tag }}" - imagePullPolicy: IfNotPresent - command: ["kubectl", "-n", {{ .Release.Namespace | quote }}, "patch", "serviceaccount", "default", "-p", "{\"automountServiceAccountToken\": false}"] ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "drivers.fullname" . }}-patch-sa - namespace: {{ .Release.Namespace }} - labels: {{ include "drivers.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": post-install, post-upgrade - "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "drivers.fullname" . }}-patch-sa - labels: {{ include "drivers.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": post-install, post-upgrade - "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation -rules: - - apiGroups: [""] - resources: ["serviceaccounts"] - verbs: ["get", "patch"] - {{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} - - apiGroups: ["policy"] - resources: ["podsecuritypolicies"] - verbs: ["use"] - resourceNames: - - {{ include "drivers.fullname" . }}-patch-sa - {{- end }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "drivers.fullname" . }}-patch-sa - labels: {{ include "drivers.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": post-install, post-upgrade - "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ include "drivers.fullname" . }}-patch-sa -subjects: - - kind: ServiceAccount - name: {{ include "drivers.fullname" . }}-patch-sa - namespace: {{ .Release.Namespace }} ---- -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ include "drivers.fullname" . }}-patch-sa - labels: {{ include "drivers.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": post-install, post-upgrade - "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation -spec: - privileged: false - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'MustRunAsNonRoot' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - readOnlyRootFilesystem: false - volumes: - - 'secret' -{{- end }} ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ include "drivers.fullname" . }}-default-allow-all - namespace: {{ .Release.Namespace }} -spec: - podSelector: {} - ingress: - - {} - egress: - - {} - policyTypes: - - Ingress - - Egress diff --git a/charts/rancher-alerting-drivers/101.0.1/values.yaml b/charts/rancher-alerting-drivers/101.0.1/values.yaml deleted file mode 100644 index 48b77ef94..000000000 --- a/charts/rancher-alerting-drivers/101.0.1/values.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Default values for rancher-alerting-driver. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -global: - cattle: - # the registry where all images will be pulled from - systemDefaultRegistry: "" - kubectl: - repository: rancher/kubectl - tag: v1.20.2 - # set this value if you want the sub-charts to be installed into - # a namespace rather than where this chart is installed - namespaceOverride: "" - -prom2teams: - enabled: false - -sachet: - enabled: false - -## Node labels for pod assignment -## Ref: https://kubernetes.io/docs/user-guide/node-selection/ -## -nodeSelector: {} -## List of node taints to tolerate (requires Kubernetes >= 1.6) -tolerations: [] diff --git a/index.yaml b/index.yaml index 458838510..89610122f 100755 --- a/index.yaml +++ b/index.yaml @@ -3616,38 +3616,6 @@ entries: - assets/rancher-aks-operator-crd/rancher-aks-operator-crd-100.0.0+up1.0.1.tgz version: 100.0.0+up1.0.1 rancher-alerting-drivers: - - annotations: - catalog.cattle.io/certified: rancher - catalog.cattle.io/display-name: Alerting Drivers - catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.26.0-0' - catalog.cattle.io/os: linux - catalog.cattle.io/permits-os: linux,windows - catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' - catalog.cattle.io/release-name: rancher-alerting-drivers - catalog.cattle.io/type: cluster-tool - catalog.cattle.io/upstream-version: 100.0.1 - apiVersion: v2 - appVersion: 1.16.0 - created: "2022-12-20T08:57:54.694788904+05:30" - dependencies: - - condition: prom2teams.enabled - name: prom2teams - repository: file://./charts/prom2teams - - condition: sachet.enabled - name: sachet - repository: file://./charts/sachet - description: The manager for third-party webhook receivers used in Prometheus - Alertmanager - digest: 0ae55e483f38a4b1ffdbb025178b3822f9534c6f2dae8401fd81c26ef587a62f - icon: https://charts.rancher.io/assets/logos/alerting-drivers.svg - keywords: - - monitoring - - alertmanger - - webhook - name: rancher-alerting-drivers - urls: - - assets/rancher-alerting-drivers/rancher-alerting-drivers-101.0.1.tgz - version: 101.0.1 - annotations: catalog.cattle.io/certified: rancher catalog.cattle.io/display-name: Alerting Drivers From 0378ad6398f65355dd1c93081e7633ea92c2d99b Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 27 Jan 2023 14:58:13 -0800 Subject: [PATCH 10/10] make charts --- .../rancher-alerting-drivers-102.0.0.tgz | Bin 0 -> 8889 bytes .../102.0.0/Chart.yaml | 27 ++++ .../102.0.0/README.md | 11 ++ .../102.0.0/app-readme.md | 29 ++++ .../102.0.0/charts/prom2teams/.helmignore | 22 +++ .../102.0.0/charts/prom2teams/Chart.yaml | 10 ++ .../102.0.0/charts/prom2teams/files/teams.j2 | 44 ++++++ .../charts/prom2teams/templates/NOTES.txt | 2 + .../charts/prom2teams/templates/_helpers.tpl | 73 ++++++++++ .../prom2teams/templates/configmap.yaml | 39 ++++++ .../prom2teams/templates/deployment.yaml | 83 ++++++++++++ .../charts/prom2teams/templates/psp.yaml | 61 +++++++++ .../prom2teams/templates/service-account.yaml | 6 + .../charts/prom2teams/templates/service.yaml | 17 +++ .../102.0.0/charts/prom2teams/values.yaml | 69 ++++++++++ .../102.0.0/charts/sachet/.helmignore | 23 ++++ .../102.0.0/charts/sachet/Chart.yaml | 11 ++ .../102.0.0/charts/sachet/files/template.tmpl | 1 + .../102.0.0/charts/sachet/templates/NOTES.txt | 3 + .../charts/sachet/templates/_helpers.tpl | 79 +++++++++++ .../templates/configmap-pre-install.yaml | 34 +++++ .../charts/sachet/templates/deployment.yaml | 75 +++++++++++ .../102.0.0/charts/sachet/templates/psp.yaml | 61 +++++++++ .../sachet/templates/service-account.yaml | 6 + .../charts/sachet/templates/service.yaml | 17 +++ .../102.0.0/charts/sachet/values.yaml | 69 ++++++++++ .../102.0.0/questions.yml | 20 +++ .../102.0.0/templates/NOTES.txt | 2 + .../102.0.0/templates/_helpers.tpl | 117 ++++++++++++++++ .../102.0.0/templates/cluster-role.yaml | 50 +++++++ .../102.0.0/templates/hardened.yaml | 126 ++++++++++++++++++ .../templates/validate-psp-install.yaml | 7 + .../102.0.0/values.yaml | 29 ++++ index.yaml | 32 +++++ 34 files changed, 1255 insertions(+) create mode 100644 assets/rancher-alerting-drivers/rancher-alerting-drivers-102.0.0.tgz create mode 100644 charts/rancher-alerting-drivers/102.0.0/Chart.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/README.md create mode 100644 charts/rancher-alerting-drivers/102.0.0/app-readme.md create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/.helmignore create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/Chart.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/files/teams.j2 create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/NOTES.txt create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/_helpers.tpl create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/configmap.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/deployment.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/psp.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/service-account.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/service.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/values.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/sachet/.helmignore create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/sachet/Chart.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/sachet/files/template.tmpl create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/NOTES.txt create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/_helpers.tpl create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/configmap-pre-install.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/deployment.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/psp.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/service-account.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/service.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/charts/sachet/values.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/questions.yml create mode 100644 charts/rancher-alerting-drivers/102.0.0/templates/NOTES.txt create mode 100644 charts/rancher-alerting-drivers/102.0.0/templates/_helpers.tpl create mode 100644 charts/rancher-alerting-drivers/102.0.0/templates/cluster-role.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/templates/hardened.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/templates/validate-psp-install.yaml create mode 100644 charts/rancher-alerting-drivers/102.0.0/values.yaml diff --git a/assets/rancher-alerting-drivers/rancher-alerting-drivers-102.0.0.tgz b/assets/rancher-alerting-drivers/rancher-alerting-drivers-102.0.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..880388d69d1c2553cf04f9a002554d1ac571a737 GIT binary patch literal 8889 zcmV;qB1YXGiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PKBxbKJJFr~l@s=tHeblCQ{l=;bqYeQI@N#nE0{R!K@yr+iZm zhQ!PuA_;~7CF{uA+W+@k?kCy8iv&5GrDr4hRG5)|Ve9O>Bvuhnd7%yOOgu_s~)O?t5Tk5|y~I|qK-Yr}s+$M4FYn~hm1 z>p?`4{8M9WinEw-<`t=SZb=f-+h#J%3aC)h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zs-00960ZeiS1 H0Qvv`EsUu$ literal 0 HcmV?d00001 diff --git a/charts/rancher-alerting-drivers/102.0.0/Chart.yaml b/charts/rancher-alerting-drivers/102.0.0/Chart.yaml new file mode 100644 index 000000000..ac1be3661 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/Chart.yaml @@ -0,0 +1,27 @@ +annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/display-name: Alerting Drivers + catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.26.0-0' + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux,windows + catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' + catalog.cattle.io/release-name: rancher-alerting-drivers + catalog.cattle.io/type: cluster-tool + catalog.cattle.io/upstream-version: 100.0.1 +apiVersion: v2 +appVersion: 1.16.0 +dependencies: +- condition: prom2teams.enabled + name: prom2teams + repository: file://./charts/prom2teams +- condition: sachet.enabled + name: sachet + repository: file://./charts/sachet +description: The manager for third-party webhook receivers used in Prometheus Alertmanager +icon: https://charts.rancher.io/assets/logos/alerting-drivers.svg +keywords: +- monitoring +- alertmanger +- webhook +name: rancher-alerting-drivers +version: 102.0.0 diff --git a/charts/rancher-alerting-drivers/102.0.0/README.md b/charts/rancher-alerting-drivers/102.0.0/README.md new file mode 100644 index 000000000..ea3f11801 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/README.md @@ -0,0 +1,11 @@ +# Rancher Alerting Drivers + +This chart installs one or more [Alertmanager Webhook Receiver Integrations](https://prometheus.io/docs/operating/integrations/#alertmanager-webhook-receiver) (i.e. Drivers). + +Those Drivers can be targeted by an existing deployment of Alertmanager to send alerts to notification mechanisms that are not natively supported. + +Currently, this chart supports the following Drivers: +- Microsoft Teams, based on [prom2teams](https://github.com/idealista/prom2teams) +- SMS, based on [Sachet](https://github.com/messagebird/sachet) + +After installing rancher-alerting-drivers, please refer to the upstream documentation for each Driver for configuration options. \ No newline at end of file diff --git a/charts/rancher-alerting-drivers/102.0.0/app-readme.md b/charts/rancher-alerting-drivers/102.0.0/app-readme.md new file mode 100644 index 000000000..fe228d96f --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/app-readme.md @@ -0,0 +1,29 @@ +# Rancher Alerting Drivers + +This chart installs one or more [Alertmanager Webhook Receiver Integrations](https://prometheus.io/docs/operating/integrations/#alertmanager-webhook-receiver) (i.e. Drivers). + +Those Drivers can be targeted by an existing deployment of Alertmanager to send alerts to notification mechanisms that are not natively supported. + +Currently, this chart supports the following Drivers: +- Microsoft Teams, based on [prom2teams](https://github.com/idealista/prom2teams) +- SMS, based on [Sachet](https://github.com/messagebird/sachet) + +After installing rancher-alerting-drivers, please refer to the upstream documentation for each Driver for configuration options. + +## Upgrading to Kubernetes v1.25+ + +Starting in Kubernetes v1.25, [Pod Security Policies](https://kubernetes.io/docs/concepts/security/pod-security-policy/) have been removed from the Kubernetes API. + +As a result, **before upgrading to Kubernetes v1.25** (or on a fresh install in a Kubernetes v1.25+ cluster), users are expected to perform an in-place upgrade of this chart with `global.cattle.psp.enabled` set to `false` if it has been previously set to `true`. +​ +> **Note:** +> In this chart release, any previous field that was associated with any PSP resources have been removed in favor of a single global field: `global.cattle.psp.enabled`. + ​ +> **Note:** +> If you upgrade your cluster to Kubernetes v1.25+ before removing PSPs via a `helm upgrade` (even if you manually clean up resources), **it will leave the Helm release in a broken state within the cluster such that further Helm operations will not work (`helm uninstall`, `helm upgrade`, etc.).** +> +> If your charts get stuck in this state, please consult the Rancher docs on how to clean up your Helm release secrets. + +Upon setting `global.cattle.psp.enabled` to false, the chart will remove any PSP resources deployed on its behalf from the cluster. This is the default setting for this chart. +​ +As a replacement for PSPs, [Pod Security Admission](https://kubernetes.io/docs/concepts/security/pod-security-admission/) should be used. Please consult the Rancher docs for more details on how to configure your chart release namespaces to work with the new Pod Security Admission and apply Pod Security Standards. \ No newline at end of file diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/.helmignore b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/.helmignore new file mode 100644 index 000000000..50af03172 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/Chart.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/Chart.yaml new file mode 100644 index 000000000..1e0a686e8 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/Chart.yaml @@ -0,0 +1,10 @@ +annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/hidden: "true" + catalog.cattle.io/os: linux + catalog.cattle.io/release-name: rancher-prom2teams +apiVersion: v1 +appVersion: 4.2.0 +description: A Helm chart for Prom2Teams based on the upstream https://github.com/idealista/prom2teams +name: prom2teams +version: 0.2.0 diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/files/teams.j2 b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/files/teams.j2 new file mode 100644 index 000000000..f1cf61d4e --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/files/teams.j2 @@ -0,0 +1,44 @@ +{%- set + theme_colors = { + 'resolved' : '2DC72D', + 'critical' : '8C1A1A', + 'severe' : '8C1A1A', + 'warning' : 'FF9A0B', + 'unknown' : 'CCCCCC' + } +-%} + +{ + "@type": "MessageCard", + "@context": "http://schema.org/extensions", + "themeColor": "{% if status=='resolved' %} {{ theme_colors.resolved }} {% else %} {{ theme_colors[msg_text.severity] }} {% endif %}", + "summary": "{% if status=='resolved' %}(Resolved) {% endif %}{{ msg_text.summary }}", + "title": "Prometheus alert {% if status=='resolved' %}(Resolved) {% elif status=='unknown' %} (status unknown) {% endif %}", + "sections": [{ + "activityTitle": "{{ msg_text.summary }}", + "facts": [{% if msg_text.name %}{ + "name": "Alert", + "value": "{{ msg_text.name }}" + },{% endif %}{% if msg_text.instance %}{ + "name": "In host", + "value": "{{ msg_text.instance }}" + },{% endif %}{% if msg_text.severity %}{ + "name": "Severity", + "value": "{{ msg_text.severity }}" + },{% endif %}{% if msg_text.description %}{ + "name": "Description", + "value": "{{ msg_text.description }}" + },{% endif %}{ + "name": "Status", + "value": "{{ msg_text.status }}" + }{% if msg_text.extra_labels %}{% for key in msg_text.extra_labels %},{ + "name": "{{ key }}", + "value": "{{ msg_text.extra_labels[key] }}" + }{% endfor %}{% endif %} + {% if msg_text.extra_annotations %}{% for key in msg_text.extra_annotations %},{ + "name": "{{ key }}", + "value": "{{ msg_text.extra_annotations[key] }}" + }{% endfor %}{% endif %}], + "markdown": true + }] +} diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/NOTES.txt b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/NOTES.txt new file mode 100644 index 000000000..a94c4132b --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/NOTES.txt @@ -0,0 +1,2 @@ +Prom2Teams has been installed. Check its status by running: + kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}" diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/_helpers.tpl b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/_helpers.tpl new file mode 100644 index 000000000..ffc0fa356 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/_helpers.tpl @@ -0,0 +1,73 @@ +{{/* vim: set filetype=mustache: */}} + +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- end -}} +{{- end -}} + +{{/* +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 -}} + +{{/* +Expand the name of the chart. +*/}} +{{- define "prom2teams.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "prom2teams.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Allow the release namespace to be overridden for multi-namespace deployments in combined charts +*/}} +{{- define "prom2teams.namespace" -}} +{{ default .Release.Namespace .Values.global.namespaceOverride }} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "prom2teams.labels" -}} +app.kubernetes.io/name: {{ include "prom2teams.name" . }} +helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +app.kubernetes.io/instance: {{ .Release.Name }} +release: {{ .Release.Name }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/configmap.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/configmap.yaml new file mode 100644 index 000000000..ccf38953e --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/configmap.yaml @@ -0,0 +1,39 @@ +{{- $valid := list "DEBUG" "INFO" "WARNING" "ERROR" "CRITICAL" -}} +{{- if not (has .Values.prom2teams.loglevel $valid) -}} +{{- fail "Invalid log level"}} +{{- end -}} +{{- if and .Values.prom2teams.connector (hasKey .Values.prom2teams.connectors "Connector") -}} +{{- fail "Invalid configuration: prom2teams.connectors can't have a connector named Connector when prom2teams.connector is set"}} +{{- end -}} +{{/* Create the configmap when the operation is helm install and the target configmap does not exist. */}} +{{- if not (lookup "v1" "ConfigMap" (include "prom2teams.namespace" . ) (include "prom2teams.fullname" .)) }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ include "prom2teams.namespace" . }} + name: {{ include "prom2teams.fullname" . }} + labels: {{ include "prom2teams.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": pre-install, pre-upgrade + "helm.sh/hook-weight": "3" + "helm.sh/resource-policy": keep +data: + config.ini: |- + [HTTP Server] + Host: {{ .Values.prom2teams.host }} + Port: {{ .Values.prom2teams.port }} + [Microsoft Teams] + {{- with .Values.prom2teams.connector }} + Connector: {{ . }} + {{- end }} + {{- range $key, $val := .Values.prom2teams.connectors }} + {{ $key }}: {{ $val }} + {{- end }} + [Group Alerts] + Field: {{ .Values.prom2teams.group_alerts_by }} + [Log] + Level: {{ .Values.prom2teams.loglevel }} + [Template] + Path: {{ .Values.prom2teams.templatepath }} + teams.j2: {{ .Files.Get "files/teams.j2" | quote }} + {{- end -}} diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/deployment.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/deployment.yaml new file mode 100644 index 000000000..34f7d0f46 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/deployment.yaml @@ -0,0 +1,83 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "prom2teams.fullname" . }} + namespace: {{ include "prom2teams.namespace" . }} + labels: {{ include "prom2teams.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app.kubernetes.io/name: {{ include "prom2teams.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + template: + metadata: + labels: + app.kubernetes.io/name: {{ include "prom2teams.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + spec: + serviceAccountName: {{ include "prom2teams.fullname" . }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: {{ toYaml . | nindent 8 }} + {{- end }} + volumes: + - name: config + configMap: + name: {{ include "prom2teams.fullname" . }} + containers: + - name: {{ .Chart.Name }} + image: {{ include "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 8089 + protocol: TCP + volumeMounts: + - name: config + mountPath: /opt/prom2teams/helmconfig/ + env: + - name: APP_CONFIG_FILE + value: {{ .Values.prom2teams.config | quote }} + - name: PROM2TEAMS_PORT + value: {{ .Values.prom2teams.port | quote }} + - name: PROM2TEAMS_HOST + value: {{ .Values.prom2teams.host | quote }} + - name: PROM2TEAMS_CONNECTOR + value: {{ .Values.prom2teams.connector | quote }} + - name: PROM2TEAMS_GROUP_ALERTS_BY + value: {{ .Values.prom2teams.group_alerts_by | quote }} + - name: PROM2TEAMS_LOGLEVEL + value: {{ .Values.prom2teams.loglevel }} + {{- range $key, $value := .Values.prom2teams.extraEnv }} + - name: "{{ $key }}" + value: "{{ $value }}" + {{- end }} + resources: {{ toYaml .Values.resources | nindent 12 }} + {{- if .Values.securityContext.enabled }} + securityContext: + privileged: false + readOnlyRootFilesystem: false + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + {{- end }} + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} + {{- if .Values.nodeSelector }} + {{- toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} + {{- if .Values.tolerations }} + {{- toYaml .Values.tolerations | nindent 8 }} + {{- end }} + {{- if .Values.securityContext.enabled }} + securityContext: + runAsNonRoot: {{ if eq (int .Values.securityContext.runAsUser) 0 }}false{{ else }}true{{ end }} + runAsUser: {{ .Values.securityContext.runAsUser }} + runAsGroup: {{ .Values.securityContext.runAsGroup }} + fsGroup: {{ .Values.securityContext.fsGroup }} + {{- end }} + diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/psp.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/psp.yaml new file mode 100644 index 000000000..55088f8af --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/psp.yaml @@ -0,0 +1,61 @@ +{{- if .Values.global.cattle.psp.enabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ include "prom2teams.fullname" . }}-psp + labels: {{ include "prom2teams.labels" . | nindent 4 }} +spec: + privileged: false + allowPrivilegeEscalation: false + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: 'MustRunAsNonRoot' + seLinux: + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + readOnlyRootFilesystem: false + volumes: + - 'configMap' + - 'secret' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "prom2teams.fullname" . }}-psp + namespace: {{ include "prom2teams.namespace" . }} + labels: {{ include "prom2teams.labels" . | nindent 4 }} +rules: + - apiGroups: + - policy + resourceNames: + - {{ include "prom2teams.fullname" . }}-psp + resources: + - podsecuritypolicies + verbs: + - use +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "prom2teams.fullname" . }}-psp + namespace: {{ include "prom2teams.namespace" . }} + labels: {{ include "prom2teams.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ include "prom2teams.fullname" . }}-psp +subjects: + - kind: ServiceAccount + name: {{ include "prom2teams.fullname" . }} +{{- end }} diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/service-account.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/service-account.yaml new file mode 100644 index 000000000..a9572c5cd --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/service-account.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "prom2teams.fullname" . }} + namespace: {{ include "prom2teams.namespace" . }} + labels: {{ include "prom2teams.labels" . | nindent 4 }} diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/service.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/service.yaml new file mode 100644 index 000000000..cc95cad35 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "prom2teams.fullname" . }} + namespace: {{ include "prom2teams.namespace" . }} + labels: +{{ include "prom2teams.labels" . | indent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: 8089 + protocol: TCP + name: http + selector: + app.kubernetes.io/name: {{ include "prom2teams.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/values.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/values.yaml new file mode 100644 index 000000000..c0b33ed9f --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/prom2teams/values.yaml @@ -0,0 +1,69 @@ +# Default values for prom2teams. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +global: + cattle: + psp: + enabled: false + systemDefaultRegistry: "" + namespaceOverride: "" + +nameOverride: "prom2teams" +fullnameOverride: "" + +replicaCount: 1 + +image: + repository: rancher/mirrored-idealista-prom2teams + tag: 4.2.0 + pullPolicy: IfNotPresent + +resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 200m + memory: 200Mi + +service: + type: ClusterIP + port: 8089 + +prom2teams: + host: 0.0.0.0 + port: 8089 + connector: the-connector-url + connectors: {} + # group_alerts_by can be one of + # ("name" | "description" | "instance" | "severity" | "status" | "summary" | "fingerprint" | "runbook_url") + group_alerts_by: + # loglevel can be one of (DEBUG | INFO | WARNING | ERROR | CRITICAL) + loglevel: INFO + templatepath: /opt/prom2teams/helmconfig/teams.j2 + config: /opt/prom2teams/helmconfig/config.ini + extraEnv: {} + +# Security Context properties +securityContext: + # enabled is a flag to enable Security Context + enabled: true + # runAsUser is the user ID used to run the container + runAsUser: 101 + # runAsGroup is the primary group ID used to run all processes within any container of the pod + runAsGroup: 101 + # fsGroup is the group ID associated with the container + fsGroup: 101 + # readOnlyRootFilesystem is a flag to enable readOnlyRootFilesystem for the Hazelcast security context + readOnlyRootFilesystem: true + +## Node labels for pod assignment +## Ref: https://kubernetes.io/docs/user-guide/node-selection/ +## +nodeSelector: {} + +## List of node taints to tolerate (requires Kubernetes >= 1.6) +tolerations: [] + +affinity: {} diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/sachet/.helmignore b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/.helmignore new file mode 100644 index 000000000..0e8a0eb36 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/sachet/Chart.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/Chart.yaml new file mode 100644 index 000000000..dd0d706a6 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/Chart.yaml @@ -0,0 +1,11 @@ +annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/hidden: "true" + catalog.cattle.io/os: linux + catalog.cattle.io/release-name: rancher-sachet +apiVersion: v2 +appVersion: 0.3.1 +description: A Helm chart for Sachet based on the upstream https://github.com/messagebird/sachet +name: sachet +type: application +version: 1.0.1 diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/sachet/files/template.tmpl b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/files/template.tmpl new file mode 100644 index 000000000..08f24e138 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/files/template.tmpl @@ -0,0 +1 @@ +# reference: https://github.com/messagebird/sachet/blob/master/examples/telegram.tmpl diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/NOTES.txt b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/NOTES.txt new file mode 100644 index 000000000..247a91fc1 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/NOTES.txt @@ -0,0 +1,3 @@ +rancher-sachet is now installed on the cluster! +Please refer to the upstream documentation for configuration options: +https://github.com/messagebird/sachet diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/_helpers.tpl b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/_helpers.tpl new file mode 100644 index 000000000..eaa61fee5 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/_helpers.tpl @@ -0,0 +1,79 @@ +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- end -}} +{{- end -}} + +{{/* +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 -}} + +{{/* +Allow the release namespace to be overridden for multi-namespace deployments in combined charts +*/}} +{{- define "sachet.namespace" -}} +{{ default .Release.Namespace .Values.global.namespaceOverride }} +{{- end }} + +{{/* +Expand the name of the chart. +*/}} +{{- define "sachet.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "sachet.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "sachet.labels" -}} +helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{ include "sachet.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "sachet.selectorLabels" -}} +app.kubernetes.io/name: {{ include "sachet.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + + diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/configmap-pre-install.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/configmap-pre-install.yaml new file mode 100644 index 000000000..e8c63ac03 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/configmap-pre-install.yaml @@ -0,0 +1,34 @@ +{{/*This file is applied when the operation is helm install and the target confimap does not exist. */}} +{{- if not (lookup "v1" "ConfigMap" (include "sachet.namespace" . ) (include "sachet.fullname" .)) }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ include "sachet.namespace" . }} + name: {{ include "sachet.fullname" . }} + labels: {{ include "sachet.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": pre-install, pre-upgrade + "helm.sh/hook-weight": "3" + "helm.sh/resource-policy": keep +data: + config.yaml: |- + {{- if and (not .Values.sachet.providers) (not .Values.sachet.receivers) }} + # please refer to the upstream documentation for configuration options: + # https://github.com/messagebird/sachet + # + # providers: + # aliyun: + # region_id: + # ... + # receivers: + # - name: 'team-sms' + # provider: 'aliyu' + # ... + {{- end }} + {{- with .Values.sachet.providers }} + providers: {{ toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.sachet.receivers }} + receivers: {{ toYaml . | nindent 6 }} + {{- end }} +{{- end }} diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/deployment.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/deployment.yaml new file mode 100644 index 000000000..17215eebd --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/deployment.yaml @@ -0,0 +1,75 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "sachet.fullname" . }} + namespace: {{ include "sachet.namespace" . }} + labels: {{ include "sachet.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: {{ include "sachet.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: {{ toYaml . | nindent 8 }} + {{- end }} + labels: {{ include "sachet.selectorLabels" . | nindent 8 }} + spec: + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} + {{- if .Values.nodeSelector }} + {{- toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} + {{- if .Values.tolerations }} + {{- toYaml .Values.tolerations | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: {{ toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "sachet.fullname" . }} + {{- with .Values.podSecurityContext }} + securityContext: {{ toYaml .Values.podSecurityContext | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + securityContext: {{ toYaml .Values.securityContext | nindent 12 }} + image: {{ include "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 9876 + protocol: TCP + livenessProbe: + httpGet: + path: /-/live + port: http + readinessProbe: + httpGet: + path: /-/ready + port: http + volumeMounts: + - mountPath: /etc/sachet/ + name: config-volume + {{- with .Values.resources }} + resources: {{ toYaml .Values.resources | nindent 12 }} + {{- end }} + - name: config-reloader + securityContext: {{ toYaml .Values.securityContext | nindent 12 }} + image: {{ include "system_default_registry" . }}{{ .Values.configReloader.repository }}:{{ .Values.configReloader.tag }} + imagePullPolicy: {{ .Values.configReloader.pullPolicy }} + args: + - -volume-dir=/watch-config + - -webhook-method=POST + - -webhook-status-code=200 + - -webhook-url=http://127.0.0.1:{{ .Values.service.port }}/-/reload + volumeMounts: + - mountPath: /watch-config + name: config-volume + volumes: + - name: config-volume + configMap: + name: {{ include "sachet.fullname" . }} + defaultMode: 0777 diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/psp.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/psp.yaml new file mode 100644 index 000000000..331794e3a --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/psp.yaml @@ -0,0 +1,61 @@ +{{- if .Values.global.cattle.psp.enabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ include "sachet.fullname" . }}-psp + labels: {{ include "sachet.labels" . | nindent 4 }} +spec: + privileged: false + allowPrivilegeEscalation: false + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: 'MustRunAsNonRoot' + seLinux: + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + readOnlyRootFilesystem: false + volumes: + - 'configMap' + - 'secret' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "sachet.fullname" . }}-psp + namespace: {{ include "sachet.namespace" . }} + labels: {{ include "sachet.labels" . | nindent 4 }} +rules: + - apiGroups: + - policy + resourceNames: + - {{ include "sachet.fullname" . }}-psp + resources: + - podsecuritypolicies + verbs: + - use +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "sachet.fullname" . }}-psp + namespace: {{ include "sachet.namespace" . }} + labels: {{ include "sachet.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ include "sachet.fullname" . }}-psp +subjects: + - kind: ServiceAccount + name: {{ include "sachet.fullname" . }} +{{- end }} diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/service-account.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/service-account.yaml new file mode 100644 index 000000000..8833f1b3b --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/service-account.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "sachet.fullname" . }} + namespace: {{ include "sachet.namespace" . }} + labels: {{ include "sachet.labels" . | nindent 4 }} diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/service.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/service.yaml new file mode 100644 index 000000000..216e8322c --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "sachet.fullname" . }} + namespace: {{ include "sachet.namespace" . }} + labels: {{ include "sachet.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + {{- if contains "NodePort" .Values.service.type }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} + selector: {{ include "sachet.selectorLabels" . | nindent 4 }} diff --git a/charts/rancher-alerting-drivers/102.0.0/charts/sachet/values.yaml b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/values.yaml new file mode 100644 index 000000000..c9180b143 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/charts/sachet/values.yaml @@ -0,0 +1,69 @@ +# Default values for sachet. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +global: + cattle: + psp: + enabled: false + systemDefaultRegistry: "" + namespaceOverride: "" + +nameOverride: "sachet" +fullnameOverride: "" + +configReloader: + repository: rancher/mirrored-jimmidyson-configmap-reload + pullPolicy: IfNotPresent + tag: v0.8.0 + +sachet: + # reference: https://github.com/messagebird/sachet/blob/master/examples/config.yaml + providers: {} + + receivers: [] + +replicaCount: 1 + +image: + repository: rancher/mirrored-messagebird-sachet + pullPolicy: IfNotPresent + tag: 0.3.1 + +imagePullSecrets: [] + +podAnnotations: {} + +podSecurityContext: + +securityContext: + runAsUser: 1000 + runAsNonRoot: true + runAsGroup: 1000 + +service: + type: ClusterIP + port: 9876 + nodePort: 30001 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +## Node labels for pod assignment +## Ref: https://kubernetes.io/docs/user-guide/node-selection/ +## +nodeSelector: {} + +## List of node taints to tolerate (requires Kubernetes >= 1.6) +tolerations: [] + +affinity: {} diff --git a/charts/rancher-alerting-drivers/102.0.0/questions.yml b/charts/rancher-alerting-drivers/102.0.0/questions.yml new file mode 100644 index 000000000..dc9ebb596 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/questions.yml @@ -0,0 +1,20 @@ +categories: + - monitoring +namespace: cattle-monitoring-system +questions: + - variable: global.cattle.psp.enabled + default: "false" + description: "Flag to enable or disable the installation of PodSecurityPolicies by this chart in the target cluster. If the cluster is running Kubernetes 1.25+, you must update this value to false." + label: "Enable PodSecurityPolicies" + type: boolean + group: "Security Settings" + - variable: prom2teams.enabled + default: false + label: Enable Microsoft Teams + type: boolean + group: "General" + - variable: sachet.enabled + default: false + label: Enable SMS + type: boolean + group: "General" diff --git a/charts/rancher-alerting-drivers/102.0.0/templates/NOTES.txt b/charts/rancher-alerting-drivers/102.0.0/templates/NOTES.txt new file mode 100644 index 000000000..59c1415e0 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/templates/NOTES.txt @@ -0,0 +1,2 @@ +rancher-alerting-drivers is now installed on the cluster! +Please refer to the upstream documentation for each Driver for configuration options. \ No newline at end of file diff --git a/charts/rancher-alerting-drivers/102.0.0/templates/_helpers.tpl b/charts/rancher-alerting-drivers/102.0.0/templates/_helpers.tpl new file mode 100644 index 000000000..e1dbe3370 --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/templates/_helpers.tpl @@ -0,0 +1,117 @@ +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- end -}} +{{- end -}} + +{{/* +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 -}} + +{{/* +Expand the name of the chart. +*/}} +{{- define "drivers.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "drivers.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "drivers.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "drivers.labels" -}} +helm.sh/chart: {{ include "drivers.chart" . }} +{{ include "drivers.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "drivers.selectorLabels" -}} +app.kubernetes.io/name: {{ include "drivers.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "drivers.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "drivers.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +https://github.com/helm/helm/issues/4535#issuecomment-477778391 +Usage: {{ include "call-nested" (list . "SUBCHART_NAME" "TEMPLATE") }} +e.g. {{ include "call-nested" (list . "grafana" "grafana.fullname") }} +*/}} +{{- define "call-nested" }} +{{- $dot := index . 0 }} +{{- $subchart := index . 1 | splitList "." }} +{{- $template := index . 2 }} +{{- $values := $dot.Values }} +{{- range $subchart }} +{{- $values = index $values . }} +{{- end }} +{{- include $template (dict "Chart" (dict "Name" (last $subchart)) "Values" $values "Release" $dot.Release "Capabilities" $dot.Capabilities) }} +{{- end }} + + +{{/* +Get the list of configMaps to be managed +*/}} +{{- define "drivers.configmapList" -}} +{{- if .Values.sachet.enabled -}} +- {{ include "call-nested" (list . "sachet" "sachet.fullname") }} +{{- end }} +{{- if .Values.prom2teams.enabled -}} +- {{ include "call-nested" (list . "prom2teams" "prom2teams.fullname") }} +{{- end }} +{{- end }} diff --git a/charts/rancher-alerting-drivers/102.0.0/templates/cluster-role.yaml b/charts/rancher-alerting-drivers/102.0.0/templates/cluster-role.yaml new file mode 100644 index 000000000..e3022a7ca --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/templates/cluster-role.yaml @@ -0,0 +1,50 @@ +{{- if and (not .Values.sachet.enabled) (not .Values.prom2teams.enabled) -}} +{{- fail "At least one Driver must be enabled to install the chart. " }} +{{- end -}} + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "drivers.fullname" . }}-admin + labels: {{ include "drivers.labels" . | nindent 4 }} + rbac.authorization.k8s.io/aggregate-to-admin: "true" +rules: + - apiGroups: + - "" + resources: + - configmaps + resourceNames: {{ include "drivers.configmapList" . | nindent 6 }} + verbs: + - "*" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "drivers.fullname" . }}-edit + labels: {{ include "drivers.labels" . | nindent 4 }} + rbac.authorization.k8s.io/aggregate-to-edit: "true" +rules: + - apiGroups: + - "" + resources: + - configmaps + resourceNames: {{ include "drivers.configmapList" . | nindent 6 }} + verbs: + - "*" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "drivers.fullname" . }}-view + labels: {{ include "drivers.labels" . | nindent 4 }} + rbac.authorization.k8s.io/aggregate-to-view: "true" +rules: + - apiGroups: + - "" + resources: + - configmaps + resourceNames: {{ include "drivers.configmapList" . | nindent 6 }} + verbs: + - 'get' + - 'list' + - 'watch' diff --git a/charts/rancher-alerting-drivers/102.0.0/templates/hardened.yaml b/charts/rancher-alerting-drivers/102.0.0/templates/hardened.yaml new file mode 100644 index 000000000..be1ddc12a --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/templates/hardened.yaml @@ -0,0 +1,126 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "drivers.fullname" . }}-patch-sa + namespace: {{ .Release.Namespace }} + labels: {{ include "drivers.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": post-install, post-upgrade + "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation +spec: + backoffLimit: 1 + template: + spec: + serviceAccountName: {{ include "drivers.fullname" . }}-patch-sa + securityContext: + runAsNonRoot: true + runAsUser: 1000 + restartPolicy: Never + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} +{{- if .Values.nodeSelector }} +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} +{{- if .Values.tolerations }} +{{ toYaml .Values.tolerations | indent 8 }} +{{- end }} + containers: + - name: {{ include "drivers.fullname" . }}-patch-sa + image: "{{ include "system_default_registry" . }}{{ .Values.global.kubectl.repository }}:{{ .Values.global.kubectl.tag }}" + imagePullPolicy: IfNotPresent + command: ["kubectl", "-n", {{ .Release.Namespace | quote }}, "patch", "serviceaccount", "default", "-p", "{\"automountServiceAccountToken\": false}"] +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "drivers.fullname" . }}-patch-sa + namespace: {{ .Release.Namespace }} + labels: {{ include "drivers.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": post-install, post-upgrade + "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "drivers.fullname" . }}-patch-sa + labels: {{ include "drivers.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": post-install, post-upgrade + "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation +rules: + - apiGroups: [""] + resources: ["serviceaccounts"] + verbs: ["get", "patch"] + {{- if .Values.global.cattle.psp.enabled }} + - apiGroups: ["policy"] + resources: ["podsecuritypolicies"] + verbs: ["use"] + resourceNames: + - {{ include "drivers.fullname" . }}-patch-sa + {{- end }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "drivers.fullname" . }}-patch-sa + labels: {{ include "drivers.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": post-install, post-upgrade + "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ include "drivers.fullname" . }}-patch-sa +subjects: + - kind: ServiceAccount + name: {{ include "drivers.fullname" . }}-patch-sa + namespace: {{ .Release.Namespace }} +--- +{{- if .Values.global.cattle.psp.enabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ include "drivers.fullname" . }}-patch-sa + labels: {{ include "drivers.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": post-install, post-upgrade + "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation +spec: + privileged: false + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: 'MustRunAsNonRoot' + seLinux: + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + - min: 1 + max: 65535 + readOnlyRootFilesystem: false + volumes: + - 'secret' +{{- end }} +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ include "drivers.fullname" . }}-default-allow-all + namespace: {{ .Release.Namespace }} +spec: + podSelector: {} + ingress: + - {} + egress: + - {} + policyTypes: + - Ingress + - Egress diff --git a/charts/rancher-alerting-drivers/102.0.0/templates/validate-psp-install.yaml b/charts/rancher-alerting-drivers/102.0.0/templates/validate-psp-install.yaml new file mode 100644 index 000000000..a30c59d3b --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/templates/validate-psp-install.yaml @@ -0,0 +1,7 @@ +#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}} +#{{- if .Values.global.cattle.psp.enabled }} +#{{- if not (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} +#{{- fail "The target cluster does not have the PodSecurityPolicy API resource. Please disable PSPs in this chart before proceeding." -}} +#{{- end }} +#{{- end }} +#{{- end }} diff --git a/charts/rancher-alerting-drivers/102.0.0/values.yaml b/charts/rancher-alerting-drivers/102.0.0/values.yaml new file mode 100644 index 000000000..13b1589cd --- /dev/null +++ b/charts/rancher-alerting-drivers/102.0.0/values.yaml @@ -0,0 +1,29 @@ +# Default values for rancher-alerting-driver. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +global: + cattle: + psp: + enabled: false + # the registry where all images will be pulled from + systemDefaultRegistry: "" + kubectl: + repository: rancher/kubectl + tag: v1.20.2 + # set this value if you want the sub-charts to be installed into + # a namespace rather than where this chart is installed + namespaceOverride: "" + +prom2teams: + enabled: false + +sachet: + enabled: false + +## Node labels for pod assignment +## Ref: https://kubernetes.io/docs/user-guide/node-selection/ +## +nodeSelector: {} +## List of node taints to tolerate (requires Kubernetes >= 1.6) +tolerations: [] diff --git a/index.yaml b/index.yaml index 89610122f..864b22faf 100755 --- a/index.yaml +++ b/index.yaml @@ -3616,6 +3616,38 @@ entries: - assets/rancher-aks-operator-crd/rancher-aks-operator-crd-100.0.0+up1.0.1.tgz version: 100.0.0+up1.0.1 rancher-alerting-drivers: + - annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/display-name: Alerting Drivers + catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.26.0-0' + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux,windows + catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' + catalog.cattle.io/release-name: rancher-alerting-drivers + catalog.cattle.io/type: cluster-tool + catalog.cattle.io/upstream-version: 100.0.1 + apiVersion: v2 + appVersion: 1.16.0 + created: "2023-01-27T14:59:41.208842-08:00" + dependencies: + - condition: prom2teams.enabled + name: prom2teams + repository: file://./charts/prom2teams + - condition: sachet.enabled + name: sachet + repository: file://./charts/sachet + description: The manager for third-party webhook receivers used in Prometheus + Alertmanager + digest: 926f4e9a2f5e5253332eabeb8b8b49aaeefb700174df577f68161308112d6f93 + icon: https://charts.rancher.io/assets/logos/alerting-drivers.svg + keywords: + - monitoring + - alertmanger + - webhook + name: rancher-alerting-drivers + urls: + - assets/rancher-alerting-drivers/rancher-alerting-drivers-102.0.0.tgz + version: 102.0.0 - annotations: catalog.cattle.io/certified: rancher catalog.cattle.io/display-name: Alerting Drivers