Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: remove uneeded windows scrape config in replicaset #619

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
- kaveesh/fix_win
pr:
autoCancel: true
branches:
Expand Down
18 changes: 0 additions & 18 deletions otelcollector/configmapparser/prometheus-config-merger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,6 @@ def populateDefaultPrometheusConfig
contents = contents.gsub("$$NODE_NAME$$", ENV["NODE_NAME"])
File.open(@windowsexporterDefaultDsFile, "w") { |file| file.puts contents }
defaultConfigs.push(@windowsexporterDefaultDsFile)

# If advanced mode is enabled, but not the windows daemonset, scrape windows kubelet from the replicaset as if it's simple mode
elsif currentControllerType == @replicasetControllerType && advancedMode == true && windowsDaemonset == false && ENV["OS_TYPE"].downcase == "linux"
UpdateScrapeIntervalConfig(@windowsexporterDefaultRsSimpleFile, windowsexporterScrapeInterval)
if !winexporterMetricsKeepListRegex.nil? && !winexporterMetricsKeepListRegex.empty?
AppendMetricRelabelConfig(@windowsexporterDefaultRsSimpleFile, winexporterMetricsKeepListRegex)
end
defaultConfigs.push(@windowsexporterDefaultRsSimpleFile)
end
end

if !ENV["AZMON_PROMETHEUS_WINDOWSKUBEPROXY_SCRAPING_ENABLED"].nil? && ENV["AZMON_PROMETHEUS_WINDOWSKUBEPROXY_SCRAPING_ENABLED"].downcase == "true"
Expand All @@ -399,15 +390,6 @@ def populateDefaultPrometheusConfig
contents = contents.gsub("$$NODE_NAME$$", ENV["NODE_NAME"])
File.open(@windowskubeproxyDefaultDsFile, "w") { |file| file.puts contents }
defaultConfigs.push(@windowskubeproxyDefaultDsFile)

# If advanced mode is enabled, but not the windows daemonset, scrape windows kubelet from the replicaset as if it's simple mode
elsif currentControllerType == @replicasetControllerType && advancedMode == true && windowsDaemonset == false && ENV["OS_TYPE"].downcase == "linux"
UpdateScrapeIntervalConfig(@windowskubeproxyDefaultFileRsSimpleFile, windowskubeproxyScrapeInterval)
if !winkubeproxyMetricsKeepListRegex.nil? && !winkubeproxyMetricsKeepListRegex.empty?
AppendMetricRelabelConfig(@windowskubeproxyDefaultFileRsSimpleFile, winkubeproxyMetricsKeepListRegex)
end
defaultConfigs.push(@windowskubeproxyDefaultFileRsSimpleFile)
end
end

if !ENV["AZMON_PROMETHEUS_POD_ANNOTATION_SCRAPING_ENABLED"].nil? && ENV["AZMON_PROMETHEUS_POD_ANNOTATION_SCRAPING_ENABLED"].downcase == "true" && currentControllerType == @replicasetControllerType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ spec:
- name: MODE
value: "advanced" # only supported mode is 'advanced', any other value will be the default/non-advance mode
- name: WINMODE
value: "" # WINDOWS: only supported mode is 'advanced', any other value will be the default/non-advance mode
value: "advanced" # WINDOWS: only supported mode is 'advanced', any other value will be the default/non-advance mode
- name: MINIMAL_INGESTION_PROFILE
value: "true" # only supported value is the string "true"
securityContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ spec:
- name: MODE
value: "advanced" # only supported mode is 'advanced', any other value will be the default/non-advance mode
- name: WINMODE
value: "" # WINDOWS: only supported mode is 'advanced', any other value will be the default/non-advance mode
value: "advanced" # WINDOWS: only supported mode is 'advanced', any other value will be the default/non-advance mode
- name: MINIMAL_INGESTION_PROFILE
value: "true" # only supported value is the string "true"
securityContext:
Expand Down
Loading