зеркало из https://github.com/Azure/aks-engine.git
feat: updates for container monitoring addon omsagent agent Oct2021 release (#4703)
This commit is contained in:
Родитель
f086d85b51
Коммит
0dc8652b46
|
@ -75,7 +75,7 @@ data:
|
|||
type kubepodinventory
|
||||
tag oms.containerinsights.KubePodInventory
|
||||
run_interval 60
|
||||
log_level debug
|
||||
log_level debug
|
||||
</source>
|
||||
|
||||
#Kubernetes Persistent Volume inventory
|
||||
|
@ -135,7 +135,7 @@ data:
|
|||
</source>
|
||||
|
||||
<filter mdm.kubenodeinventory**>
|
||||
type filter_inventory2mdm
|
||||
type filter_inventory2mdm
|
||||
log_level info
|
||||
</filter>
|
||||
|
||||
|
@ -365,10 +365,10 @@ spec:
|
|||
spec:
|
||||
priorityClassName: system-node-critical
|
||||
serviceAccountName: omsagent
|
||||
dnsConfig:
|
||||
dnsConfig:
|
||||
options:
|
||||
- name: ndots
|
||||
value: "3"
|
||||
value: "3"
|
||||
containers:
|
||||
- name: omsagent
|
||||
image: {{ContainerImage "omsagent"}}
|
||||
|
@ -438,6 +438,59 @@ spec:
|
|||
- mountPath: /etc/config/settings/adx
|
||||
name: omsagent-adx-secret
|
||||
readOnly: true
|
||||
- name: omsagent-prometheus
|
||||
image: {{ContainerImage "omsagent"}}
|
||||
imagePullPolicy: IfNotPresent
|
||||
resources:
|
||||
limits:
|
||||
cpu: {{ContainerCPULimits "omsagent-prometheus"}}
|
||||
memory: {{ContainerMemLimits "omsagent-prometheus"}}
|
||||
requests:
|
||||
cpu: {{ContainerCPUReqs "omsagent-prometheus"}}
|
||||
memory: {{ContainerMemReqs "omsagent-prometheus"}}
|
||||
env:
|
||||
# azure devops pipeline uses AKS_RESOURCE_ID and AKS_REGION hence ensure to uncomment these
|
||||
- name: ACS_RESOURCE_NAME
|
||||
value: {{ContainerConfig "clusterName"}}
|
||||
- name: CONTROLLER_TYPE
|
||||
value: "DaemonSet"
|
||||
- name: ISTEST
|
||||
value: "true"
|
||||
- name: CONTAINER_TYPE
|
||||
value: "PrometheusSidecar"
|
||||
- name: CONTROLLER_TYPE
|
||||
value: "DaemonSet"
|
||||
- name: NODE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: USER_ASSIGNED_IDENTITY_CLIENT_ID
|
||||
value: ""
|
||||
- name: USING_AAD_MSI_AUTH
|
||||
value: "false"
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kubernetes/host
|
||||
name: azure-json-path
|
||||
- mountPath: /etc/omsagent-secret
|
||||
name: omsagent-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
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- /opt/livenessprobe.sh
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 60
|
||||
timeoutSeconds: 15
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
|
@ -557,7 +610,7 @@ spec:
|
|||
- name: USER_ASSIGNED_IDENTITY_CLIENT_ID
|
||||
value: ""
|
||||
- name: SIDECAR_SCRAPING_ENABLED
|
||||
value: "false"
|
||||
value: "true"
|
||||
securityContext:
|
||||
privileged: true
|
||||
ports:
|
||||
|
@ -690,10 +743,10 @@ spec:
|
|||
schema-versions: {{ContainerConfig "schema-versions"}}
|
||||
spec:
|
||||
serviceAccountName: omsagent
|
||||
dnsConfig:
|
||||
dnsConfig:
|
||||
options:
|
||||
- name: ndots
|
||||
value: "3"
|
||||
value: "3"
|
||||
containers:
|
||||
- name: omsagent-win
|
||||
image: {{ContainerImage "omsagent-win"}}
|
||||
|
@ -720,7 +773,7 @@ spec:
|
|||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: SIDECAR_SCRAPING_ENABLED
|
||||
value: "false"
|
||||
value: "true"
|
||||
volumeMounts:
|
||||
- mountPath: C:\ProgramData\docker\containers
|
||||
name: docker-windows-containers
|
||||
|
@ -741,7 +794,11 @@ spec:
|
|||
command:
|
||||
- cmd
|
||||
- /c
|
||||
- C:\opt\omsagentwindows\scripts\cmd\livenessProbe.cmd
|
||||
- C:\opt\omsagentwindows\scripts\cmd\livenessprobe.exe
|
||||
- fluent-bit.exe
|
||||
- fluentdwinaks
|
||||
- "C:\\etc\\omsagentwindows\\filesystemwatcher.txt"
|
||||
- "C:\\etc\\omsagentwindows\\renewcertificate.txt"
|
||||
periodSeconds: 60
|
||||
initialDelaySeconds: 180
|
||||
affinity:
|
||||
|
|
|
@ -31,21 +31,21 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) {
|
|||
kubernetesImageBase = o.KubernetesConfig.KubernetesImageBase
|
||||
}
|
||||
k8sComponents := GetK8sComponentsByVersionMap(o.KubernetesConfig)[o.OrchestratorVersion]
|
||||
omsagentImage := "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod03262021"
|
||||
omsagentWinImage := "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:win-ciprod03262021"
|
||||
omsagentImage := "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod10132021"
|
||||
omsagentWinImage := "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:win-ciprod10132021"
|
||||
var workspaceDomain string
|
||||
if cs.Properties.IsCustomCloudProfile() {
|
||||
dependenciesLocation := string(cs.Properties.CustomCloudProfile.DependenciesLocation)
|
||||
workspaceDomain = helpers.GetLogAnalyticsWorkspaceDomain(dependenciesLocation)
|
||||
if strings.EqualFold(dependenciesLocation, "china") {
|
||||
omsagentImage = "mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod03262021"
|
||||
omsagentWinImage = "mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:win-ciprod03262021"
|
||||
omsagentImage = "mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod10132021"
|
||||
omsagentWinImage = "mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:win-ciprod10132021"
|
||||
}
|
||||
} else {
|
||||
workspaceDomain = helpers.GetLogAnalyticsWorkspaceDomain(cloudSpecConfig.CloudName)
|
||||
if strings.EqualFold(cloudSpecConfig.CloudName, "AzureChinaCloud") {
|
||||
omsagentImage = "mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod03262021"
|
||||
omsagentWinImage = "mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:win-ciprod03262021"
|
||||
omsagentImage = "mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod10132021"
|
||||
omsagentWinImage = "mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:win-ciprod10132021"
|
||||
}
|
||||
}
|
||||
workspaceDomain = base64.StdEncoding.EncodeToString([]byte(workspaceDomain))
|
||||
|
@ -230,7 +230,7 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) {
|
|||
Enabled: to.BoolPtr(DefaultContainerMonitoringAddonEnabled && !cs.Properties.IsAzureStackCloud()),
|
||||
Config: map[string]string{
|
||||
"omsAgentVersion": "1.10.0.1",
|
||||
"dockerProviderVersion": "14.0.0-0",
|
||||
"dockerProviderVersion": "16.0.0-0",
|
||||
"schema-versions": "v1",
|
||||
"clusterName": clusterDNSPrefix,
|
||||
"workspaceDomain": workspaceDomain,
|
||||
|
@ -252,6 +252,14 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) {
|
|||
MemoryLimits: "1Gi",
|
||||
Image: omsagentImage,
|
||||
},
|
||||
{
|
||||
Name: "omsagent-prometheus",
|
||||
CPURequests: "75m",
|
||||
MemoryRequests: "225Mi",
|
||||
CPULimits: "500m",
|
||||
MemoryLimits: "1Gi",
|
||||
Image: omsagentImage,
|
||||
},
|
||||
{
|
||||
Name: "omsagent-win",
|
||||
CPULimits: "200m",
|
||||
|
|
|
@ -1471,7 +1471,7 @@ func TestSetAddonsConfig(t *testing.T) {
|
|||
Enabled: to.BoolPtr(true),
|
||||
Config: map[string]string{
|
||||
"omsAgentVersion": "1.10.0.1",
|
||||
"dockerProviderVersion": "14.0.0-0",
|
||||
"dockerProviderVersion": "16.0.0-0",
|
||||
"schema-versions": "v1",
|
||||
"clusterName": "aks-engine-cluster",
|
||||
"workspaceDomain": "b3BpbnNpZ2h0cy5henVyZS5jb20=",
|
||||
|
@ -1483,7 +1483,7 @@ func TestSetAddonsConfig(t *testing.T) {
|
|||
MemoryRequests: "225Mi",
|
||||
CPULimits: "500m",
|
||||
MemoryLimits: "600Mi",
|
||||
Image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod03262021",
|
||||
Image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod10132021",
|
||||
},
|
||||
{
|
||||
Name: "omsagent-rs",
|
||||
|
@ -1491,13 +1491,21 @@ func TestSetAddonsConfig(t *testing.T) {
|
|||
MemoryRequests: "250Mi",
|
||||
CPULimits: "1",
|
||||
MemoryLimits: "1Gi",
|
||||
Image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod03262021",
|
||||
Image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod10132021",
|
||||
},
|
||||
{
|
||||
Name: "omsagent-prometheus",
|
||||
CPURequests: "75m",
|
||||
MemoryRequests: "225Mi",
|
||||
CPULimits: "500m",
|
||||
MemoryLimits: "1Gi",
|
||||
Image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod10132021",
|
||||
},
|
||||
{
|
||||
Name: "omsagent-win",
|
||||
CPULimits: "200m",
|
||||
MemoryLimits: "600Mi",
|
||||
Image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:win-ciprod03262021",
|
||||
Image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:win-ciprod10132021",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -244,7 +244,7 @@ func TestAssignDefaultAddonImages(t *testing.T) {
|
|||
common.DashboardAddonName: k8sComponents[common.DashboardAddonName],
|
||||
common.MetricsServerAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.MetricsServerAddonName],
|
||||
common.NVIDIADevicePluginAddonName: specConfig.NVIDIAImageBase + k8sComponents[common.NVIDIADevicePluginAddonName],
|
||||
common.ContainerMonitoringAddonName: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod03262021",
|
||||
common.ContainerMonitoringAddonName: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod10132021",
|
||||
common.IPMASQAgentAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.IPMASQAgentAddonName],
|
||||
common.CalicoAddonName: specConfig.CalicoImageBase + k8sComponents[common.CalicoTyphaComponentName],
|
||||
common.AzureNetworkPolicyAddonName: k8sComponents[common.AzureNetworkPolicyAddonName],
|
||||
|
|
|
@ -7931,7 +7931,7 @@ data:
|
|||
type kubepodinventory
|
||||
tag oms.containerinsights.KubePodInventory
|
||||
run_interval 60
|
||||
log_level debug
|
||||
log_level debug
|
||||
</source>
|
||||
|
||||
#Kubernetes Persistent Volume inventory
|
||||
|
@ -7991,7 +7991,7 @@ data:
|
|||
</source>
|
||||
|
||||
<filter mdm.kubenodeinventory**>
|
||||
type filter_inventory2mdm
|
||||
type filter_inventory2mdm
|
||||
log_level info
|
||||
</filter>
|
||||
|
||||
|
@ -8221,10 +8221,10 @@ spec:
|
|||
spec:
|
||||
priorityClassName: system-node-critical
|
||||
serviceAccountName: omsagent
|
||||
dnsConfig:
|
||||
dnsConfig:
|
||||
options:
|
||||
- name: ndots
|
||||
value: "3"
|
||||
value: "3"
|
||||
containers:
|
||||
- name: omsagent
|
||||
image: {{ContainerImage "omsagent"}}
|
||||
|
@ -8294,6 +8294,59 @@ spec:
|
|||
- mountPath: /etc/config/settings/adx
|
||||
name: omsagent-adx-secret
|
||||
readOnly: true
|
||||
- name: omsagent-prometheus
|
||||
image: {{ContainerImage "omsagent"}}
|
||||
imagePullPolicy: IfNotPresent
|
||||
resources:
|
||||
limits:
|
||||
cpu: {{ContainerCPULimits "omsagent-prometheus"}}
|
||||
memory: {{ContainerMemLimits "omsagent-prometheus"}}
|
||||
requests:
|
||||
cpu: {{ContainerCPUReqs "omsagent-prometheus"}}
|
||||
memory: {{ContainerMemReqs "omsagent-prometheus"}}
|
||||
env:
|
||||
# azure devops pipeline uses AKS_RESOURCE_ID and AKS_REGION hence ensure to uncomment these
|
||||
- name: ACS_RESOURCE_NAME
|
||||
value: {{ContainerConfig "clusterName"}}
|
||||
- name: CONTROLLER_TYPE
|
||||
value: "DaemonSet"
|
||||
- name: ISTEST
|
||||
value: "true"
|
||||
- name: CONTAINER_TYPE
|
||||
value: "PrometheusSidecar"
|
||||
- name: CONTROLLER_TYPE
|
||||
value: "DaemonSet"
|
||||
- name: NODE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: USER_ASSIGNED_IDENTITY_CLIENT_ID
|
||||
value: ""
|
||||
- name: USING_AAD_MSI_AUTH
|
||||
value: "false"
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kubernetes/host
|
||||
name: azure-json-path
|
||||
- mountPath: /etc/omsagent-secret
|
||||
name: omsagent-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
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- /opt/livenessprobe.sh
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 60
|
||||
timeoutSeconds: 15
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
|
@ -8413,7 +8466,7 @@ spec:
|
|||
- name: USER_ASSIGNED_IDENTITY_CLIENT_ID
|
||||
value: ""
|
||||
- name: SIDECAR_SCRAPING_ENABLED
|
||||
value: "false"
|
||||
value: "true"
|
||||
securityContext:
|
||||
privileged: true
|
||||
ports:
|
||||
|
@ -8546,10 +8599,10 @@ spec:
|
|||
schema-versions: {{ContainerConfig "schema-versions"}}
|
||||
spec:
|
||||
serviceAccountName: omsagent
|
||||
dnsConfig:
|
||||
dnsConfig:
|
||||
options:
|
||||
- name: ndots
|
||||
value: "3"
|
||||
value: "3"
|
||||
containers:
|
||||
- name: omsagent-win
|
||||
image: {{ContainerImage "omsagent-win"}}
|
||||
|
@ -8576,7 +8629,7 @@ spec:
|
|||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: SIDECAR_SCRAPING_ENABLED
|
||||
value: "false"
|
||||
value: "true"
|
||||
volumeMounts:
|
||||
- mountPath: C:\ProgramData\docker\containers
|
||||
name: docker-windows-containers
|
||||
|
@ -8597,7 +8650,11 @@ spec:
|
|||
command:
|
||||
- cmd
|
||||
- /c
|
||||
- C:\opt\omsagentwindows\scripts\cmd\livenessProbe.cmd
|
||||
- C:\opt\omsagentwindows\scripts\cmd\livenessprobe.exe
|
||||
- fluent-bit.exe
|
||||
- fluentdwinaks
|
||||
- "C:\\etc\\omsagentwindows\\filesystemwatcher.txt"
|
||||
- "C:\\etc\\omsagentwindows\\renewcertificate.txt"
|
||||
periodSeconds: 60
|
||||
initialDelaySeconds: 180
|
||||
affinity:
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
}
|
||||
],
|
||||
"config": {
|
||||
"dockerProviderVersion": "14.0.0-0",
|
||||
"dockerProviderVersion": "16.0.0-0",
|
||||
"omsAgentVersion": "1.10.0.1"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1675,7 +1675,7 @@ func (p *Pod) ValidateOmsAgentLogs(execCmdString string, sleep, timeout time.Dur
|
|||
case <-ctx.Done():
|
||||
return
|
||||
default:
|
||||
ch <- p.ExecAsync("grep", "-i", execCmdString, "/var/opt/microsoft/omsagent/log/omsagent.log")
|
||||
ch <- p.ExecAsync("grep", "-i", execCmdString, "/var/opt/microsoft/docker-cimprov/log/fluentd.log")
|
||||
time.Sleep(sleep)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
"env": {
|
||||
"GINKGO_SKIP": "should be able to rotate docker logs"
|
||||
},
|
||||
"apiModel": {
|
||||
"apiVersion": "vlabs",
|
||||
"properties": {
|
||||
"orchestratorProfile": {
|
||||
|
@ -56,5 +52,4 @@
|
|||
"sshEnabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче