Skip to content

Commit

Permalink
fix minimal profile being nil when no configmap/setting present
Browse files Browse the repository at this point in the history
  • Loading branch information
vishiy committed Dec 6, 2024
1 parent 9e7f9c9 commit 1206adb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .pipelines/azure-pipeline-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ trigger:
branches:
include:
- main
- vishwa/ccp-fix-2
pr:
autoCancel: true
branches:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,8 @@ func populateRegexValuesWithMinimalIngestionProfile(regexValues RegexValues) {

fmt.Println("populateRegexValuesWithMinimalIngestionProfile::minimalIngestionProfile:", regexValues.MinimalIngestionProfile)

if regexValues.MinimalIngestionProfile == "true" {
controlplaneKubeControllerManagerRegex += regexValues.ControlplaneKubeControllerManager + "|" + controlplaneKubeControllerManagerMinMac
controlplaneKubeSchedulerRegex += regexValues.ControlplaneKubeScheduler + "|" + controlplaneKubeSchedulerMinMac
controlplaneApiserverRegex += regexValues.ControlplaneApiserver + "|" + controlplaneApiserverMinMac
controlplaneClusterAutoscalerRegex += regexValues.ControlplaneClusterAutoscaler + "|" + controlplaneClusterAutoscalerMinMac
controlplaneEtcdRegex += regexValues.ControlplaneEtcd + "|" + controlplaneEtcdMinMac
if regexValues.MinimalIngestionProfile == "false" {

} else {
controlplaneKubeControllerManagerRegex += regexValues.ControlplaneKubeControllerManager
controlplaneKubeSchedulerRegex += regexValues.ControlplaneKubeScheduler
controlplaneApiserverRegex += regexValues.ControlplaneApiserver
Expand All @@ -136,6 +130,15 @@ func populateRegexValuesWithMinimalIngestionProfile(regexValues RegexValues) {
fmt.Println("ControlplaneApiserverRegex:", controlplaneApiserverRegex)
fmt.Println("ControlplaneClusterAutoscalerRegex:", controlplaneClusterAutoscalerRegex)
fmt.Println("ControlplaneEtcdRegex:", controlplaneEtcdRegex)

} else { //else accounts for "true" and any other values including "nil" (meaning no configmap or no minimal setting in the configmap)

controlplaneKubeControllerManagerRegex += regexValues.ControlplaneKubeControllerManager + "|" + controlplaneKubeControllerManagerMinMac
controlplaneKubeSchedulerRegex += regexValues.ControlplaneKubeScheduler + "|" + controlplaneKubeSchedulerMinMac
controlplaneApiserverRegex += regexValues.ControlplaneApiserver + "|" + controlplaneApiserverMinMac
controlplaneClusterAutoscalerRegex += regexValues.ControlplaneClusterAutoscaler + "|" + controlplaneClusterAutoscalerMinMac
controlplaneEtcdRegex += regexValues.ControlplaneEtcd + "|" + controlplaneEtcdMinMac

}
}

Expand Down

0 comments on commit 1206adb

Please sign in to comment.