diff --git a/charts/azuremonitor-containerinsights/templates/_helpers.tpl b/charts/azuremonitor-containerinsights/templates/_helpers.tpl index b859282a6..012e99e28 100644 --- a/charts/azuremonitor-containerinsights/templates/_helpers.tpl +++ b/charts/azuremonitor-containerinsights/templates/_helpers.tpl @@ -103,4 +103,121 @@ 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 using regex */}} +{{- $number := regexFind "^[0-9.]+" $quantity -}} +{{- $suffix := trimPrefix $number $quantity -}} + +{{/* 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 -}} + {{- $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 -}} + +{{/* 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.yaml b/charts/azuremonitor-containerinsights/templates/ama-logs-daemonset.yaml index f46d6c8c1..6b6d57f42 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 -}} @@ -35,24 +35,22 @@ 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 }} - 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 }} -{{/* {{- 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,25 +81,23 @@ 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 }} - 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 +107,7 @@ spec: priorityClassName: system-node-critical {{- end }} {{- if $isArcExtension }} -{{- if .Values.amalogs.rbac }} +{{- if $.Values.amalogs.rbac }} serviceAccountName: ama-logs {{- end }} {{- else }} @@ -126,8 +120,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 +129,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 +140,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 +190,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 +225,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 @@ -245,8 +239,8 @@ spec: resources: limits: {{- $containerResources := index $size.containers "ama-logs" }} - cpu: {{ $containerResources.cpuLimit }} - memory: {{ $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 }} @@ -254,25 +248,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 +289,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 +313,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 +333,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 +364,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 +434,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 +460,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 +473,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 +506,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 +517,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 +526,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 +534,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 +552,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 +593,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 +608,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 +618,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 +641,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 @@ -658,8 +652,8 @@ spec: resources: limits: {{- $containerResources := index $size.containers "ama-logs-prometheus" }} - cpu: {{ $containerResources.cpuLimit }} - memory: {{ $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 }} @@ -679,28 +673,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 +705,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 +737,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 +745,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 +768,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 .Values.global.commonGlobals.isAutomaticSKU .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 +835,7 @@ spec: {{/* Volumes */}} volumes: {{- if $isArcExtension }} - {{- if .Values.amalogs.enableServiceAccountTimeBoundToken }} + {{- if $.Values.amalogs.enableServiceAccountTimeBoundToken }} - name: kube-api-access projected: sources: @@ -875,12 +869,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 +902,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 +917,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/ diff --git a/charts/azuremonitor-containerinsights/values.yaml b/charts/azuremonitor-containerinsights/values.yaml index f50ca8e51..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 @@ -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: ""