From 70a65d8ba53025e22465bed644b1106d4586dfe2 Mon Sep 17 00:00:00 2001 From: bragi92 Date: Wed, 27 Jul 2022 19:25:30 -0700 Subject: [PATCH] merge conflict --- .trivyignore | 24 ++++++++++++++++++---- ReleaseNotes.md | 4 ++++ charts/azuremonitor-containers/Chart.yaml | 2 +- charts/azuremonitor-containers/values.yaml | 2 +- kubernetes/linux/Dockerfile | 2 +- kubernetes/linux/Dockerfile.multiarch | 2 +- kubernetes/omsagent.yaml | 6 +++--- source/plugins/ruby/KubernetesApiClient.rb | 4 ++-- 8 files changed, 33 insertions(+), 13 deletions(-) diff --git a/.trivyignore b/.trivyignore index 91ee2f5bb..1b10c14d5 100644 --- a/.trivyignore +++ b/.trivyignore @@ -1,9 +1,25 @@ # telegraf vulnerabilities CVE-2019-3826 -CVE-2022-29190 -CVE-2022-29222 -CVE-2022-29189 CVE-2022-1996 -#dpkg vulnerability in ubuntu +# still present in mdsd telegraf +CVE-2021-42836 + +# ruby in /usr/lib +CVE-2020-36327 +CVE-2021-43809 +CVE-2021-41816 +CVE-2021-41819 +CVE-2021-31799 +CVE-2021-28965 + +# dpkg vulnerability in ubuntu CVE-2022-1304 + +# Adding for Hotfix : This needs to be fixed +CVE-2022-27191 +CVE-2022-29190 +CVE-2022-29222 +CVE-2022-31030 +CVE-2022-29189 +CVE-2022-29526 diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 39eeb6a50..dfa703a9f 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -11,6 +11,10 @@ additional questions or comments. Note : The agent version(s) below has dates (ciprod), which indicate the agent build dates (not release dates) +### 07/27/2022 - +##### Version microsoft/oms:ciprod06272022-hotfix Version mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod06272022-hotfix (linux) +- Fixes for sending the proper node allocatable cpu and memory value for the container which does not specify limits. + ### 06/27/2022 - ##### Version microsoft/oms:ciprod06272022 Version mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod06272022 (linux) ##### Code change log diff --git a/charts/azuremonitor-containers/Chart.yaml b/charts/azuremonitor-containers/Chart.yaml index a8268d63d..54159a6ce 100644 --- a/charts/azuremonitor-containers/Chart.yaml +++ b/charts/azuremonitor-containers/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 7.0.0-1 description: Helm chart for deploying Azure Monitor container monitoring agent in Kubernetes name: azuremonitor-containers -version: 2.9.4 +version: 2.9.5 kubeVersion: "^1.10.0-0" keywords: - monitoring diff --git a/charts/azuremonitor-containers/values.yaml b/charts/azuremonitor-containers/values.yaml index d528115cf..af94fad75 100644 --- a/charts/azuremonitor-containers/values.yaml +++ b/charts/azuremonitor-containers/values.yaml @@ -22,7 +22,7 @@ Azure: omsagent: image: repo: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod" - tag: "ciprod06272022" + tag: "ciprod06272022-hotfix" tagWindows: "win-ciprod06142022" pullPolicy: IfNotPresent dockerProviderVersion: "18.0.1-0" diff --git a/kubernetes/linux/Dockerfile b/kubernetes/linux/Dockerfile index 211d37259..162318a9e 100644 --- a/kubernetes/linux/Dockerfile +++ b/kubernetes/linux/Dockerfile @@ -18,7 +18,7 @@ ENV RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR 0.9 RUN /usr/bin/apt-get update && /usr/bin/apt-get install -y libc-bin wget openssl curl sudo python-ctypes init-system-helpers net-tools rsyslog cron vim dmidecode apt-transport-https gnupg && rm -rf /var/lib/apt/lists/* COPY setup.sh main.sh defaultpromenvvariables defaultpromenvvariables-rs defaultpromenvvariables-sidecar mdsd.xml envmdsd logrotate.conf $tmpdir/ -ARG IMAGE_TAG=ciprod06272022 +ARG IMAGE_TAG=ciprod06272022-hotfix ENV AGENT_VERSION ${IMAGE_TAG} WORKDIR ${tmpdir} diff --git a/kubernetes/linux/Dockerfile.multiarch b/kubernetes/linux/Dockerfile.multiarch index a89fd1781..dda458fa1 100644 --- a/kubernetes/linux/Dockerfile.multiarch +++ b/kubernetes/linux/Dockerfile.multiarch @@ -33,7 +33,7 @@ RUN /usr/bin/apt-get update && /usr/bin/apt-get install -y libc-bin wget openssl COPY --from=builder /src/kubernetes/linux/Linux_ULINUX_1.0_*_64_Release/docker-cimprov-*.*.*-*.*.sh $tmpdir/ COPY kubernetes/linux/setup.sh kubernetes/linux/main.sh kubernetes/linux/defaultpromenvvariables kubernetes/linux/defaultpromenvvariables-rs kubernetes/linux/defaultpromenvvariables-sidecar kubernetes/linux/mdsd.xml kubernetes/linux/envmdsd kubernetes/linux/logrotate.conf $tmpdir/ -ARG IMAGE_TAG=ciprod06272022 +ARG IMAGE_TAG=ciprod06272022-hotfix ENV AGENT_VERSION ${IMAGE_TAG} WORKDIR ${tmpdir} diff --git a/kubernetes/omsagent.yaml b/kubernetes/omsagent.yaml index 88d2fdda8..c11650b9e 100644 --- a/kubernetes/omsagent.yaml +++ b/kubernetes/omsagent.yaml @@ -379,7 +379,7 @@ spec: # - NET_ADMIN # - NET_RAW - name: omsagent - image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod06272022" + image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod06272022-hotfix" imagePullPolicy: IfNotPresent resources: limits: @@ -468,7 +468,7 @@ spec: timeoutSeconds: 15 #Only in sidecar scraping mode - name: omsagent-prometheus - image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod06272022" + image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod06272022-hotfix" imagePullPolicy: IfNotPresent resources: limits: @@ -653,7 +653,7 @@ spec: # - NET_ADMIN # - NET_RAW - name: omsagent - image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod06272022" + image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod06272022-hotfix" imagePullPolicy: IfNotPresent resources: limits: diff --git a/source/plugins/ruby/KubernetesApiClient.rb b/source/plugins/ruby/KubernetesApiClient.rb index 612035625..6828109b3 100644 --- a/source/plugins/ruby/KubernetesApiClient.rb +++ b/source/plugins/ruby/KubernetesApiClient.rb @@ -517,7 +517,7 @@ def getContainerResourceRequestsAndLimits(pod, metricCategory, metricNameToColle #No container level limit for the given metric, so default to node level limit else if (metricCategory == "limits" && !nodeAllocatableRecord.nil? && !nodeAllocatableRecord.empty? && nodeAllocatableRecord.has_key?(metricNameToCollect)) - metricValue = nodeAllocatableRecord[metricNameToCollect] + metricValue = getMetricNumericValue(metricNameToCollect, nodeAllocatableRecord[metricNameToCollect]) metricProps = {} metricProps["Timestamp"] = metricTime metricProps["Host"] = nodeName @@ -591,7 +591,7 @@ def getContainerResourceRequestsAndLimitsAsInsightsMetrics(pod, metricCategory, #No container level limit for the given metric, so default to node level limit for non-gpu metrics if (metricNameToCollect.downcase != "nvidia.com/gpu") && (metricNameToCollect.downcase != "amd.com/gpu") if !nodeAllocatableRecord.nil? && !nodeAllocatableRecord.empty? && nodeAllocatableRecord.has_key?(metricNameToCollect) - metricValue = nodeAllocatableRecord[metricNameToCollect] + metricValue = getMetricNumericValue(metricNameToCollect, nodeAllocatableRecord[metricNameToCollect]) end end end