From 9767b57dc18122955352137f4b795a048d481b7a Mon Sep 17 00:00:00 2001 From: NicAtMS Date: Thu, 5 Mar 2026 13:45:39 -0800 Subject: [PATCH 1/9] value and template updates for t-shirt sizing on container insights --- .../templates/_helpers.tpl | 127 +++++++++++- .../templates/ama-logs-daemonset-aks.yaml | 23 ++- .../templates/ama-logs-daemonset.yaml | 26 +-- .../values.yaml | 186 +++++++++++------- 4 files changed, 260 insertions(+), 102 deletions(-) diff --git a/charts/azuremonitor-containerinsights/templates/_helpers.tpl b/charts/azuremonitor-containerinsights/templates/_helpers.tpl index b859282a6..cf70629e6 100644 --- a/charts/azuremonitor-containerinsights/templates/_helpers.tpl +++ b/charts/azuremonitor-containerinsights/templates/_helpers.tpl @@ -103,4 +103,129 @@ HOST CA CERTIFICATE MOUNTING SECTION (from AKS chart) {{- define "should_mount_hostca" -}} {{- $cloud_environment := (.Values.global.commonGlobals.CloudEnvironment | default "azurepubliccloud" | lower) }} {{- has $cloud_environment (list "usnat" "ussec" "azurebleucloud") -}} -{{- end }} \ No newline at end of file +{{- end }} +{{/* +============================================================================= +RESOURCE QUANTITY HELPERS (for toggle processing) +============================================================================= +*/}} + +{{/* +Compare two resource quantities and return the maximum. +This replicates the Go maxResourceValue function using Kubernetes resource.ParseQuantity logic. +Supports all Kubernetes quantity formats: decimal fractions, binary/decimal units, CPU millicores. +Usage: {{ include "maxResourceValue" (list "1.5Gi" "2196Mi") }} +*/}} +{{- define "maxResourceValue" -}} +{{- $val1 := index . 0 -}} +{{- $val2 := index . 1 -}} + +{{/* Parse val1 to bytes/millicores */}} +{{- $val1Parsed := include "parseQuantity" $val1 -}} +{{- $val2Parsed := include "parseQuantity" $val2 -}} + +{{/* Compare parsed values */}} +{{- if ge ($val1Parsed | int64) ($val2Parsed | int64) -}} +{{- $val1 -}} +{{- else -}} +{{- $val2 -}} +{{- end -}} +{{- end }} + +{{/* +Parse a Kubernetes resource quantity to comparable integer value. +Mimics k8s.io/apimachinery/pkg/api/resource.ParseQuantity behavior. +Returns value in smallest unit (bytes for memory, millicores for CPU). +*/}} +{{- define "parseQuantity" -}} +{{- $quantity := . -}} +{{- $quantity = trim $quantity -}} + +{{/* Handle zero/empty */}} +{{- if or (eq $quantity "") (eq $quantity "0") -}} +0 +{{- else -}} + +{{/* Extract number and suffix */}} +{{- $number := "" -}} +{{- $suffix := "" -}} +{{- $i := 0 -}} +{{- range $char := (split "" $quantity) -}} + {{- if or (eq $char "0") (eq $char "1") (eq $char "2") (eq $char "3") (eq $char "4") (eq $char "5") (eq $char "6") (eq $char "7") (eq $char "8") (eq $char "9") (eq $char ".") -}} + {{- $number = printf "%s%s" $number $char -}} + {{- else -}} + {{- $suffix = substr $i -1 $quantity -}} + {{- break -}} + {{- end -}} + {{- $i = add $i 1 -}} +{{- end -}} + +{{/* Handle case where no suffix found (pure number) */}} +{{- if eq $suffix "" -}} + {{- $suffix = "" -}} +{{- end -}} + +{{/* Parse the numeric part - handle decimals */}} +{{- $intPart := 0 -}} +{{- $fracPart := 0 -}} +{{- $fracDivisor := 1 -}} + +{{- if contains "." $number -}} + {{- $parts := split "." $number -}} + {{- $intPart = index $parts 0 | int -}} + {{- $fracStr := index $parts 1 -}} + {{- $fracPart = $fracStr | int -}} + {{- $fracDivisor = pow 10 (len $fracStr) -}} +{{- else -}} + {{- $intPart = $number | int -}} +{{- end -}} + +{{/* Convert based on suffix - return in base units (bytes for memory, millicores for CPU) */}} +{{- $result := 0 -}} + +{{/* Binary suffixes (1024-based) */}} +{{- if eq $suffix "Ki" -}} + {{- $result = add (mul $intPart 1024) (div (mul $fracPart 1024) $fracDivisor) -}} +{{- else if eq $suffix "Mi" -}} + {{- $result = add (mul $intPart 1048576) (div (mul $fracPart 1048576) $fracDivisor) -}} +{{- else if eq $suffix "Gi" -}} + {{- $result = add (mul $intPart 1073741824) (div (mul $fracPart 1073741824) $fracDivisor) -}} +{{- else if eq $suffix "Ti" -}} + {{- $result = add (mul $intPart 1099511627776) (div (mul $fracPart 1099511627776) $fracDivisor) -}} +{{- else if eq $suffix "Pi" -}} + {{- $result = add (mul $intPart 1125899906842624) (div (mul $fracPart 1125899906842624) $fracDivisor) -}} + +{{/* Decimal suffixes (1000-based) */}} +{{- else if eq $suffix "k" -}} + {{- $result = add (mul $intPart 1000) (div (mul $fracPart 1000) $fracDivisor) -}} +{{- else if eq $suffix "M" -}} + {{- $result = add (mul $intPart 1000000) (div (mul $fracPart 1000000) $fracDivisor) -}} +{{- else if eq $suffix "G" -}} + {{- $result = add (mul $intPart 1000000000) (div (mul $fracPart 1000000000) $fracDivisor) -}} +{{- else if eq $suffix "T" -}} + {{- $result = add (mul $intPart 1000000000000) (div (mul $fracPart 1000000000000) $fracDivisor) -}} +{{- else if eq $suffix "P" -}} + {{- $result = add (mul $intPart 1000000000000000) (div (mul $fracPart 1000000000000000) $fracDivisor) -}} + +{{/* CPU millicores */}} +{{- else if eq $suffix "m" -}} + {{- $result = add (mul $intPart 1) (div $fracPart $fracDivisor) -}} + +{{/* No suffix - treat as base unit */}} +{{- else if eq $suffix "" -}} + {{- if contains "." $number -}} + {{/* Decimal number without suffix - assume CPU cores, convert to millicores */}} + {{- $result = add (mul $intPart 1000) (div (mul $fracPart 1000) $fracDivisor) -}} + {{- else -}} + {{/* Integer without suffix - could be bytes or cores */}} + {{- $result = $intPart -}} + {{- end -}} + +{{/* Unknown suffix - treat as base unit */}} +{{- else -}} + {{- $result = $intPart -}} +{{- end -}} + +{{- $result -}} +{{- end -}} +{{- end }} diff --git a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml index 544681ca3..c13ed4b14 100644 --- a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml +++ b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml @@ -7,14 +7,13 @@ {{- end -}} --- {{/* Get sizes */}} -{{- $useDaemonSetSizing := and .Values.global.commonGlobals.isAutomaticSKU .Values.OmsAgent.enableDaemonSetSizing -}} -{{- $singleSize := dict "containers" (dict "addon-token-adapter" (dict "cpuLimit" "100m" "memoryLimit" "100Mi" "cpuRequest" "20m" "memoryRequest" "50Mi") "ama-logs" (dict "cpuLimit" .Values.OmsAgent.omsAgentDsCPULimitLinux "memoryLimit" .Values.OmsAgent.omsAgentDsMemoryLimitLinux "cpuRequest" "75m" "memoryRequest" "325Mi") "ama-logs-prometheus" (dict "cpuLimit" .Values.OmsAgent.omsAgentPrometheusSidecarCPULimit "memoryLimit" .Values.OmsAgent.omsAgentPrometheusSidecarMemoryLimit "cpuRequest" "75m" "memoryRequest" "225Mi")) -}} -{{- $sizes := list ($singleSize) -}} -{{/* - if $useDaemonSetSizing - */}} - {{/* - $singleSize = .Values.OmsAgent.daemonSetSizingValues.singleSize - */}} - {{/* - $sizes = list ($singleSize) - */}} - {{/* - $sizes = prepend .Values.OmsAgent.daemonSetSizingValues.tShirtSizes $singleSize - */}} -{{/* - end - */}} +{{- $useDaemonSetSizing := and (eq .Values.Azure.Cluster.Kind "automatic") .Values.OmsAgent.enableDaemonSetSizing -}} +{{- $singleSize := .Values.OmsAgent.daemonSetSizingValues.singleSize -}} +{{- if $useDaemonSetSizing -}} + {{- $sizes = prepend .Values.OmsAgent.daemonSetSizingValues.tShirtSizes $singleSize -}} +{{- else -}} + {{- $sizes = list $singleSize -}} +{{- end -}} {{/* Generate DaemonSets */}} {{- $prevmaxCPU := 0 -}} {{- range $index, $size := $sizes -}} @@ -131,8 +130,8 @@ spec: resources: limits: {{- $containerResources := index $size.containers "ama-logs" }} - cpu: {{ $containerResources.cpuLimit }} - memory: {{ $containerResources.memoryLimit }} + cpu: {{ include "maxResourceValue" (list ($.Values.omsagent-ds-cpu-limit-linux | default "500m") $containerResources.cpuLimit) }} + memory: {{ include "maxResourceValue" (list ($.Values.omsagent-ds-memory-limit-linux | default "1Gi") $containerResources.memoryLimit) }} requests: {{- $containerResources := index $size.containers "ama-logs" }} cpu: {{ $containerResources.cpuRequest }} @@ -312,8 +311,8 @@ spec: resources: limits: {{- $containerResources := index $size.containers "ama-logs-prometheus" }} - cpu: {{ $containerResources.cpuLimit }} - memory: {{ $containerResources.memoryLimit }} + cpu: {{ include "maxResourceValue" (list ($.Values.omsagent-prometheus-sidecar-cpu-limit | default "500m") $containerResources.cpuLimit) }} + memory: {{ include "maxResourceValue" (list ($.Values.omsagent-prometheus-sidecar-memory-limit | default "1Gi") $containerResources.memoryLimit) }} requests: {{- $containerResources := index $size.containers "ama-logs-prometheus" }} cpu: {{ $containerResources.cpuRequest }} diff --git a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml index f46d6c8c1..ff96bc4b0 100644 --- a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml +++ b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml @@ -17,14 +17,14 @@ {{- if or (not $isArcExtension) (and $isArcExtension (and (ne .Values.amalogs.secret.key "") (ne .Values.amalogs.secret.wsid "") (or (ne .Values.amalogs.env.clusterName "") (ne .Values.amalogs.env.clusterId "") (ne .Values.Azure.Cluster.ResourceId "")))) }} {{/* AKS DaemonSet Sizing - only for AKS */}} {{- if not $isArcExtension }} -{{- $useDaemonSetSizing := and .Values.global.commonGlobals.isAutomaticSKU .Values.OmsAgent.enableDaemonSetSizing -}} -{{- $singleSize := dict "containers" (dict "addon-token-adapter" (dict "cpuLimit" "100m" "memoryLimit" "100Mi" "cpuRequest" "20m" "memoryRequest" "50Mi") "ama-logs" (dict "cpuLimit" .Values.OmsAgent.omsAgentDsCPULimitLinux "memoryLimit" .Values.OmsAgent.omsAgentDsMemoryLimitLinux "cpuRequest" "75m" "memoryRequest" "325Mi") "ama-logs-prometheus" (dict "cpuLimit" .Values.OmsAgent.omsAgentPrometheusSidecarCPULimit "memoryLimit" .Values.OmsAgent.omsAgentPrometheusSidecarMemoryLimit "cpuRequest" "75m" "memoryRequest" "225Mi")) -}} -{{- $sizes := list ($singleSize) -}} -{{/* - if $useDaemonSetSizing - */}} - {{/* - $singleSize = .Values.OmsAgent.daemonSetSizingValues.singleSize - */}} - {{/* - $sizes = list ($singleSize) - */}} - {{/* - $sizes = prepend .Values.OmsAgent.daemonSetSizingValues.tShirtSizes $singleSize - */}} -{{/* - end - */}} +{{- $useDaemonSetSizing := and (eq .Values.Azure.Cluster.Kind "automatic") .Values.OmsAgent.enableDaemonSetSizing -}} +{{- $singleSize := .Values.OmsAgent.daemonSetSizingValues.singleSize -}} +{{- $sizes := list $singleSize -}} +{{- if $useDaemonSetSizing -}} + {{- $sizes = prepend .Values.OmsAgent.daemonSetSizingValues.tShirtSizes $singleSize -}} +{{- else -}} + {{- $sizes = list $singleSize -}} +{{- end -}} {{/* Generate DaemonSets */}} {{- $prevmaxCPU := 0 -}} {{- range $index, $size := $sizes -}} @@ -245,8 +245,8 @@ spec: resources: limits: {{- $containerResources := index $size.containers "ama-logs" }} - cpu: {{ $containerResources.cpuLimit }} - memory: {{ $containerResources.memoryLimit }} + cpu: {{ include "maxResourceValue" (list ($.Values.omsagent-ds-cpu-limit-linux | default "500m") $containerResources.cpuLimit) }} + memory: {{ include "maxResourceValue" (list ($.Values.omsagent-ds-memory-limit-linux | default "1Gi") $containerResources.memoryLimit) }} requests: {{- $containerResources := index $size.containers "ama-logs" }} cpu: {{ $containerResources.cpuRequest }} @@ -658,8 +658,8 @@ spec: resources: limits: {{- $containerResources := index $size.containers "ama-logs-prometheus" }} - cpu: {{ $containerResources.cpuLimit }} - memory: {{ $containerResources.memoryLimit }} + cpu: {{ include "maxResourceValue" (list ($.Values.omsagent-prometheus-sidecar-cpu-limit | default "500m") $containerResources.cpuLimit) }} + memory: {{ include "maxResourceValue" (list ($.Values.omsagent-prometheus-sidecar-memory-limit | default "1Gi") $containerResources.memoryLimit) }} requests: {{- $containerResources := index $size.containers "ama-logs-prometheus" }} cpu: {{ $containerResources.cpuRequest }} @@ -787,7 +787,7 @@ spec: {{- end }} {{- end }} {{- else }} -{{- $useDaemonSetSizing := and .Values.global.commonGlobals.isAutomaticSKU .Values.OmsAgent.enableDaemonSetSizing -}} +{{- $useDaemonSetSizing := and (eq .Values.Azure.Cluster.Kind "automatic") .Values.OmsAgent.enableDaemonSetSizing -}} {{- $singleSize := dict "name" "" -}} affinity: nodeAffinity: diff --git a/charts/azuremonitor-containerinsights/values.yaml b/charts/azuremonitor-containerinsights/values.yaml index f50ca8e51..2b6b05fd4 100644 --- a/charts/azuremonitor-containerinsights/values.yaml +++ b/charts/azuremonitor-containerinsights/values.yaml @@ -100,82 +100,115 @@ OmsAgent: # identityClientID: "" # accessTokenSecretName: "aad-msi-auth-token" - # # DaemonSet sizing configuration - # enableDaemonSetSizing: false - # daemonSetSizingValues: - # singleSize: - # containers: - # addon-token-adapter: - # cpuLimit: "100m" - # memoryLimit: "100Mi" - # cpuRequest: "20m" - # memoryRequest: "50Mi" - # ama-logs: - # cpuLimit: "150m" - # memoryLimit: "750Mi" - # cpuRequest: "75m" - # memoryRequest: "325Mi" - # ama-logs-prometheus: - # cpuLimit: "500m" - # memoryLimit: "1Gi" - # cpuRequest: "75m" - # memoryRequest: "225Mi" - # tShirtSizes: - # - name: "small" - # maxCPU: 4 - # containers: - # addon-token-adapter: - # cpuLimit: "100m" - # memoryLimit: "100Mi" - # cpuRequest: "20m" - # memoryRequest: "50Mi" - # ama-logs: - # cpuLimit: "150m" - # memoryLimit: "750Mi" - # cpuRequest: "75m" - # memoryRequest: "325Mi" - # ama-logs-prometheus: - # cpuLimit: "500m" - # memoryLimit: "1Gi" - # cpuRequest: "75m" - # memoryRequest: "225Mi" - # - name: "medium" - # maxCPU: 8 - # containers: - # addon-token-adapter: - # cpuLimit: "200m" - # memoryLimit: "200Mi" - # cpuRequest: "40m" - # memoryRequest: "100Mi" - # ama-logs: - # cpuLimit: "300m" - # memoryLimit: "1.5Gi" - # cpuRequest: "150m" - # memoryRequest: "650Mi" - # ama-logs-prometheus: - # cpuLimit: "1" - # memoryLimit: "2Gi" - # cpuRequest: "150m" - # memoryRequest: "450Mi" - # - name: "large" - # maxCPU: 16 - # containers: - # addon-token-adapter: - # cpuLimit: "400m" - # memoryLimit: "400Mi" - # cpuRequest: "80m" - # memoryRequest: "200Mi" - # ama-logs: - # cpuLimit: "600m" - # memoryLimit: "3Gi" - # cpuRequest: "300m" - # memoryRequest: "1.3Gi" - # ama-logs-prometheus: - # cpuLimit: "2" - # memoryLimit: "4Gi" - # cpuRequest: "300m" - # memoryRequest: "900Mi" - + # DaemonSet sizing configuration + daemonSetSizingValues: + singleSize: + containers: + addon-token-adapter: + cpuLimit: "100m" + memoryLimit: "100Mi" + cpuRequest: "20m" + memoryRequest: "50Mi" + ama-logs: + cpuLimit: "0" # Toggle always wins - no tier minimum + memoryLimit: "0" # Toggle always wins - no tier minimum + cpuRequest: "75m" + memoryRequest: "325Mi" + ama-logs-prometheus: + cpuLimit: "0" # Toggle always wins - no tier minimum + memoryLimit: "0" # Toggle always wins - no tier minimum + cpuRequest: "75m" + memoryRequest: "225Mi" + tShirtSizes: + - name: "xs" + maxCPU: 2 + containers: + addon-token-adapter: + cpuLimit: "100m" + memoryLimit: "100Mi" + cpuRequest: "10m" + memoryRequest: "20Mi" + ama-logs: + cpuLimit: "0" # Toggle always wins - no tier minimum + memoryLimit: "0" # Toggle always wins - no tier minimum + cpuRequest: "45m" + memoryRequest: "343Mi" + ama-logs-prometheus: + cpuLimit: "0" # Toggle always wins - no tier minimum + memoryLimit: "0" # Toggle always wins - no tier minimum + cpuRequest: "20m" + memoryRequest: "100Mi" + - name: "s" + maxCPU: 4 + containers: + addon-token-adapter: + cpuLimit: "100m" + memoryLimit: "100Mi" + cpuRequest: "10m" + memoryRequest: "20Mi" + ama-logs: + cpuLimit: "0" # Toggle always wins - no tier minimum + memoryLimit: "0" # Toggle always wins - no tier minimum + cpuRequest: "100m" + memoryRequest: "476Mi" + ama-logs-prometheus: + cpuLimit: "0" # Toggle always wins - no tier minimum + memoryLimit: "0" # Toggle always wins - no tier minimum + cpuRequest: "20m" + memoryRequest: "100Mi" + - name: "m" + maxCPU: 8 + containers: + addon-token-adapter: + cpuLimit: "100m" + memoryLimit: "100Mi" + cpuRequest: "10m" + memoryRequest: "20Mi" + ama-logs: + cpuLimit: "0" # Toggle always wins - no tier minimum + memoryLimit: "2196Mi" # Tier-specific minimum - will be max of toggle vs this + cpuRequest: "161m" + memoryRequest: "978Mi" + ama-logs-prometheus: + cpuLimit: "0" # Toggle always wins - no tier minimum + memoryLimit: "0" # Toggle always wins - no tier minimum + cpuRequest: "20m" + memoryRequest: "100Mi" + - name: "l" + maxCPU: 16 + containers: + addon-token-adapter: + cpuLimit: "100m" + memoryLimit: "100Mi" + cpuRequest: "10m" + memoryRequest: "20Mi" + ama-logs: + cpuLimit: "0" # Toggle always wins - no tier minimum + memoryLimit: "2356Mi" # Tier-specific minimum - will be max of toggle vs this + cpuRequest: "229m" + memoryRequest: "1058Mi" + ama-logs-prometheus: + cpuLimit: "0" # Toggle always wins - no tier minimum + memoryLimit: "0" # Toggle always wins - no tier minimum + cpuRequest: "20m" + memoryRequest: "100Mi" + - name: "xl" + containers: + addon-token-adapter: + cpuLimit: "100m" + memoryLimit: "100Mi" + cpuRequest: "10m" + memoryRequest: "20Mi" + ama-logs: + cpuLimit: "0" # Toggle always wins - no tier minimum + memoryLimit: "2918Mi" # Tier-specific minimum - will be max of toggle vs this + cpuRequest: "404m" + memoryRequest: "1339Mi" + ama-logs-prometheus: + cpuLimit: "0" # Toggle always wins - no tier minimum + memoryLimit: "0" # Toggle always wins - no tier minimum + cpuRequest: "20m" + memoryRequest: "100Mi" # ============================================================================ # amalogs - ARC K8S EXTENSION VALUES (from azuremonitor-containers) # Exact order preserved from Arc chart @@ -376,6 +409,7 @@ Azure: Cloud: Region: ResourceId: + Kind: "base" # Can be "automatic" or "base" Distribution: "" # e.g., "openshift", "aks_edge_k3s", "aks_edge_k8s", etc. Extension: Name: "" From a5750e7d8000ed7ec13b5bf7437f50252b422ab0 Mon Sep 17 00:00:00 2001 From: NicAtMS Date: Thu, 5 Mar 2026 13:58:45 -0800 Subject: [PATCH 2/9] enable t-shirt sizing --- .../templates/ama-logs-daemonset-aks.yaml | 12 ++++++------ charts/azuremonitor-containerinsights/values.yaml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml index c13ed4b14..fe037a03c 100644 --- a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml +++ b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml @@ -35,11 +35,11 @@ metadata: kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile {{- end }} - {{/* + {{ {{- if and $useDaemonSetSizing $size.name }} kubernetes.azure.com/ds-tshirt-size: {{ $size.name }} {{- end }} - */}} + }} name: ama-logs{{/* {{- if and $useDaemonSetSizing $size.name }}-{{ $size.name }}{{- end }} */}} namespace: kube-system spec: @@ -47,11 +47,11 @@ spec: matchLabels: component: ama-logs-agent tier: node - {{/* + {{ {{- if and $useDaemonSetSizing $size.name }} kubernetes.azure.com/ds-tshirt-size: {{ $size.name }} {{- end }} - */}} + }} template: metadata: annotations: @@ -64,11 +64,11 @@ spec: component: ama-logs-agent tier: node kubernetes.azure.com/managedby: aks - {{/* + {{ {{- if and $useDaemonSetSizing $size.name }} kubernetes.azure.com/ds-tshirt-size: {{ $size.name }} {{- end }} - */}} + }} {{- if semverCompare "<1.11.0" $.Values.global.commonGlobals.Versions.Kubernetes }} annotations: scheduler.alpha.kubernetes.io/critical-pod: "" diff --git a/charts/azuremonitor-containerinsights/values.yaml b/charts/azuremonitor-containerinsights/values.yaml index 2b6b05fd4..9cc83e245 100644 --- a/charts/azuremonitor-containerinsights/values.yaml +++ b/charts/azuremonitor-containerinsights/values.yaml @@ -30,7 +30,7 @@ legacyAddonDelivery: false # OmsAgent configuration OmsAgent: aksResourceID: - enableDaemonSetSizing: false + enableDaemonSetSizing: true isCustomMetricsDisabled: false isUsingAADAuth: "true" retinaFlowLogsEnabled: false From 309c92cb1fc898246329cf34c75a8962430d4d96 Mon Sep 17 00:00:00 2001 From: NicAtMS Date: Wed, 11 Mar 2026 13:04:27 -0700 Subject: [PATCH 3/9] toggle fix --- .../templates/ama-logs-daemonset-aks.yaml | 8 ++++---- .../templates/ama-logs-daemonset.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml index fe037a03c..25606cfc0 100644 --- a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml +++ b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml @@ -130,8 +130,8 @@ spec: resources: limits: {{- $containerResources := index $size.containers "ama-logs" }} - cpu: {{ include "maxResourceValue" (list ($.Values.omsagent-ds-cpu-limit-linux | default "500m") $containerResources.cpuLimit) }} - memory: {{ include "maxResourceValue" (list ($.Values.omsagent-ds-memory-limit-linux | default "1Gi") $containerResources.memoryLimit) }} + cpu: {{ include "maxResourceValue" (list $.Values.OmsAgent.omsAgentDsCPULimitLinux $containerResources.cpuLimit) }} + memory: {{ include "maxResourceValue" (list $.Values.OmsAgent.omsAgentDsMemoryLimitLinux $containerResources.memoryLimit) }} requests: {{- $containerResources := index $size.containers "ama-logs" }} cpu: {{ $containerResources.cpuRequest }} @@ -311,8 +311,8 @@ spec: resources: limits: {{- $containerResources := index $size.containers "ama-logs-prometheus" }} - cpu: {{ include "maxResourceValue" (list ($.Values.omsagent-prometheus-sidecar-cpu-limit | default "500m") $containerResources.cpuLimit) }} - memory: {{ include "maxResourceValue" (list ($.Values.omsagent-prometheus-sidecar-memory-limit | default "1Gi") $containerResources.memoryLimit) }} + cpu: {{ include "maxResourceValue" (list $.Values.OmsAgent.omsAgentPrometheusSidecarCPULimit $containerResources.cpuLimit) }} + memory: {{ include "maxResourceValue" (list $.Values.OmsAgent.omsAgentPrometheusSidecarMemoryLimit $containerResources.memoryLimit) }} requests: {{- $containerResources := index $size.containers "ama-logs-prometheus" }} cpu: {{ $containerResources.cpuRequest }} diff --git a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml index ff96bc4b0..1311807c3 100644 --- a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml +++ b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml @@ -245,8 +245,8 @@ spec: resources: limits: {{- $containerResources := index $size.containers "ama-logs" }} - cpu: {{ include "maxResourceValue" (list ($.Values.omsagent-ds-cpu-limit-linux | default "500m") $containerResources.cpuLimit) }} - memory: {{ include "maxResourceValue" (list ($.Values.omsagent-ds-memory-limit-linux | default "1Gi") $containerResources.memoryLimit) }} + cpu: {{ include "maxResourceValue" (list $.Values.OmsAgent.omsAgentDsCPULimitLinux $containerResources.cpuLimit) }} + memory: {{ include "maxResourceValue" (list $.Values.OmsAgent.omsAgentDsMemoryLimitLinux $containerResources.memoryLimit) }} requests: {{- $containerResources := index $size.containers "ama-logs" }} cpu: {{ $containerResources.cpuRequest }} @@ -658,8 +658,8 @@ spec: resources: limits: {{- $containerResources := index $size.containers "ama-logs-prometheus" }} - cpu: {{ include "maxResourceValue" (list ($.Values.omsagent-prometheus-sidecar-cpu-limit | default "500m") $containerResources.cpuLimit) }} - memory: {{ include "maxResourceValue" (list ($.Values.omsagent-prometheus-sidecar-memory-limit | default "1Gi") $containerResources.memoryLimit) }} + cpu: {{ include "maxResourceValue" (list $.Values.OmsAgent.omsAgentPrometheusSidecarCPULimit $containerResources.cpuLimit) }} + memory: {{ include "maxResourceValue" (list $.Values.OmsAgent.omsAgentPrometheusSidecarMemoryLimit $containerResources.memoryLimit) }} requests: {{- $containerResources := index $size.containers "ama-logs-prometheus" }} cpu: {{ $containerResources.cpuRequest }} From bc401b5890cfb7df7ce3a3d8790f24816ce90c06 Mon Sep 17 00:00:00 2001 From: NicAtMS Date: Fri, 13 Mar 2026 11:34:18 -0700 Subject: [PATCH 4/9] fixture testing bug fixes --- .../templates/_helpers.tpl | 11 +- .../templates/ama-logs-daemonset-aks.yaml | 9 +- .../templates/ama-logs-daemonset.yaml | 278 +++++++++--------- 3 files changed, 150 insertions(+), 148 deletions(-) diff --git a/charts/azuremonitor-containerinsights/templates/_helpers.tpl b/charts/azuremonitor-containerinsights/templates/_helpers.tpl index cf70629e6..7d2d16e55 100644 --- a/charts/azuremonitor-containerinsights/templates/_helpers.tpl +++ b/charts/azuremonitor-containerinsights/templates/_helpers.tpl @@ -154,7 +154,7 @@ Returns value in smallest unit (bytes for memory, millicores for CPU). {{- if or (eq $char "0") (eq $char "1") (eq $char "2") (eq $char "3") (eq $char "4") (eq $char "5") (eq $char "6") (eq $char "7") (eq $char "8") (eq $char "9") (eq $char ".") -}} {{- $number = printf "%s%s" $number $char -}} {{- else -}} - {{- $suffix = substr $i -1 $quantity -}} + {{- $suffix = substr ($i | int) (len $quantity | int) $quantity -}} {{- break -}} {{- end -}} {{- $i = add $i 1 -}} @@ -175,7 +175,14 @@ Returns value in smallest unit (bytes for memory, millicores for CPU). {{- $intPart = index $parts 0 | int -}} {{- $fracStr := index $parts 1 -}} {{- $fracPart = $fracStr | int -}} - {{- $fracDivisor = pow 10 (len $fracStr) -}} + {{- $fracLen := len $fracStr -}} + {{- if eq $fracLen 1 -}}{{- $fracDivisor = 10 -}} + {{- else if eq $fracLen 2 -}}{{- $fracDivisor = 100 -}} + {{- else if eq $fracLen 3 -}}{{- $fracDivisor = 1000 -}} + {{- else if eq $fracLen 4 -}}{{- $fracDivisor = 10000 -}} + {{- else if eq $fracLen 5 -}}{{- $fracDivisor = 100000 -}} + {{- else -}}{{- $fracDivisor = 1000000 -}} + {{- end -}} {{- else -}} {{- $intPart = $number | int -}} {{- end -}} diff --git a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml index 25606cfc0..bda340ed2 100644 --- a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml +++ b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml @@ -8,7 +8,8 @@ --- {{/* Get sizes */}} {{- $useDaemonSetSizing := and (eq .Values.Azure.Cluster.Kind "automatic") .Values.OmsAgent.enableDaemonSetSizing -}} -{{- $singleSize := .Values.OmsAgent.daemonSetSizingValues.singleSize -}} +{{- $singleSize := dict "containers" (dict "addon-token-adapter" (dict "cpuLimit" "100m" "memoryLimit" "100Mi" "cpuRequest" "20m" "memoryRequest" "50Mi") "ama-logs" (dict "cpuLimit" .Values.OmsAgent.omsAgentDsCPULimitLinux "memoryLimit" .Values.OmsAgent.omsAgentDsMemoryLimitLinux "cpuRequest" "75m" "memoryRequest" "325Mi") "ama-logs-prometheus" (dict "cpuLimit" .Values.OmsAgent.omsAgentPrometheusSidecarCPULimit "memoryLimit" .Values.OmsAgent.omsAgentPrometheusSidecarMemoryLimit "cpuRequest" "75m" "memoryRequest" "225Mi")) -}} +{{- $sizes := list $singleSize -}} {{- if $useDaemonSetSizing -}} {{- $sizes = prepend .Values.OmsAgent.daemonSetSizingValues.tShirtSizes $singleSize -}} {{- else -}} @@ -35,11 +36,9 @@ metadata: kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile {{- end }} - {{ {{- if and $useDaemonSetSizing $size.name }} kubernetes.azure.com/ds-tshirt-size: {{ $size.name }} {{- end }} - }} name: ama-logs{{/* {{- if and $useDaemonSetSizing $size.name }}-{{ $size.name }}{{- end }} */}} namespace: kube-system spec: @@ -47,11 +46,9 @@ spec: matchLabels: component: ama-logs-agent tier: node - {{ {{- if and $useDaemonSetSizing $size.name }} kubernetes.azure.com/ds-tshirt-size: {{ $size.name }} {{- end }} - }} template: metadata: annotations: @@ -64,11 +61,9 @@ spec: component: ama-logs-agent tier: node kubernetes.azure.com/managedby: aks - {{ {{- if and $useDaemonSetSizing $size.name }} kubernetes.azure.com/ds-tshirt-size: {{ $size.name }} {{- end }} - }} {{- if semverCompare "<1.11.0" $.Values.global.commonGlobals.Versions.Kubernetes }} annotations: scheduler.alpha.kubernetes.io/critical-pod: "" diff --git a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml index 1311807c3..142b50b6a 100644 --- a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml +++ b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml @@ -39,12 +39,12 @@ metadata: namespace: kube-system labels: {{- if $isArcExtension }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + chart: {{ $.Chart.Name }}-{{ $.Chart.Version | replace "+" "_" }} + release: {{ $.Release.Name }} + heritage: {{ $.Release.Service }} {{- else }} kubernetes.azure.com/managedby: aks -{{- if .Values.legacyAddonDelivery }} +{{- if $.Values.legacyAddonDelivery }} kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile {{- end }} @@ -93,17 +93,17 @@ spec: {{- end }} annotations: {{- if $isArcExtension }} - agentVersion: {{ .Values.amalogs.image.agentVersion }} - dockerProviderVersion: {{ .Values.amalogs.image.dockerProviderVersion }} + agentVersion: {{ $.Values.amalogs.image.agentVersion }} + dockerProviderVersion: {{ $.Values.amalogs.image.dockerProviderVersion }} schema-versions: "v1" checksum/secret: {{ include (print $.Template.BasePath "/ama-logs-secret.yaml") . | sha256sum }} - checksum/config: {{ toYaml .Values.amalogs.resources | sha256sum }} - checksum/logsettings: {{ toYaml .Values.amalogs.logsettings | sha256sum }} + checksum/config: {{ toYaml $.Values.amalogs.resources | sha256sum }} + checksum/logsettings: {{ toYaml $.Values.amalogs.logsettings | sha256sum }} {{- else }} agentVersion: "azure-mdsd-1.37.0" dockerProviderVersion: "18.0.1-0" schema-versions: "v1" - WSID: {{ .Values.OmsAgent.workspaceID | b64enc | quote }} + WSID: {{ $.Values.OmsAgent.workspaceID | b64enc | quote }} kubernetes.azure.com/no-http-proxy-vars: "true" {{- end }} spec: @@ -113,7 +113,7 @@ spec: priorityClassName: system-node-critical {{- end }} {{- if $isArcExtension }} -{{- if .Values.amalogs.rbac }} +{{- if $.Values.amalogs.rbac }} serviceAccountName: ama-logs {{- end }} {{- else }} @@ -126,8 +126,8 @@ spec: containers: {{/* Addon Token Adapter Container */}} {{- if $isArcExtension }} -{{- if and (ne .Values.Azure.Cluster.ResourceId "") (.Values.amalogs.useAADAuth) }} - {{- if not (eq .Values.Azure.Cluster.Distribution "openshift") }} +{{- if and (ne $.Values.Azure.Cluster.ResourceId "") ($.Values.amalogs.useAADAuth) }} + {{- if not (eq $.Values.Azure.Cluster.Distribution "openshift") }} - name: addon-token-adapter imagePullPolicy: IfNotPresent env: @@ -135,7 +135,7 @@ spec: value: "false" - name: TOKEN_NAMESPACE value: "azure-arc" -{{- .Values.Azure.Identity.MSIAdapterYaml | nindent 10 }} +{{- $.Values.Azure.Identity.MSIAdapterYaml | nindent 10 }} {{- else }} - name: msi-adapter env: @@ -146,11 +146,11 @@ spec: - name: CLUSTER_IDENTITY value: "false" - name: CLUSTER_TYPE - value: {{ (split "/" .Values.Azure.Cluster.ResourceId)._7 }} + value: {{ (split "/" $.Values.Azure.Cluster.ResourceId)._7 }} - name: EXTENSION_ARMID - value: {{ .Values.Azure.Extension.ResourceId }} + value: {{ $.Values.Azure.Extension.ResourceId }} - name: EXTENSION_NAME - value: {{ .Values.Azure.Extension.Name }} + value: {{ $.Values.Azure.Extension.Name }} - name: MSI_ADAPTER_LISTENING_PORT value: "8421" - name: MANAGED_IDENTITY_AUTH @@ -196,11 +196,11 @@ spec: - /addon-token-adapter args: - --secret-namespace=kube-system - - --secret-name={{ .Values.OmsAgent.accessTokenSecretName }} + - --secret-name={{ $.Values.OmsAgent.accessTokenSecretName }} - --token-server-listening-port=8888 - --health-server-listening-port=9999 - --restart-pod-waiting-minutes-on-broken-connection=240 - image: "{{ template "addon_mcr_repository_base" . }}/aks/msi/addon-token-adapter:{{- $addonTokenAdapterLinuxDefaultImageTag -}}" + image: "{{ template "addon_mcr_repository_base" $ }}/aks/msi/addon-token-adapter:{{- $addonTokenAdapterLinuxDefaultImageTag -}}" imagePullPolicy: IfNotPresent env: - name: AZMON_COLLECT_ENV @@ -231,13 +231,13 @@ spec: {{/* Main ama-logs Container */}} - name: ama-logs {{- if $isArcExtension }} - image: {{ printf "%s:%s" .Values.amalogs.image.repo .Values.amalogs.image.tag }} + image: {{ printf "%s:%s" $.Values.amalogs.image.repo $.Values.amalogs.image.tag }} imagePullPolicy: IfNotPresent resources: -{{ toYaml .Values.amalogs.resources.daemonsetlinux | indent 12 }} +{{ toYaml $.Values.amalogs.resources.daemonsetlinux | indent 12 }} {{- else }} - image: "{{ template "addon_mcr_repository_base" . }}/azuremonitor/containerinsights/ciprod:{{- default $amalogsLinuxDefaultImageTag .Values.OmsAgent.imageTagLinux -}}" - {{- if .Values.OmsAgent.isImagePullPolicyAlways }} + image: "{{ template "addon_mcr_repository_base" $ }}/azuremonitor/containerinsights/ciprod:{{- default $amalogsLinuxDefaultImageTag $.Values.OmsAgent.imageTagLinux -}}" + {{- if $.Values.OmsAgent.isImagePullPolicyAlways }} imagePullPolicy: Always {{- else }} imagePullPolicy: IfNotPresent @@ -254,25 +254,25 @@ spec: {{- end }} env: {{- if $isArcExtension }} - {{- if ne .Values.amalogs.env.clusterId "" }} + {{- if ne $.Values.amalogs.env.clusterId "" }} - name: AKS_RESOURCE_ID - value: {{ .Values.amalogs.env.clusterId | quote }} - {{- if ne .Values.amalogs.env.clusterRegion "" }} + value: {{ $.Values.amalogs.env.clusterId | quote }} + {{- if ne $.Values.amalogs.env.clusterRegion "" }} - name: AKS_REGION - value: {{ .Values.amalogs.env.clusterRegion | quote }} + value: {{ $.Values.amalogs.env.clusterRegion | quote }} {{- end }} - {{- else if ne .Values.Azure.Cluster.ResourceId "" }} + {{- else if ne $.Values.Azure.Cluster.ResourceId "" }} - name: AKS_RESOURCE_ID - value: {{ .Values.Azure.Cluster.ResourceId | quote }} + value: {{ $.Values.Azure.Cluster.ResourceId | quote }} - name: USING_AAD_MSI_AUTH - value: {{ .Values.amalogs.useAADAuth | quote }} - {{- if ne .Values.Azure.Cluster.Region "" }} + value: {{ $.Values.amalogs.useAADAuth | quote }} + {{- if ne $.Values.Azure.Cluster.Region "" }} - name: AKS_REGION - value: {{ .Values.Azure.Cluster.Region | quote }} + value: {{ $.Values.Azure.Cluster.Region | quote }} {{- end }} {{- else }} - name: ACS_RESOURCE_NAME - value: {{ .Values.amalogs.env.clusterName | quote }} + value: {{ $.Values.amalogs.env.clusterName | quote }} {{- end }} {{- else }} - name: NODE_IP @@ -295,23 +295,23 @@ spec: - name: FBIT_TAIL_BUFFER_MAX_SIZE value: "1" - name: AKS_CLUSTER_NAME - value: "{{ .Values.OmsAgent.aksClusterName }}" + value: "{{ $.Values.OmsAgent.aksClusterName }}" - name: AKS_RESOURCE_ID - value: "{{ .Values.OmsAgent.aksResourceID }}" + value: "{{ $.Values.OmsAgent.aksResourceID }}" - name: AKS_NODE_RESOURCE_GROUP - value: "{{ .Values.OmsAgent.aksNodeResourceGroup }}" + value: "{{ $.Values.OmsAgent.aksNodeResourceGroup }}" - name: AKS_REGION - value: "{{ .Values.global.commonGlobals.Region }}" + value: "{{ $.Values.global.commonGlobals.Region }}" - name: USER_ASSIGNED_IDENTITY_CLIENT_ID - value: "{{ .Values.OmsAgent.identityClientID }}" + value: "{{ $.Values.OmsAgent.identityClientID }}" - name: AZMON_CONTAINERLOGS_ONEAGENT_REGIONS value: "koreacentral,norwayeast,eastus2" - name: APPMONITORING_AUTOINSTRUMENTATION_ENABLED - value: "{{ .Values.AppmonitoringAgent.enabled }}" + value: "{{ $.Values.AppmonitoringAgent.enabled }}" - name: APPMONITORING_OPENTELEMETRYLOGS_ENABLED - value: "{{ .Values.AppmonitoringAgent.isOpenTelemetryLogsEnabled | default false }}" + value: "{{ $.Values.AppmonitoringAgent.isOpenTelemetryLogsEnabled | default false }}" - name: APPMONITORING_OPENTELEMETRYLOGS_PORT - value: "{{ .Values.AppmonitoringAgent.openTelemetryLogsPort | default 28331 }}" + value: "{{ $.Values.AppmonitoringAgent.openTelemetryLogsPort | default 28331 }}" - name: APPMONITORING_OPENTELEMETRYLOGS_PORT_GRPC value: "{{ $.Values.AppmonitoringAgent.openTelemetryLogsPortGrpc | default 28332 }}" - name: AZMON_OPENTELEMETRYLOGS_CONTAINER_PORT @@ -319,16 +319,16 @@ spec: - name: AZMON_OPENTELEMETRYLOGS_CONTAINER_PORT_GRPC value: "4320" - name: PROMETHEUS_METRICS_SCRAPING_DISABLED - value: "{{ .Values.OmsAgent.isPrometheusMetricsScrapingDisabled }}" - {{- if (eq .Values.global.commonGlobals.CloudEnvironment "USNat") }} + value: "{{ $.Values.OmsAgent.isPrometheusMetricsScrapingDisabled }}" + {{- if (eq $.Values.global.commonGlobals.CloudEnvironment "USNat") }} - name: MCR_URL value: "https://mcr.microsoft.eaglex.ic.gov/v2/" {{- end }} - {{- if (eq .Values.global.commonGlobals.CloudEnvironment "USSec") }} + {{- if (eq $.Values.global.commonGlobals.CloudEnvironment "USSec") }} - name: MCR_URL value: "https://mcr.microsoft.scloud/v2/" {{- end }} - {{- if (eq .Values.global.commonGlobals.CloudEnvironment "AzureBleuCloud") }} + {{- if (eq $.Values.global.commonGlobals.CloudEnvironment "AzureBleuCloud") }} - name: MCR_URL value: "https://mcr.microsoft.sovcloud-api.fr/v2/" {{- end }} @@ -339,27 +339,27 @@ spec: - name: USING_AAD_MSI_AUTH value: "false" {{- end }} - {{- if eq (.Values.OmsAgent.shouldMountSyslogHostPort | default false) true }} + {{- if eq ($.Values.OmsAgent.shouldMountSyslogHostPort | default false) true }} - name: SYSLOG_HOST_PORT - value: {{ .Values.OmsAgent.syslogHostPort | default 28330 | quote}} + value: {{ $.Values.OmsAgent.syslogHostPort | default 28330 | quote}} {{- end }} - name: AZMON_RETINA_FLOW_LOGS_ENABLED - value: "{{ .Values.OmsAgent.isRetinaFlowLogsEnabled | default false }}" + value: "{{ $.Values.OmsAgent.isRetinaFlowLogsEnabled | default false }}" - name: AZMON_RESOURCE_OPTIMIZATION_ENABLED - value: "{{ .Values.OmsAgent.isResourceOptimizationEnabled | default false }}" + value: "{{ $.Values.OmsAgent.isResourceOptimizationEnabled | default false }}" - name: AZMON_TELEGRAF_LIVENESSPROBE_ENABLED - value: "{{ .Values.OmsAgent.isTelegrafLivenessprobeEnabled | default false }}" + value: "{{ $.Values.OmsAgent.isTelegrafLivenessprobeEnabled | default false }}" {{- end }} - name: CONTROLLER_TYPE value: "DaemonSet" {{- if $isArcExtension }} - {{- if .Values.amalogs.enableHighLogScaleMode }} + {{- if $.Values.amalogs.enableHighLogScaleMode }} - name: ENABLE_HIGH_LOG_SCALE_MODE - value: {{ .Values.amalogs.enableHighLogScaleMode | quote }} + value: {{ $.Values.amalogs.enableHighLogScaleMode | quote }} {{- end }} - {{- if .Values.amalogs.syslog.enabled }} + {{- if $.Values.amalogs.syslog.enabled }} - name: SYSLOG_HOST_PORT - value: {{ .Values.amalogs.syslog.syslogPort | quote }} + value: {{ $.Values.amalogs.syslog.syslogPort | quote }} {{- end }} - name: NODE_IP valueFrom: @@ -370,62 +370,62 @@ spec: resourceFieldRef: containerName: ama-logs resource: limits.memory - {{- if not (empty .Values.Azure.Extension.Name) }} + {{- if not (empty $.Values.Azure.Extension.Name) }} - name: ARC_K8S_EXTENSION_NAME - value: {{ .Values.Azure.Extension.Name | quote }} + value: {{ $.Values.Azure.Extension.Name | quote }} {{- end }} - name: USER_ASSIGNED_IDENTITY_CLIENT_ID value: "" - {{- if .Values.amalogs.logsettings.logflushintervalsecs }} + {{- if $.Values.amalogs.logsettings.logflushintervalsecs }} - name: FBIT_SERVICE_FLUSH_INTERVAL - value: {{ .Values.amalogs.logsettings.logflushintervalsecs | quote }} + value: {{ $.Values.amalogs.logsettings.logflushintervalsecs | quote }} {{- end }} - {{- if .Values.amalogs.logsettings.tailbufchunksizemegabytes }} + {{- if $.Values.amalogs.logsettings.tailbufchunksizemegabytes }} - name: FBIT_TAIL_BUFFER_CHUNK_SIZE - value: {{ .Values.amalogs.logsettings.tailbufchunksizemegabytes | quote }} + value: {{ $.Values.amalogs.logsettings.tailbufchunksizemegabytes | quote }} {{- end }} - {{- if .Values.amalogs.logsettings.tailbufmaxsizemegabytes }} + {{- if $.Values.amalogs.logsettings.tailbufmaxsizemegabytes }} - name: FBIT_TAIL_BUFFER_MAX_SIZE - value: {{ .Values.amalogs.logsettings.tailbufmaxsizemegabytes | quote }} + value: {{ $.Values.amalogs.logsettings.tailbufmaxsizemegabytes | quote }} {{- end }} - name: ISTEST - value: {{ .Values.amalogs.ISTEST | quote }} - {{- if .Values.amalogs.isArcACluster }} + value: {{ $.Values.amalogs.ISTEST | quote }} + {{- if $.Values.amalogs.isArcACluster }} - name: IS_ARCA_CLUSTER - value: {{ .Values.amalogs.isArcACluster | quote }} + value: {{ $.Values.amalogs.isArcACluster | quote }} {{- end }} - {{- if ne .Values.amalogs.metricsEndpoint "" }} + {{- if ne $.Values.amalogs.metricsEndpoint "" }} - name: CUSTOM_METRICS_ENDPOINT - value: {{ .Values.amalogs.metricsEndpoint | quote }} - {{- else if ne .Values.Azure.proxySettings.autonomousFqdn "" }} + value: {{ $.Values.amalogs.metricsEndpoint | quote }} + {{- else if ne $.Values.Azure.proxySettings.autonomousFqdn "" }} - name: CUSTOM_METRICS_ENDPOINT - value: "https://metricsingestiongateway.monitoring.{{ .Values.Azure.proxySettings.autonomousFqdn }}" + value: "https://metricsingestiongateway.monitoring.{{ $.Values.Azure.proxySettings.autonomousFqdn }}" {{- end }} - {{- if ne .Values.amalogs.tokenAudience "" }} + {{- if ne $.Values.amalogs.tokenAudience "" }} - name: customResourceEndpoint - value: {{ .Values.amalogs.tokenAudience | quote }} + value: {{ $.Values.amalogs.tokenAudience | quote }} {{- end }} - name: IS_CUSTOM_CERT - value: {{ .Values.Azure.proxySettings.isCustomCert | quote }} + value: {{ $.Values.Azure.proxySettings.isCustomCert | quote }} - name: ENABLE_CUSTOM_METRICS - value: {{ .Values.amalogs.enableCustomMetrics | quote }} - {{- if .Values.amalogs.ISTEST }} + value: {{ $.Values.amalogs.enableCustomMetrics | quote }} + {{- if $.Values.amalogs.ISTEST }} - name: AZMON_KUBERNETES_METADATA_ENABLED value: "true" {{- end }} - {{- if .Values.amalogs.enableTelegrafLivenessprobe }} + {{- if $.Values.amalogs.enableTelegrafLivenessprobe }} - name: AZMON_TELEGRAF_LIVENESSPROBE_ENABLED - value: {{ .Values.amalogs.enableTelegrafLivenessprobe | quote }} + value: {{ $.Values.amalogs.enableTelegrafLivenessprobe | quote }} {{- end }} - name: HOSTNAME valueFrom: fieldRef: fieldPath: spec.nodeName - name: CLUSTER_CLOUD_ENVIRONMENT - value: "{{ .Values.Azure.Cluster.Cloud | lower }}" + value: "{{ $.Values.Azure.Cluster.Cloud | lower }}" {{- else }} - name: CLUSTER_CLOUD_ENVIRONMENT - value: "{{ .Values.global.commonGlobals.CloudEnvironment | lower }}" + value: "{{ $.Values.global.commonGlobals.CloudEnvironment | lower }}" {{- end }} securityContext: privileged: true @@ -440,23 +440,23 @@ spec: - containerPort: 25224 protocol: UDP {{- if $isArcExtension }} - {{- if .Values.amalogs.syslog.enabled }} + {{- if $.Values.amalogs.syslog.enabled }} - name: syslog - containerPort: {{ .Values.amalogs.syslog.syslogPort }} - hostPort: {{ .Values.amalogs.syslog.syslogPort }} + containerPort: {{ $.Values.amalogs.syslog.syslogPort }} + hostPort: {{ $.Values.amalogs.syslog.syslogPort }} protocol: TCP {{- end }} {{- else }} - {{- if eq (.Values.OmsAgent.shouldMountSyslogHostPort | default false) true }} + {{- if eq ($.Values.OmsAgent.shouldMountSyslogHostPort | default false) true }} - name: syslog containerPort: 28330 - hostPort: {{ .Values.OmsAgent.syslogHostPort | default 28330 }} + hostPort: {{ $.Values.OmsAgent.syslogHostPort | default 28330 }} protocol: TCP {{- end }} - {{- if eq (.Values.AppmonitoringAgent.isOpenTelemetryLogsEnabled | default false) true }} + {{- if eq ($.Values.AppmonitoringAgent.isOpenTelemetryLogsEnabled | default false) true }} - name: otlp-logs containerPort: 4319 - hostPort: {{ .Values.AppmonitoringAgent.openTelemetryLogsPort | default 28331 }} + hostPort: {{ $.Values.AppmonitoringAgent.openTelemetryLogsPort | default 28331 }} protocol: TCP - name: otlp-logs-grpc containerPort: 4320 @@ -466,7 +466,7 @@ spec: {{- end }} volumeMounts: {{- if $isArcExtension }} - {{- if .Values.amalogs.enableServiceAccountTimeBoundToken }} + {{- if $.Values.amalogs.enableServiceAccountTimeBoundToken }} - name: kube-api-access mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true @@ -479,11 +479,11 @@ spec: - mountPath: /var/log name: host-log {{- if not $isArcExtension }} - {{- if .Values.OmsAgent.isSyslogEnabled }} + {{- if $.Values.OmsAgent.isSyslogEnabled }} - mountPath: /var/run/mdsd-ci name: mdsd-sock {{- end }} - {{- if .Values.OmsAgent.isRetinaFlowLogsEnabled }} + {{- if $.Values.OmsAgent.isRetinaFlowLogsEnabled }} - mountPath: /var/log/acns/hubble name: acns-hubble {{- end }} @@ -512,7 +512,7 @@ spec: readOnly: true {{- end }} {{- if $isArcExtension }} - {{- if and (.Values.Azure.proxySettings.isProxyEnabled) (.Values.Azure.proxySettings.proxyCert) (not .Values.amalogs.ignoreExtensionProxySettings) }} + {{- if and ($.Values.Azure.proxySettings.isProxyEnabled) ($.Values.Azure.proxySettings.proxyCert) (not $.Values.amalogs.ignoreExtensionProxySettings) }} - mountPath: /etc/ssl/certs/proxy-cert.crt subPath: PROXYCERT.crt name: ama-logs-secret @@ -523,8 +523,8 @@ spec: name: settings-vol-config readOnly: true {{- if $isArcExtension }} - {{- if .Values.amalogs.logsettings.custommountpath }} - - mountPath: {{ .Values.amalogs.logsettings.custommountpath }} + {{- if $.Values.amalogs.logsettings.custommountpath }} + - mountPath: {{ $.Values.amalogs.logsettings.custommountpath }} name: custom-mount-path {{- end }} {{- end }} @@ -532,7 +532,7 @@ spec: name: ama-logs-adx-secret readOnly: true {{- if not $isArcExtension }} - {{- if (eq (include "should_mount_hostca" . ) "true" ) }} + {{- if (eq (include "should_mount_hostca" $ ) "true" ) }} - mountPath: /anchors/mariner name: anchors-mariner readOnly: true @@ -540,7 +540,7 @@ spec: name: anchors-ubuntu readOnly: true {{- end }} - {{- if .Values.OmsAgent.trustedCA }} + {{- if $.Values.OmsAgent.trustedCA }} - mountPath: /etc/ssl/certs/proxy-cert.crt subPath: PROXYCERT.crt name: ama-logs-secret @@ -558,32 +558,32 @@ spec: timeoutSeconds: 15 {{/* Prometheus Sidecar Container */}} {{- if $isArcExtension }} - {{- if .Values.amalogs.sidecarscraping }} + {{- if $.Values.amalogs.sidecarscraping }} - name: ama-logs-prometheus - image: {{ printf "%s:%s" .Values.amalogs.image.repo .Values.amalogs.image.tag }} + image: {{ printf "%s:%s" $.Values.amalogs.image.repo $.Values.amalogs.image.tag }} imagePullPolicy: IfNotPresent resources: -{{ toYaml .Values.amalogs.resources.daemonsetlinuxsidecar | indent 12 }} +{{ toYaml $.Values.amalogs.resources.daemonsetlinuxsidecar | indent 12 }} env: - {{- if ne .Values.amalogs.env.clusterId "" }} + {{- if ne $.Values.amalogs.env.clusterId "" }} - name: AKS_RESOURCE_ID - value: {{ .Values.amalogs.env.clusterId | quote }} - {{- if ne .Values.amalogs.env.clusterRegion "" }} + value: {{ $.Values.amalogs.env.clusterId | quote }} + {{- if ne $.Values.amalogs.env.clusterRegion "" }} - name: AKS_REGION - value: {{ .Values.amalogs.env.clusterRegion | quote }} + value: {{ $.Values.amalogs.env.clusterRegion | quote }} {{- end }} - {{- else if ne .Values.Azure.Cluster.ResourceId "" }} + {{- else if ne $.Values.Azure.Cluster.ResourceId "" }} - name: AKS_RESOURCE_ID - value: {{ .Values.Azure.Cluster.ResourceId | quote }} + value: {{ $.Values.Azure.Cluster.ResourceId | quote }} - name: USING_AAD_MSI_AUTH - value: {{ .Values.amalogs.useAADAuth | quote }} - {{- if ne .Values.Azure.Cluster.Region "" }} + value: {{ $.Values.amalogs.useAADAuth | quote }} + {{- if ne $.Values.Azure.Cluster.Region "" }} - name: AKS_REGION - value: {{ .Values.Azure.Cluster.Region | quote }} + value: {{ $.Values.Azure.Cluster.Region | quote }} {{- end }} {{- else }} - name: ACS_RESOURCE_NAME - value: {{ .Values.amalogs.env.clusterName | quote }} + value: {{ $.Values.amalogs.env.clusterName | quote }} {{- end }} - name: CONTROLLER_TYPE value: "DaemonSet" @@ -599,13 +599,13 @@ spec: containerName: ama-logs-prometheus resource: limits.memory - name: ISTEST - value: {{ .Values.amalogs.ISTEST | quote }} + value: {{ $.Values.amalogs.ISTEST | quote }} - name: HOSTNAME valueFrom: fieldRef: fieldPath: spec.nodeName - name: CLUSTER_CLOUD_ENVIRONMENT - value: "{{ .Values.Azure.Cluster.Cloud | lower }}" + value: "{{ $.Values.Azure.Cluster.Cloud | lower }}" securityContext: privileged: true capabilities: @@ -614,7 +614,7 @@ spec: add: - DAC_OVERRIDE volumeMounts: - {{- if .Values.amalogs.enableServiceAccountTimeBoundToken }} + {{- if $.Values.amalogs.enableServiceAccountTimeBoundToken }} - name: kube-api-access mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true @@ -624,7 +624,7 @@ spec: - mountPath: /etc/ama-logs-secret name: ama-logs-secret readOnly: true - {{- if and (.Values.Azure.proxySettings.isProxyEnabled) (.Values.Azure.proxySettings.proxyCert) (not .Values.amalogs.ignoreExtensionProxySettings) }} + {{- if and ($.Values.Azure.proxySettings.isProxyEnabled) ($.Values.Azure.proxySettings.proxyCert) (not $.Values.amalogs.ignoreExtensionProxySettings) }} - mountPath: /etc/ssl/certs/proxy-cert.crt subPath: PROXYCERT.crt name: ama-logs-secret @@ -647,10 +647,10 @@ spec: timeoutSeconds: 15 {{- end }} {{- else }} - {{- if and (not .Values.OmsAgent.isPrometheusMetricsScrapingDisabled) .Values.OmsAgent.isSidecarScrapingEnabled }} + {{- if and (not $.Values.OmsAgent.isPrometheusMetricsScrapingDisabled) $.Values.OmsAgent.isSidecarScrapingEnabled }} - name: ama-logs-prometheus - image: "{{ template "addon_mcr_repository_base" . }}/azuremonitor/containerinsights/ciprod:{{- default $amalogsLinuxDefaultImageTag .Values.OmsAgent.imageTagLinux -}}" - {{- if .Values.OmsAgent.isImagePullPolicyAlways }} + image: "{{ template "addon_mcr_repository_base" $ }}/azuremonitor/containerinsights/ciprod:{{- default $amalogsLinuxDefaultImageTag $.Values.OmsAgent.imageTagLinux -}}" + {{- if $.Values.OmsAgent.isImagePullPolicyAlways }} imagePullPolicy: Always {{- else }} imagePullPolicy: IfNotPresent @@ -679,28 +679,28 @@ spec: fieldRef: fieldPath: spec.nodeName - name: AKS_CLUSTER_NAME - value: "{{ .Values.OmsAgent.aksClusterName }}" + value: "{{ $.Values.OmsAgent.aksClusterName }}" - name: AKS_RESOURCE_ID - value: "{{ .Values.OmsAgent.aksResourceID }}" + value: "{{ $.Values.OmsAgent.aksResourceID }}" - name: AKS_NODE_RESOURCE_GROUP - value: "{{ .Values.OmsAgent.aksNodeResourceGroup }}" + value: "{{ $.Values.OmsAgent.aksNodeResourceGroup }}" - name: AKS_REGION - value: "{{ .Values.global.commonGlobals.Region }}" + value: "{{ $.Values.global.commonGlobals.Region }}" - name: CONTROLLER_TYPE value: "DaemonSet" - name: CONTAINER_TYPE value: "PrometheusSidecar" - name: USER_ASSIGNED_IDENTITY_CLIENT_ID - value: "{{ .Values.OmsAgent.identityClientID }}" - {{- if (eq .Values.global.commonGlobals.CloudEnvironment "USNat") }} + value: "{{ $.Values.OmsAgent.identityClientID }}" + {{- if (eq $.Values.global.commonGlobals.CloudEnvironment "USNat") }} - name: MCR_URL value: "https://mcr.microsoft.eaglex.ic.gov/v2/" {{- end }} - {{- if (eq .Values.global.commonGlobals.CloudEnvironment "USSec") }} + {{- if (eq $.Values.global.commonGlobals.CloudEnvironment "USSec") }} - name: MCR_URL value: "https://mcr.microsoft.scloud/v2/" {{- end }} - {{- if (eq .Values.global.commonGlobals.CloudEnvironment "AzureBleuCloud") }} + {{- if (eq $.Values.global.commonGlobals.CloudEnvironment "AzureBleuCloud") }} - name: MCR_URL value: "https://mcr.microsoft.sovcloud-api.fr/v2/" {{- end }} @@ -711,14 +711,14 @@ spec: - name: USING_AAD_MSI_AUTH value: "false" {{- end }} - {{- if eq (.Values.OmsAgent.shouldMountSyslogHostPort | default false) true }} + {{- if eq ($.Values.OmsAgent.shouldMountSyslogHostPort | default false) true }} - name: SYSLOG_HOST_PORT - value: {{ .Values.OmsAgent.syslogHostPort | default 28330 | quote}} + value: {{ $.Values.OmsAgent.syslogHostPort | default 28330 | quote}} {{- end }} - name: AZMON_TELEGRAF_LIVENESSPROBE_ENABLED - value: "{{ .Values.OmsAgent.isTelegrafLivenessprobeEnabled | default false }}" + value: "{{ $.Values.OmsAgent.isTelegrafLivenessprobeEnabled | default false }}" - name: CLUSTER_CLOUD_ENVIRONMENT - value: "{{ .Values.global.commonGlobals.CloudEnvironment | lower }}" + value: "{{ $.Values.global.commonGlobals.CloudEnvironment | lower }}" securityContext: privileged: true capabilities: @@ -743,7 +743,7 @@ spec: readOnly: true - mountPath: /var/run/mdsd-PrometheusSidecar name: mdsd-prometheus-sock - {{- if (eq (include "should_mount_hostca" . ) "true" ) }} + {{- if (eq (include "should_mount_hostca" $ ) "true" ) }} - mountPath: /anchors/mariner name: anchors-mariner readOnly: true @@ -751,13 +751,13 @@ spec: name: anchors-ubuntu readOnly: true {{- end }} - {{- if .Values.OmsAgent.trustedCA }} + {{- if $.Values.OmsAgent.trustedCA }} - mountPath: /etc/ssl/certs/proxy-cert.crt subPath: PROXYCERT.crt name: ama-logs-secret readOnly: true {{- end }} - {{- if .Values.OmsAgent.isSyslogEnabled }} + {{- if $.Values.OmsAgent.isSyslogEnabled }} - mountPath: /var/run/mdsd-ci name: mdsd-sock {{- end }} @@ -774,21 +774,21 @@ spec: {{- end }} {{/* Affinity and Tolerations */}} {{- if $isArcExtension }} - {{- with .Values.amalogs.daemonset.affinity }} + {{- with $.Values.amalogs.daemonset.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- if .Values.amalogs.scheduleOnTaintedNodes }} - {{- with .Values.amalogs.tolerationsUnrestricted }} + {{- if $.Values.amalogs.scheduleOnTaintedNodes }} + {{- with $.Values.amalogs.tolerationsUnrestricted }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- else }} - {{- with .Values.amalogs.tolerations }} + {{- with $.Values.amalogs.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- end }} {{- else }} -{{- $useDaemonSetSizing := and (eq .Values.Azure.Cluster.Kind "automatic") .Values.OmsAgent.enableDaemonSetSizing -}} -{{- $singleSize := dict "name" "" -}} +{{- $useDaemonSetSizing := and (eq $.Values.Azure.Cluster.Kind "automatic") $.Values.OmsAgent.enableDaemonSetSizing }} +{{- $singleSize := dict "name" "" }} affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -841,7 +841,7 @@ spec: {{/* Volumes */}} volumes: {{- if $isArcExtension }} - {{- if .Values.amalogs.enableServiceAccountTimeBoundToken }} + {{- if $.Values.amalogs.enableServiceAccountTimeBoundToken }} - name: kube-api-access projected: sources: @@ -875,12 +875,12 @@ spec: hostPath: path: /var/log {{- if not $isArcExtension }} - {{- if .Values.OmsAgent.isSyslogEnabled }} + {{- if $.Values.OmsAgent.isSyslogEnabled }} - name: mdsd-sock hostPath: path: /var/run/mdsd-ci {{- end }} - {{- if .Values.OmsAgent.isRetinaFlowLogsEnabled }} + {{- if $.Values.OmsAgent.isRetinaFlowLogsEnabled }} - name: acns-hubble hostPath: path: /var/log/acns/hubble @@ -908,10 +908,10 @@ spec: name: container-azm-ms-agentconfig optional: true {{- if $isArcExtension }} - {{- if .Values.amalogs.logsettings.custommountpath }} + {{- if $.Values.amalogs.logsettings.custommountpath }} - name: custom-mount-path hostPath: - path: {{ .Values.amalogs.logsettings.custommountpath }} + path: {{ $.Values.amalogs.logsettings.custommountpath }} {{- end }} {{- end }} - name: ama-logs-adx-secret @@ -923,7 +923,7 @@ spec: name: container-azm-ms-osmconfig optional: true {{- if not $isArcExtension }} - {{- if (eq (include "should_mount_hostca" . ) "true" ) }} + {{- if (eq (include "should_mount_hostca" $ ) "true" ) }} - name: anchors-ubuntu hostPath: path: /usr/local/share/ca-certificates/ From 5c1b31b0a1234f3070b328522f9e4e503371117a Mon Sep 17 00:00:00 2001 From: NicAtMS Date: Fri, 13 Mar 2026 12:02:15 -0700 Subject: [PATCH 5/9] rebase and cleanup --- .../templates/ama-logs-daemonset-aks.yaml | 543 ------------------ .../templates/ama-logs-daemonset.yaml | 6 - 2 files changed, 549 deletions(-) delete mode 100644 charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml diff --git a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml deleted file mode 100644 index bda340ed2..000000000 --- a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset-aks.yaml +++ /dev/null @@ -1,543 +0,0 @@ -{{- $amalogsLinuxDefaultImageTag := dict "component" "ama-logs-linux" "version" .Values.global.commonGlobals.Versions.Kubernetes | include "get.addonImageTag" }} -{{- $addonTokenAdapterLinuxDefaultImageTag := dict "component" "addon-token-adapter-linux" "version" .Values.global.commonGlobals.Versions.Kubernetes | include "get.imagetag"}} -{{/* Determine isusingaadauth value from OmsAgent.isUsingAADAuth */}} -{{- $isusingaadauth := false -}} -{{- if hasKey .Values.OmsAgent "isUsingAADAuth" -}} - {{- $isusingaadauth = .Values.OmsAgent.isUsingAADAuth -}} -{{- end -}} ---- -{{/* Get sizes */}} -{{- $useDaemonSetSizing := and (eq .Values.Azure.Cluster.Kind "automatic") .Values.OmsAgent.enableDaemonSetSizing -}} -{{- $singleSize := dict "containers" (dict "addon-token-adapter" (dict "cpuLimit" "100m" "memoryLimit" "100Mi" "cpuRequest" "20m" "memoryRequest" "50Mi") "ama-logs" (dict "cpuLimit" .Values.OmsAgent.omsAgentDsCPULimitLinux "memoryLimit" .Values.OmsAgent.omsAgentDsMemoryLimitLinux "cpuRequest" "75m" "memoryRequest" "325Mi") "ama-logs-prometheus" (dict "cpuLimit" .Values.OmsAgent.omsAgentPrometheusSidecarCPULimit "memoryLimit" .Values.OmsAgent.omsAgentPrometheusSidecarMemoryLimit "cpuRequest" "75m" "memoryRequest" "225Mi")) -}} -{{- $sizes := list $singleSize -}} -{{- if $useDaemonSetSizing -}} - {{- $sizes = prepend .Values.OmsAgent.daemonSetSizingValues.tShirtSizes $singleSize -}} -{{- else -}} - {{- $sizes = list $singleSize -}} -{{- end -}} -{{/* Generate DaemonSets */}} -{{- $prevmaxCPU := 0 -}} -{{- range $index, $size := $sizes -}} -{{- if gt $index 0 }} ---- -{{ end -}} -{{- if semverCompare ">=1.16.0" $.Values.global.commonGlobals.Versions.Kubernetes -}} -apiVersion: apps/v1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: DaemonSet -metadata: - labels: - component: ama-logs-agent - tier: node - kubernetes.azure.com/managedby: aks -{{- if $.Values.legacyAddonDelivery }} - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile -{{- end }} - {{- if and $useDaemonSetSizing $size.name }} - kubernetes.azure.com/ds-tshirt-size: {{ $size.name }} - {{- end }} - name: ama-logs{{/* {{- if and $useDaemonSetSizing $size.name }}-{{ $size.name }}{{- end }} */}} - namespace: kube-system -spec: - selector: - matchLabels: - component: ama-logs-agent - tier: node - {{- if and $useDaemonSetSizing $size.name }} - kubernetes.azure.com/ds-tshirt-size: {{ $size.name }} - {{- end }} - template: - metadata: - annotations: - agentVersion: "azure-mdsd-1.37.0" - dockerProviderVersion: "18.0.1-0" - schema-versions: "v1" - WSID: {{ $.Values.OmsAgent.workspaceID | b64enc | quote }} - kubernetes.azure.com/no-http-proxy-vars: "true" - labels: - component: ama-logs-agent - tier: node - kubernetes.azure.com/managedby: aks - {{- if and $useDaemonSetSizing $size.name }} - kubernetes.azure.com/ds-tshirt-size: {{ $size.name }} - {{- end }} -{{- if semverCompare "<1.11.0" $.Values.global.commonGlobals.Versions.Kubernetes }} - annotations: - scheduler.alpha.kubernetes.io/critical-pod: "" -{{- end }} - spec: -{{- if semverCompare ">=1.11.0" $.Values.global.commonGlobals.Versions.Kubernetes }} - priorityClassName: system-node-critical -{{- end }} - serviceAccountName: ama-logs - dnsConfig: - options: - - name: ndots - value: "3" - containers: -{{- if $isusingaadauth }} - - name: addon-token-adapter - command: - - /addon-token-adapter - args: - - --secret-namespace=kube-system - - --secret-name={{ $.Values.OmsAgent.accessTokenSecretName }} - - --token-server-listening-port=8888 - - --health-server-listening-port=9999 - - --restart-pod-waiting-minutes-on-broken-connection=240 - image: "{{ template "addon_mcr_repository_base" $ }}/aks/msi/addon-token-adapter:{{- $addonTokenAdapterLinuxDefaultImageTag -}}" - imagePullPolicy: IfNotPresent - env: - - name: AZMON_COLLECT_ENV - value: "false" - livenessProbe: - httpGet: - path: /healthz - port: 9999 - initialDelaySeconds: 10 - periodSeconds: 60 - resources: - limits: - {{- $containerResources := index $size.containers "addon-token-adapter" }} - cpu: {{ $containerResources.cpuLimit }} - memory: {{ $containerResources.memoryLimit }} - requests: - cpu: {{ $containerResources.cpuRequest }} - memory: {{ $containerResources.memoryRequest }} - securityContext: - capabilities: - drop: - - ALL - add: - - NET_ADMIN - - NET_RAW -{{- end }} - - name: ama-logs - image: "{{ template "addon_mcr_repository_base" $ }}/azuremonitor/containerinsights/ciprod:{{- default $amalogsLinuxDefaultImageTag $.Values.OmsAgent.imageTagLinux -}}" - {{- if $.Values.OmsAgent.isImagePullPolicyAlways }} - imagePullPolicy: Always - {{- else }} - imagePullPolicy: IfNotPresent - {{- end }} - resources: - limits: - {{- $containerResources := index $size.containers "ama-logs" }} - cpu: {{ include "maxResourceValue" (list $.Values.OmsAgent.omsAgentDsCPULimitLinux $containerResources.cpuLimit) }} - memory: {{ include "maxResourceValue" (list $.Values.OmsAgent.omsAgentDsMemoryLimitLinux $containerResources.memoryLimit) }} - requests: - {{- $containerResources := index $size.containers "ama-logs" }} - cpu: {{ $containerResources.cpuRequest }} - memory: {{ $containerResources.memoryRequest }} - env: - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: CONTAINER_MEMORY_LIMIT_IN_BYTES - valueFrom: - resourceFieldRef: - containerName: ama-logs - resource: limits.memory - - name: HOSTNAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: FBIT_SERVICE_FLUSH_INTERVAL - value: "15" - - name: FBIT_TAIL_BUFFER_CHUNK_SIZE - value: "1" - - name: FBIT_TAIL_BUFFER_MAX_SIZE - value: "1" - - name: AKS_CLUSTER_NAME - value: "{{ $.Values.OmsAgent.aksClusterName }}" - - name: AKS_RESOURCE_ID - value: "{{ $.Values.OmsAgent.aksResourceID }}" - - name: AKS_NODE_RESOURCE_GROUP - value: "{{ $.Values.OmsAgent.aksNodeResourceGroup }}" - - name: AKS_REGION - value: "{{ $.Values.global.commonGlobals.Region }}" - - name: CONTROLLER_TYPE - value: "DaemonSet" - - name: USER_ASSIGNED_IDENTITY_CLIENT_ID - value: "{{ $.Values.OmsAgent.identityClientID }}" - - name: AZMON_CONTAINERLOGS_ONEAGENT_REGIONS - value: "koreacentral,norwayeast,eastus2" - - name: APPMONITORING_AUTOINSTRUMENTATION_ENABLED - value: "{{ $.Values.AppmonitoringAgent.enabled }}" - - name: APPMONITORING_OPENTELEMETRYLOGS_ENABLED - value: "{{ $.Values.AppmonitoringAgent.isOpenTelemetryLogsEnabled | default false }}" - - name: APPMONITORING_OPENTELEMETRYLOGS_PORT - value: "{{ $.Values.AppmonitoringAgent.openTelemetryLogsPort | default 28331 }}" - - name: AZMON_OPENTELEMETRYLOGS_CONTAINER_PORT - value: "4319" - - name: PROMETHEUS_METRICS_SCRAPING_DISABLED - value: "{{ $.Values.OmsAgent.isPrometheusMetricsScrapingDisabled }}" - {{- if (eq $.Values.global.commonGlobals.CloudEnvironment "USNat") }} - - name: MCR_URL - value: "https://mcr.microsoft.eaglex.ic.gov/v2/" - {{- end }} - {{- if (eq $.Values.global.commonGlobals.CloudEnvironment "USSec") }} - - name: MCR_URL - value: "https://mcr.microsoft.scloud/v2/" - {{- end }} - {{- if (eq $.Values.global.commonGlobals.CloudEnvironment "AzureBleuCloud") }} - - name: MCR_URL - value: "https://mcr.microsoft.sovcloud-api.fr/v2/" - {{- end }} - {{- if $isusingaadauth }} - - name: USING_AAD_MSI_AUTH - value: "true" - {{- else }} - - name: USING_AAD_MSI_AUTH - value: "false" - {{- end }} - {{- if eq ($.Values.OmsAgent.shouldMountSyslogHostPort | default false) true }} - - name: SYSLOG_HOST_PORT - value: {{ $.Values.OmsAgent.syslogHostPort | default 28330 | quote}} - {{- end }} - - name: AZMON_RETINA_FLOW_LOGS_ENABLED - value: "{{ $.Values.OmsAgent.isRetinaFlowLogsEnabled | default false }}" - - name: AZMON_RESOURCE_OPTIMIZATION_ENABLED - value: "{{ $.Values.OmsAgent.isResourceOptimizationEnabled | default false }}" - - name: AZMON_TELEGRAF_LIVENESSPROBE_ENABLED - value: "{{ $.Values.OmsAgent.isTelegrafLivenessprobeEnabled | default false }}" - - name: CLUSTER_CLOUD_ENVIRONMENT - value: "{{ $.Values.global.commonGlobals.CloudEnvironment | lower }}" - livenessProbe: - exec: - command: - - /bin/bash - - "-c" - - "/opt/livenessprobe.sh" - initialDelaySeconds: 60 - periodSeconds: 60 - timeoutSeconds: 15 - ports: - - containerPort: 25225 - protocol: TCP - - containerPort: 25224 - protocol: UDP - {{- if eq ($.Values.OmsAgent.shouldMountSyslogHostPort | default false) true }} - - name: syslog - containerPort: 28330 - hostPort: {{ $.Values.OmsAgent.syslogHostPort | default 28330 }} - protocol: TCP - {{- end }} - {{- if eq ($.Values.AppmonitoringAgent.isOpenTelemetryLogsEnabled | default false) true }} - - name: otlp-logs - containerPort: 4319 - hostPort: {{ $.Values.AppmonitoringAgent.openTelemetryLogsPort | default 28331 }} - protocol: TCP - {{- end }} - securityContext: - privileged: true - capabilities: - drop: - - ALL - add: - - DAC_OVERRIDE - volumeMounts: - - mountPath: /hostfs - name: host-root - readOnly: true - mountPropagation: HostToContainer - - mountPath: /var/log - name: host-log - {{- if $.Values.OmsAgent.isSyslogEnabled }} - - mountPath: /var/run/mdsd-ci - name: mdsd-sock - {{- end }} - {{- if $.Values.OmsAgent.isRetinaFlowLogsEnabled }} - - mountPath: /var/log/acns/hubble - name: acns-hubble - {{- end }} - - mountPath: /var/run/mdsd-PrometheusSidecar - name: mdsd-prometheus-sock - - mountPath: /var/lib/docker/containers - name: containerlog-path - readOnly: true - - mountPath: /mnt/docker - name: containerlog-path-2 - readOnly: true - - mountPath: /mnt/containers - name: containerlog-path-3 - readOnly: true - - mountPath: /etc/kubernetes/host - name: azure-json-path - - mountPath: /etc/ama-logs-secret - name: ama-logs-secret - readOnly: true - - mountPath: /etc/omsagent-secret - name: ama-logs-secret - readOnly: true - - mountPath: /etc/config/settings - name: settings-vol-config - readOnly: true - - mountPath: /etc/config/settings/adx - name: ama-logs-adx-secret - readOnly: true - {{- if (eq (include "should_mount_hostca" $ ) "true" ) }} - # USSec and USNat have cloud-specific Root and Intermediate CAs that must be mounted into all running containers from the host - # Container Insights has logic to update the trust store in the image based on certs present in /anchors/ mounts below - - mountPath: /anchors/mariner - name: anchors-mariner - readOnly: true - - mountPath: /anchors/ubuntu - name: anchors-ubuntu - readOnly: true - {{- end }} - {{- if $.Values.OmsAgent.trustedCA }} - - mountPath: /etc/ssl/certs/proxy-cert.crt - subPath: PROXYCERT.crt - name: ama-logs-secret - readOnly: true - {{- end }} - {{- if and (not $.Values.OmsAgent.isPrometheusMetricsScrapingDisabled) $.Values.OmsAgent.isSidecarScrapingEnabled }} - - name: ama-logs-prometheus - image: "{{ template "addon_mcr_repository_base" $ }}/azuremonitor/containerinsights/ciprod:{{- default $amalogsLinuxDefaultImageTag $.Values.OmsAgent.imageTagLinux -}}" - {{- if $.Values.OmsAgent.isImagePullPolicyAlways }} - imagePullPolicy: Always - {{- else }} - imagePullPolicy: IfNotPresent - {{- end }} - resources: - limits: - {{- $containerResources := index $size.containers "ama-logs-prometheus" }} - cpu: {{ include "maxResourceValue" (list $.Values.OmsAgent.omsAgentPrometheusSidecarCPULimit $containerResources.cpuLimit) }} - memory: {{ include "maxResourceValue" (list $.Values.OmsAgent.omsAgentPrometheusSidecarMemoryLimit $containerResources.memoryLimit) }} - requests: - {{- $containerResources := index $size.containers "ama-logs-prometheus" }} - cpu: {{ $containerResources.cpuRequest }} - memory: {{ $containerResources.memoryRequest }} - env: - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: CONTAINER_MEMORY_LIMIT_IN_BYTES - valueFrom: - resourceFieldRef: - containerName: ama-logs-prometheus - resource: limits.memory - - name: HOSTNAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: AKS_CLUSTER_NAME - value: "{{ $.Values.OmsAgent.aksClusterName }}" - - name: AKS_RESOURCE_ID - value: "{{ $.Values.OmsAgent.aksResourceID }}" - - name: AKS_NODE_RESOURCE_GROUP - value: "{{ $.Values.OmsAgent.aksNodeResourceGroup }}" - - name: AKS_REGION - value: "{{ $.Values.global.commonGlobals.Region }}" - - name: CONTROLLER_TYPE - value: "DaemonSet" - - name: CONTAINER_TYPE - value: "PrometheusSidecar" - - name: USER_ASSIGNED_IDENTITY_CLIENT_ID - value: "{{ $.Values.OmsAgent.identityClientID }}" - {{- if (eq $.Values.global.commonGlobals.CloudEnvironment "USNat") }} - - name: MCR_URL - value: "https://mcr.microsoft.eaglex.ic.gov/v2/" - {{- end }} - {{- if (eq $.Values.global.commonGlobals.CloudEnvironment "USSec") }} - - name: MCR_URL - value: "https://mcr.microsoft.scloud/v2/" - {{- end }} - {{- if (eq $.Values.global.commonGlobals.CloudEnvironment "AzureBleuCloud") }} - - name: MCR_URL - value: "https://mcr.microsoft.sovcloud-api.fr/v2/" - {{- end }} - {{- if $isusingaadauth }} - - name: USING_AAD_MSI_AUTH - value: "true" - {{- else }} - - name: USING_AAD_MSI_AUTH - value: "false" - {{- end }} - {{- if eq ($.Values.OmsAgent.shouldMountSyslogHostPort | default false) true }} - - name: SYSLOG_HOST_PORT - value: {{ $.Values.OmsAgent.syslogHostPort | default 28330 | quote}} - {{- end }} - - name: AZMON_TELEGRAF_LIVENESSPROBE_ENABLED - value: "{{ $.Values.OmsAgent.isTelegrafLivenessprobeEnabled | default false }}" - - name: CLUSTER_CLOUD_ENVIRONMENT - value: "{{ $.Values.global.commonGlobals.CloudEnvironment | lower }}" - securityContext: - privileged: true - capabilities: - drop: - - ALL - add: - - DAC_OVERRIDE - volumeMounts: - - mountPath: /etc/kubernetes/host - name: azure-json-path - - mountPath: /etc/ama-logs-secret - name: ama-logs-secret - readOnly: true - - mountPath: /etc/omsagent-secret - name: ama-logs-secret - readOnly: true - - mountPath: /etc/config/settings - name: settings-vol-config - readOnly: true - - mountPath: /etc/config/osm-settings - name: osm-settings-vol-config - readOnly: true - - mountPath: /var/run/mdsd-PrometheusSidecar - name: mdsd-prometheus-sock - {{- if (eq (include "should_mount_hostca" $ ) "true" ) }} - # USSec and USNat have cloud-specific Root and Intermediate CAs that must be mounted into all running containers from the host - # Container Insights has logic to update the trust store in the image based on certs present in /anchors/ mounts below - - mountPath: /anchors/mariner - name: anchors-mariner - readOnly: true - - mountPath: /anchors/ubuntu - name: anchors-ubuntu - readOnly: true - {{- end }} - {{- if $.Values.OmsAgent.trustedCA }} - - mountPath: /etc/ssl/certs/proxy-cert.crt - subPath: PROXYCERT.crt - name: ama-logs-secret - readOnly: true - {{- end }} - {{- if $.Values.OmsAgent.isSyslogEnabled }} - - mountPath: /var/run/mdsd-ci - name: mdsd-sock - {{- end }} - livenessProbe: - exec: - command: - - /bin/bash - - -c - - /opt/livenessprobe.sh - initialDelaySeconds: 60 - periodSeconds: 60 - timeoutSeconds: 15 - {{- end }} - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: -{{- if semverCompare ">=1.16.0" $.Values.global.commonGlobals.Versions.Kubernetes }} - - key: kubernetes.io/os -{{- else }} - - key: beta.kubernetes.io/os -{{- end }} - operator: In - values: - - linux - - key: kubernetes.azure.com/cluster - operator: Exists - - key: type - operator: NotIn - values: - - virtual-kubelet - {{- if $useDaemonSetSizing -}} - {{- if eq $size.name $singleSize.name -}} - {{/* Target non-Karpenter nodes */}} - - key: karpenter.azure.com/aksnodeclass - operator: DoesNotExist - {{- else }} - {{/* Target Karpenter nodes with CPU range */}} - {{- if gt $prevmaxCPU 0 -}} - - key: karpenter.azure.com/sku-cpu - operator: Gt - values: - - "{{ $prevmaxCPU }}" - {{- end -}} - {{/* Add new line. */}} - {{- if and $prevmaxCPU $size.maxCPU }} - {{ end -}} - {{- if $size.maxCPU -}} - - key: karpenter.azure.com/sku-cpu - operator: Lt - values: - - "{{ add ($size.maxCPU | int) 1 }}" - {{- end -}} - {{- end -}} - {{- end }} - tolerations: - - key: "CriticalAddonsOnly" - operator: "Exists" - - operator: "Exists" - effect: NoExecute - - operator: "Exists" - effect: NoSchedule - - operator: "Exists" - effect: PreferNoSchedule - volumes: - - name: host-root - hostPath: - path: / - - name: mdsd-prometheus-sock - emptyDir: {} - - name: container-hostname - hostPath: - path: /etc/hostname - - name: host-log - hostPath: - path: /var/log - {{- if $.Values.OmsAgent.isSyslogEnabled }} - - name: mdsd-sock - hostPath: - path: /var/run/mdsd-ci - {{- end }} - {{- if $.Values.OmsAgent.isRetinaFlowLogsEnabled }} - - name: acns-hubble - hostPath: - path: /var/log/acns/hubble - {{- end }} - - name: containerlog-path - hostPath: - path: /var/lib/docker/containers - - name: containerlog-path-2 - hostPath: - path: /mnt/docker - - name: containerlog-path-3 - hostPath: - path: /mnt/containers - - name: azure-json-path - hostPath: - path: /etc/kubernetes - - name: ama-logs-secret - secret: - secretName: ama-logs-secret - - name: settings-vol-config - configMap: - name: container-azm-ms-agentconfig - optional: true - - name: ama-logs-adx-secret - secret: - secretName: ama-logs-adx-secret - optional: true - - name: osm-settings-vol-config - configMap: - name: container-azm-ms-osmconfig - optional: true - {{- if (eq (include "should_mount_hostca" $ ) "true" ) }} - - name: anchors-ubuntu - hostPath: - path: /usr/local/share/ca-certificates/ - type: DirectoryOrCreate - - name: anchors-mariner - hostPath: - path: /etc/pki/ca-trust/source/anchors - type: DirectoryOrCreate - {{- end }} - updateStrategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 50% - -{{- if and (ne (default "" $size.name) (default "" $singleSize.name)) $size.maxCPU }} -{{- $prevmaxCPU = $size.maxCPU | int }} -{{- end }} -{{- end }} diff --git a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml index 142b50b6a..148bcc8ca 100644 --- a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml +++ b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml @@ -48,11 +48,9 @@ metadata: kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile {{- end }} -{{/* {{- if and $useDaemonSetSizing $size.name }} kubernetes.azure.com/ds-tshirt-size: {{ $size.name }} {{- end }} - */}} {{- end }} component: ama-logs-agent tier: node @@ -70,11 +68,9 @@ spec: {{- else }} component: ama-logs-agent tier: node - {{/* {{- if and $useDaemonSetSizing $size.name }} kubernetes.azure.com/ds-tshirt-size: {{ $size.name }} {{- end }} - */}} {{- end }} template: metadata: @@ -85,11 +81,9 @@ spec: component: ama-logs-agent tier: node kubernetes.azure.com/managedby: aks - {{/* {{- if and $useDaemonSetSizing $size.name }} kubernetes.azure.com/ds-tshirt-size: {{ $size.name }} {{- end }} - */}} {{- end }} annotations: {{- if $isArcExtension }} From 5b24d6e63c15fe3edd34e3e8647c3bdbfed21fbd Mon Sep 17 00:00:00 2001 From: NicAtMS Date: Mon, 16 Mar 2026 16:26:47 -0700 Subject: [PATCH 6/9] Update ama-logs-daemonset.yaml --- .../templates/ama-logs-daemonset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml index 148bcc8ca..6b6d57f42 100644 --- a/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml +++ b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml @@ -35,7 +35,7 @@ apiVersion: apps/v1 kind: DaemonSet metadata: - name: ama-logs + name: ama-logs{{- if gt $index 0 }}-{{ $size.name }}{{- end }} namespace: kube-system labels: {{- if $isArcExtension }} From 048eacf3a258eb6600cb50c858fbf016150eb753 Mon Sep 17 00:00:00 2001 From: NicAtMS Date: Tue, 17 Mar 2026 16:59:57 -0700 Subject: [PATCH 7/9] default to false --- charts/azuremonitor-containerinsights/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/azuremonitor-containerinsights/values.yaml b/charts/azuremonitor-containerinsights/values.yaml index 9cc83e245..2b6b05fd4 100644 --- a/charts/azuremonitor-containerinsights/values.yaml +++ b/charts/azuremonitor-containerinsights/values.yaml @@ -30,7 +30,7 @@ legacyAddonDelivery: false # OmsAgent configuration OmsAgent: aksResourceID: - enableDaemonSetSizing: true + enableDaemonSetSizing: false isCustomMetricsDisabled: false isUsingAADAuth: "true" retinaFlowLogsEnabled: false From e11a8f96182a684e5996752a2bc44a4075967b50 Mon Sep 17 00:00:00 2001 From: NicAtMS Date: Wed, 18 Mar 2026 10:36:13 -0700 Subject: [PATCH 8/9] use regex for number and suffix extraction --- .../templates/_helpers.tpl | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/charts/azuremonitor-containerinsights/templates/_helpers.tpl b/charts/azuremonitor-containerinsights/templates/_helpers.tpl index 7d2d16e55..012e99e28 100644 --- a/charts/azuremonitor-containerinsights/templates/_helpers.tpl +++ b/charts/azuremonitor-containerinsights/templates/_helpers.tpl @@ -146,24 +146,9 @@ Returns value in smallest unit (bytes for memory, millicores for CPU). 0 {{- else -}} -{{/* Extract number and suffix */}} -{{- $number := "" -}} -{{- $suffix := "" -}} -{{- $i := 0 -}} -{{- range $char := (split "" $quantity) -}} - {{- if or (eq $char "0") (eq $char "1") (eq $char "2") (eq $char "3") (eq $char "4") (eq $char "5") (eq $char "6") (eq $char "7") (eq $char "8") (eq $char "9") (eq $char ".") -}} - {{- $number = printf "%s%s" $number $char -}} - {{- else -}} - {{- $suffix = substr ($i | int) (len $quantity | int) $quantity -}} - {{- break -}} - {{- end -}} - {{- $i = add $i 1 -}} -{{- end -}} - -{{/* Handle case where no suffix found (pure number) */}} -{{- if eq $suffix "" -}} - {{- $suffix = "" -}} -{{- end -}} +{{/* Extract number and suffix using regex */}} +{{- $number := regexFind "^[0-9.]+" $quantity -}} +{{- $suffix := trimPrefix $number $quantity -}} {{/* Parse the numeric part - handle decimals */}} {{- $intPart := 0 -}} From c475fab0f8ecbed02549e583d7e195fb5aca79e4 Mon Sep 17 00:00:00 2001 From: NicAtMS Date: Fri, 20 Mar 2026 07:33:07 -0700 Subject: [PATCH 9/9] Update values.yaml --- charts/azuremonitor-containerinsights/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/azuremonitor-containerinsights/values.yaml b/charts/azuremonitor-containerinsights/values.yaml index 2b6b05fd4..9cc83e245 100644 --- a/charts/azuremonitor-containerinsights/values.yaml +++ b/charts/azuremonitor-containerinsights/values.yaml @@ -30,7 +30,7 @@ legacyAddonDelivery: false # OmsAgent configuration OmsAgent: aksResourceID: - enableDaemonSetSizing: false + enableDaemonSetSizing: true isCustomMetricsDisabled: false isUsingAADAuth: "true" retinaFlowLogsEnabled: false