Add kubeVersionOverride to rke2IngressNginx to auto-infer deployment based on kubeVersion

pull/1826/head
Arvind Iyengar 2022-03-25 13:59:53 -07:00
parent 60a4cb98f8
commit a1493da0bd
No known key found for this signature in database
GPG Key ID: A8DD9BFD6C811498
1 changed files with 40 additions and 34 deletions

View File

@ -1,6 +1,6 @@
--- charts-original/values.yaml
+++ charts/values.yaml
@@ -2,13 +2,501 @@
@@ -2,13 +2,507 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
@ -356,11 +356,17 @@
+ namespaces:
+ - "kube-system"
+ # in the RKE2 cluster, the ingress-nginx-controller is deployed as
+ # a Deployment with 1 pod when RKE2 version is <= 1.20,
+ # a DaemonSet when RKE2 version is >= 1.21
+ # a DaemonSet with 1 pod when RKE2 version is <= 1.20,
+ # a Deployment when RKE2 version is >= 1.21
+ deployment:
+ enabled: false
+ enabled: true
+ replicas: 1
+ kubeVersionOverrides:
+ - constraint: "<= 1.20"
+ values:
+ clients:
+ deployment:
+ enabled: false
+
+
+
@ -504,7 +510,7 @@
## Provide a k8s version to auto dashboard import script example: kubeTargetVersionOverride: 1.16.6
##
@@ -93,8 +581,34 @@
@@ -93,8 +587,34 @@
##
global:
@ -539,7 +545,7 @@
pspEnabled: true
pspAnnotations: {}
## Specify pod annotations
@@ -187,25 +701,77 @@
@@ -187,25 +707,77 @@
## ref: https://prometheus.io/docs/alerting/notifications/
## https://prometheus.io/docs/alerting/notification_examples/
##
@ -636,7 +642,7 @@
ingress:
enabled: false
@@ -397,7 +963,7 @@
@@ -397,7 +969,7 @@
## Image of Alertmanager
##
image:
@ -645,7 +651,7 @@
tag: v0.22.2
sha: ""
@@ -509,9 +1075,13 @@
@@ -509,9 +1081,13 @@
## Define resources requests and limits for single Pods.
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
##
@ -662,7 +668,7 @@
## Pod anti-affinity can prevent the scheduler from placing Prometheus replicas on the same node.
## The default value "soft" means that the scheduler should *prefer* to not schedule two replica pods onto the same node but no guarantee is provided.
@@ -625,6 +1195,30 @@
@@ -625,6 +1201,30 @@
enabled: true
namespaceOverride: ""
@ -693,7 +699,7 @@
## ForceDeployDatasources Create datasource configmap even if grafana deployment has been disabled
##
forceDeployDatasources: false
@@ -637,6 +1231,18 @@
@@ -637,6 +1237,18 @@
##
defaultDashboardsEnabled: true
@ -712,7 +718,7 @@
## Timezone for the default dashboards
## Other options are: browser or a specific timezone, i.e. Europe/Luxembourg
##
@@ -681,6 +1287,7 @@
@@ -681,6 +1293,7 @@
dashboards:
enabled: true
label: grafana_dashboard
@ -720,7 +726,7 @@
## Annotations for Grafana dashboard configmaps
##
@@ -739,7 +1346,60 @@
@@ -739,7 +1352,60 @@
## Passed to grafana subchart and used by servicemonitor below
##
service:
@ -782,7 +788,7 @@
## If true, create a serviceMonitor for grafana
##
@@ -773,6 +1433,17 @@
@@ -773,6 +1439,17 @@
# replacement: $1
# action: replace
@ -800,7 +806,7 @@
## Component scraping the kube api server
##
kubeApiServer:
@@ -952,7 +1623,7 @@
@@ -952,7 +1629,7 @@
## Component scraping the kube controller manager
##
kubeControllerManager:
@ -809,7 +815,7 @@
## If your kube controller manager is not deployed as a pod, specify IPs it can be found on
##
@@ -1110,7 +1781,7 @@
@@ -1110,7 +1787,7 @@
## Component scraping etcd
##
kubeEtcd:
@ -818,7 +824,7 @@
## If your etcd is not deployed as a pod, specify IPs it can be found on
##
@@ -1177,7 +1848,7 @@
@@ -1177,7 +1854,7 @@
## Component scraping kube scheduler
##
kubeScheduler:
@ -827,7 +833,7 @@
## If your kube scheduler is not deployed as a pod, specify IPs it can be found on
##
@@ -1237,7 +1908,7 @@
@@ -1237,7 +1914,7 @@
## Component scraping kube proxy
##
kubeProxy:
@ -836,7 +842,7 @@
## If your kube proxy is not deployed as a pod, specify IPs it can be found on
##
@@ -1337,6 +2008,13 @@
@@ -1337,6 +2014,13 @@
create: true
podSecurityPolicy:
enabled: true
@ -850,7 +856,7 @@
## Deploy node exporter as a daemonset to all nodes
##
@@ -1392,6 +2070,16 @@
@@ -1392,6 +2076,16 @@
extraArgs:
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
- --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$
@ -867,7 +873,7 @@
## Manages Prometheus and Alertmanager components
##
@@ -1404,8 +2092,8 @@
@@ -1404,8 +2098,8 @@
enabled: true
# Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants
tlsMinVersion: VersionTLS13
@ -878,7 +884,7 @@
## Admission webhook support for PrometheusRules resources added in Prometheus Operator 0.30 can be enabled to prevent incorrectly formatted
## rules from making their way into prometheus and potentially preventing the container from starting
@@ -1422,9 +2110,9 @@
@@ -1422,9 +2116,9 @@
patch:
enabled: true
image:
@ -890,7 +896,7 @@
pullPolicy: IfNotPresent
resources: {}
## Provide a priority class name to the webhook patching job
@@ -1571,13 +2259,13 @@
@@ -1571,13 +2265,13 @@
## Resource limits & requests
##
@ -911,7 +917,7 @@
# Required for use in managed kubernetes clusters (such as AWS EKS) with custom CNI (such as calico),
# because control-plane managed by AWS cannot communicate with pods' IP CIDR and admission webhooks are not working
@@ -1630,7 +2318,7 @@
@@ -1630,7 +2324,7 @@
## Prometheus-operator image
##
image:
@ -920,7 +926,7 @@
tag: v0.50.0
sha: ""
pullPolicy: IfNotPresent
@@ -1646,7 +2334,7 @@
@@ -1646,7 +2340,7 @@
## Prometheus-config-reloader image to use for config and rule reloading
##
prometheusConfigReloaderImage:
@ -929,7 +935,7 @@
tag: v0.50.0
sha: ""
@@ -1661,7 +2349,7 @@
@@ -1661,7 +2355,7 @@
## Thanos side-car image when configured
##
thanosImage:
@ -938,7 +944,7 @@
tag: v0.17.2
sha: ""
@@ -1781,7 +2469,7 @@
@@ -1781,7 +2475,7 @@
port: 9090
## To be used with a proxy extraContainer port
@ -947,7 +953,7 @@
## List of IP addresses at which the Prometheus server service is available
## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
@@ -2054,7 +2742,7 @@
@@ -2054,7 +2748,7 @@
## Image of Prometheus.
##
image:
@ -956,7 +962,7 @@
tag: v2.28.1
sha: ""
@@ -2149,7 +2837,7 @@
@@ -2149,7 +2843,7 @@
## prometheus resource to be created with selectors based on values in the helm deployment,
## which will also match the PrometheusRule resources created
##
@ -965,7 +971,7 @@
## PrometheusRules to be selected for target discovery.
## If {}, select all PrometheusRules
@@ -2174,7 +2862,7 @@
@@ -2174,7 +2868,7 @@
## prometheus resource to be created with selectors based on values in the helm deployment,
## which will also match the servicemonitors created
##
@ -974,7 +980,7 @@
## ServiceMonitors to be selected for target discovery.
## If {}, select all ServiceMonitors
@@ -2197,7 +2885,7 @@
@@ -2197,7 +2891,7 @@
## prometheus resource to be created with selectors based on values in the helm deployment,
## which will also match the podmonitors created
##
@ -983,7 +989,7 @@
## PodMonitors to be selected for target discovery.
## If {}, select all PodMonitors
@@ -2328,9 +3016,13 @@
@@ -2328,9 +3022,13 @@
## Resource limits & requests
##
@ -1000,7 +1006,7 @@
## Prometheus StorageSpec for persistent data
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/storage.md
@@ -2353,7 +3045,13 @@
@@ -2353,7 +3051,13 @@
# medium: Memory
# Additional volumes on the output StatefulSet definition.
@ -1015,7 +1021,7 @@
# Additional VolumeMounts on the output StatefulSet definition.
volumeMounts: []
@@ -2475,9 +3173,34 @@
@@ -2475,9 +3179,34 @@
# fileName: "objstore.yaml"
# objectStorageConfigFile: /var/secrets/object-store.yaml
@ -1051,7 +1057,7 @@
## InitContainers allows injecting additional initContainers. This is meant to allow doing some changes
## (permissions, dir tree) on mounted volumes before starting prometheus
@@ -2485,7 +3208,7 @@
@@ -2485,7 +3214,7 @@
## PortName to use for Prometheus.
##