Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ metadata:
rules:
- apiGroups: [""]
resources: ["pods", "events", "nodes", "namespaces", "services"]
verbs: ["list"]
verbs: ["list", "get", "watch"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
Expand Down Expand Up @@ -194,7 +196,7 @@ data:
max_retry_wait 9m
</match>

<match oms.api.ContainerNodeInventory**>
<match oms.containerinsights.ContainerNodeInventory**>
type out_oms_api
log_level debug
buffer_chunk_limit 20m
Expand Down Expand Up @@ -295,6 +297,7 @@ spec:
annotations:
agentVersion: {{ContainerConfig "omsAgentVersion"}}
dockerProviderVersion: {{ContainerConfig "dockerProviderVersion"}}
schema-versions: {{ContainerConfig "schema-versions"}}
labels:
component: oms-agent
tier: node
Expand All @@ -318,9 +321,7 @@ spec:
fieldRef:
fieldPath: status.hostIP
- name: ACS_RESOURCE_NAME
value: "aks-engine-cluster"
- name: DISABLE_KUBE_SYSTEM_LOG_COLLECTION
value: "true"
value: {{ContainerConfig "clusterName"}}
- name: CONTROLLER_TYPE
value: "DaemonSet"
- name: ISTEST
Expand All @@ -330,7 +331,7 @@ spec:
command:
- /bin/bash
- -c
- (ps -ef | grep omsagent | grep -v "grep") && (ps -ef | grep td-agent-bit | grep -v "grep")
- /opt/livenessprobe.sh
initialDelaySeconds: 60
periodSeconds: 60
ports:
Expand All @@ -354,6 +355,8 @@ spec:
- mountPath: /etc/omsagent-secret
name: omsagent-secret
readOnly: true
- mountPath: /etc/config/settings
name: settings-vol-config
nodeSelector:
beta.kubernetes.io/os: linux
tolerations:
Expand Down Expand Up @@ -383,6 +386,10 @@ spec:
- name: omsagent-secret
secret:
secretName: omsagent-secret
- name: settings-vol-config
configMap:
name: container-azm-ms-agentconfig
optional: true
updateStrategy:
type: RollingUpdate
---
Expand Down Expand Up @@ -410,6 +417,7 @@ spec:
annotations:
agentVersion: {{ContainerConfig "omsAgentVersion"}}
dockerProviderVersion: {{ContainerConfig "dockerProviderVersion"}}
schema-versions: {{ContainerConfig "schema-versions"}}
spec:
serviceAccountName: omsagent
containers:
Expand All @@ -429,9 +437,7 @@ spec:
fieldRef:
fieldPath: status.hostIP
- name: ACS_RESOURCE_NAME
value: "aks-engine-cluster"
- name: DISABLE_KUBE_SYSTEM_LOG_COLLECTION
value: "true"
value: {{ContainerConfig "clusterName"}}
- name: CONTROLLER_TYPE
value: "ReplicaSet"
- name: ISTEST
Expand All @@ -457,12 +463,14 @@ spec:
readOnly: true
- mountPath : /etc/config
name: omsagent-rs-config
- mountPath: /etc/config/settings
name: settings-vol-config
livenessProbe:
exec:
command:
- /bin/bash
- -c
- ps -ef | grep omsagent | grep -v \"grep\"
- /opt/livenessprobe.sh
initialDelaySeconds: 60
periodSeconds: 60
nodeSelector:
Expand Down Expand Up @@ -490,3 +498,7 @@ spec:
- name: omsagent-rs-config
configMap:
name: omsagent-rs-config
- name: settings-vol-config
configMap:
name: container-azm-ms-agentconfig
optional: true
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ metadata:
rules:
- apiGroups: [""]
resources: ["pods", "events", "nodes", "namespaces", "services"]
verbs: ["list"]
verbs: ["list", "get", "watch"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
Expand Down Expand Up @@ -194,7 +196,7 @@ data:
max_retry_wait 9m
</match>

<match oms.api.ContainerNodeInventory**>
<match oms.containerinsights.ContainerNodeInventory**>
type out_oms_api
log_level debug
buffer_chunk_limit 20m
Expand Down Expand Up @@ -295,6 +297,7 @@ spec:
annotations:
agentVersion: {{ContainerConfig "omsAgentVersion"}}
dockerProviderVersion: {{ContainerConfig "dockerProviderVersion"}}
schema-versions: {{ContainerConfig "schema-versions"}}
labels:
component: oms-agent
tier: node
Expand All @@ -318,9 +321,7 @@ spec:
fieldRef:
fieldPath: status.hostIP
- name: ACS_RESOURCE_NAME
value: "aks-engine-cluster"
- name: DISABLE_KUBE_SYSTEM_LOG_COLLECTION
value: "true"
value: {{ContainerConfig "clusterName"}}
- name: CONTROLLER_TYPE
value: "DaemonSet"
- name: ISTEST
Expand All @@ -330,7 +331,7 @@ spec:
command:
- /bin/bash
- -c
- (ps -ef | grep omsagent | grep -v "grep") && (ps -ef | grep td-agent-bit | grep -v "grep")
- /opt/livenessprobe.sh
initialDelaySeconds: 60
periodSeconds: 60
ports:
Expand All @@ -354,6 +355,8 @@ spec:
- mountPath: /etc/omsagent-secret
name: omsagent-secret
readOnly: true
- mountPath: /etc/config/settings
name: settings-vol-config
nodeSelector:
beta.kubernetes.io/os: linux
tolerations:
Expand Down Expand Up @@ -383,6 +386,10 @@ spec:
- name: omsagent-secret
secret:
secretName: omsagent-secret
- name: settings-vol-config
configMap:
name: container-azm-ms-agentconfig
optional: true
updateStrategy:
type: RollingUpdate
---
Expand Down Expand Up @@ -410,6 +417,7 @@ spec:
annotations:
agentVersion: {{ContainerConfig "omsAgentVersion"}}
dockerProviderVersion: {{ContainerConfig "dockerProviderVersion"}}
schema-versions: {{ContainerConfig "schema-versions"}}
spec:
serviceAccountName: omsagent
containers:
Expand All @@ -429,9 +437,7 @@ spec:
fieldRef:
fieldPath: status.hostIP
- name: ACS_RESOURCE_NAME
value: "aks-engine-cluster"
- name: DISABLE_KUBE_SYSTEM_LOG_COLLECTION
value: "true"
value: {{ContainerConfig "clusterName"}}
- name: CONTROLLER_TYPE
value: "ReplicaSet"
- name: ISTEST
Expand All @@ -457,12 +463,14 @@ spec:
readOnly: true
- mountPath : /etc/config
name: omsagent-rs-config
- mountPath: /etc/config/settings
name: settings-vol-config
livenessProbe:
exec:
command:
- /bin/bash
- -c
- ps -ef | grep omsagent | grep -v \"grep\"
- /opt/livenessprobe.sh
initialDelaySeconds: 60
periodSeconds: 60
nodeSelector:
Expand Down Expand Up @@ -490,3 +498,7 @@ spec:
- name: omsagent-rs-config
configMap:
name: omsagent-rs-config
- name: settings-vol-config
configMap:
name: container-azm-ms-agentconfig
optional: true
14 changes: 10 additions & 4 deletions pkg/api/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import (

func (cs *ContainerService) setAddonsConfig(isUpdate bool) {
o := cs.Properties.OrchestratorProfile
clusterDNSPrefix := "aks-engine-cluster"
if cs != nil && cs.Properties != nil && cs.Properties.MasterProfile != nil && cs.Properties.MasterProfile.DNSPrefix != "" {
clusterDNSPrefix = cs.Properties.MasterProfile.DNSPrefix
}
cloudSpecConfig := cs.GetCloudSpecConfig()
k8sComponents := K8sComponentsByVersionMap[o.OrchestratorVersion]
specConfig := cloudSpecConfig.KubernetesSpecConfig
Expand Down Expand Up @@ -205,16 +209,18 @@ func (cs *ContainerService) setAddonsConfig(isUpdate bool) {
Enabled: to.BoolPtr(DefaultContainerMonitoringAddonEnabled && !cs.Properties.IsAzureStackCloud()),
Config: map[string]string{
"omsAgentVersion": "1.10.0.1",
"dockerProviderVersion": "4.0.0-0",
"dockerProviderVersion": "6.0.0-0",
"schema-versions": "v1",
"clusterName": clusterDNSPrefix,
},
Containers: []KubernetesContainerSpec{
{
Name: "omsagent",
CPURequests: "50m",
CPURequests: "75m",
MemoryRequests: "225Mi",
CPULimits: "150m",
MemoryLimits: "500Mi",
Image: "microsoft/oms:ciprod04232019",
MemoryLimits: "600Mi",
Image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod07092019",
},
},
}
Expand Down
10 changes: 6 additions & 4 deletions pkg/api/addons_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1481,16 +1481,18 @@ func TestSetAddonsConfig(t *testing.T) {
Enabled: to.BoolPtr(true),
Config: map[string]string{
"omsAgentVersion": "1.10.0.1",
"dockerProviderVersion": "4.0.0-0",
"dockerProviderVersion": "6.0.0-0",
"schema-versions": "v1",
"clusterName": "aks-engine-cluster",
},
Containers: []KubernetesContainerSpec{
{
Name: "omsagent",
CPURequests: "50m",
CPURequests: "75m",
MemoryRequests: "225Mi",
CPULimits: "150m",
MemoryLimits: "500Mi",
Image: "microsoft/oms:ciprod04232019",
MemoryLimits: "600Mi",
Image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod07092019",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func TestAssignDefaultAddonImages(t *testing.T) {
ReschedulerAddonName: "k8s.gcr.io/rescheduler:v0.3.1",
MetricsServerAddonName: "k8s.gcr.io/metrics-server-amd64:v0.2.1",
NVIDIADevicePluginAddonName: "nvidia/k8s-device-plugin:1.10",
ContainerMonitoringAddonName: "microsoft/oms:ciprod04232019",
ContainerMonitoringAddonName: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod07092019",
IPMASQAgentAddonName: "k8s.gcr.io/ip-masq-agent-amd64:v2.3.0",
AzureCNINetworkMonitoringAddonName: "mcr.microsoft.com/containernetworking/networkmonitor:v0.0.6",
DNSAutoscalerAddonName: "k8s.gcr.io/cluster-proportional-autoscaler-amd64:1.1.1",
Expand Down
Loading