File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -2069,6 +2069,15 @@ func CollectMasterTaintCompliance(client kubernetes.Interface) []ComplianceItem
20692069 return results
20702070 }
20712071
2072+ // Check if taint compliance check is disabled via config
2073+ if K8sHealthConfig .K8s .Taint != nil && ! * K8sHealthConfig .K8s .Taint {
2074+ log .Debug ().
2075+ Str ("component" , "k8sHealth" ).
2076+ Str ("operation" , "collect_master_taint_compliance" ).
2077+ Msg ("Master taint compliance check disabled by config" )
2078+ return results
2079+ }
2080+
20722081 nodes , err := client .CoreV1 ().Nodes ().List (context .TODO (), metav1.ListOptions {})
20732082 if err != nil {
20742083 log .Error ().Err (err ).Msg ("Error listing nodes for taint compliance" )
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ metadata:
55data :
66 k8s.yml : |
77 k8s:
8+ taint: true
89 namespaces:
910 - YOUR_NAMESPACE_1
1011 floating_ips:
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ type Config struct {
7171 Ingress_floating_ips []string
7272 Enable_cert_manager * bool // nil = auto-detect, true/false = force
7373 Enable_kube_vip * bool // nil = auto-detect, true/false = force
74+ Taint * bool // nil = true (default), false = skip check
7475 Check_namespaces []string `mapstructure:"namespaces"`
7576 }
7677
You can’t perform that action at this time.
0 commit comments