Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Updating the omsagent yaml file to include new changes for node zero …
Browse files Browse the repository at this point in the history
…dependency (#3277)
  • Loading branch information
rashmichandrashekar authored and jackfrancis committed Jun 15, 2018
1 parent bacb660 commit d8ccad5
Show file tree
Hide file tree
Showing 2 changed files with 233 additions and 77 deletions.
300 changes: 228 additions & 72 deletions parts/k8s/addons/omsagent-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ kind: ServiceAccount
metadata:
name: omsagent
namespace: kube-system
labels:
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: omsagent-reader
labels:
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
rules:
- apiGroups: [""]
resources: ["pods", "events", "nodes", "namespaces", "services"]
Expand All @@ -17,6 +23,9 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: omsagentclusterrolebinding
labels:
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
subjects:
- kind: ServiceAccount
name: omsagent
Expand All @@ -26,86 +35,233 @@ roleRef:
name: omsagent-reader
apiGroup: rbac.authorization.k8s.io
---
kind: ConfigMap
apiVersion: v1
data:
kube.conf: "# Fluentd config file for OMS Docker - cluster components (kubeAPI)\r\n\r\n#Kubernetes
pod inventory\r\n<source>\r\n\ttype kubepodinventory\r\n\ttag oms.containerinsights.KubePodInventory\r\n\trun_interval
60s\r\n log_level debug\r\n</source>\r\n\r\n#Kubernetes events\r\n<source>\r\n\ttype
kubeevents\r\n\ttag oms.api.KubeEvents.CollectionTime\r\n\trun_interval 60s\r\n
\ log_level debug\r\n</source>\r\n\r\n#Kubernetes logs\r\n<source>\r\n\ttype kubelogs\r\n\ttag
oms.api.KubeLogs\r\n\trun_interval 60s\r\n</source>\r\n\r\n#Kubernetes services\r\n<source>\r\n\ttype
kubeservices\r\n\ttag oms.api.KubeServices.CollectionTime\r\n\trun_interval 60s\r\n
\ log_level debug\r\n</source>\r\n\r\n#Kubernetes Nodes\r\n<source>\r\n\ttype
kubenodeinventory\r\n\ttag oms.containerinsights.KubeNodeInventory\r\n\trun_interval
60s\r\n log_level debug\r\n</source>\r\n\r\n#Kubernetes perf\r\n<source>\r\n\ttype
kubeperf\r\n\ttag oms.api.KubePerf\r\n\trun_interval 60s\r\n log_level debug\r\n</source>\r\n\r\n<match
oms.containerinsights.KubePodInventory**>\r\n type out_oms\r\n log_level debug\r\n
\ num_threads 5\r\n buffer_chunk_limit 20m\r\n buffer_type file\r\n buffer_path
%STATE_DIR_WS%/out_oms_kubepods*.buffer\r\n buffer_queue_limit 20\r\n buffer_queue_full_action
drop_oldest_chunk\r\n flush_interval 20s\r\n retry_limit 10\r\n retry_wait
30s\r\n max_retry_wait 9m\r\n</match>\r\n\r\n<match oms.api.KubeEvents**>\r\n\ttype
out_oms_api\r\n\tlog_level debug\r\n num_threads 5\r\n\tbuffer_chunk_limit 5m\r\n\tbuffer_type
file\r\n\tbuffer_path %STATE_DIR_WS%/out_oms_api_kubeevents*.buffer\r\n\tbuffer_queue_limit
10\r\n buffer_queue_full_action drop_oldest_chunk\r\n\tflush_interval 20s\r\n\tretry_limit
10\r\n\tretry_wait 30s\r\n</match>\r\n\r\n<match oms.api.KubeLogs**>\r\n\ttype
out_oms_api\r\n\tlog_level debug\r\n buffer_chunk_limit 10m\r\n\tbuffer_type
file\r\n\tbuffer_path %STATE_DIR_WS%/out_oms_api_kubernetes_logs*.buffer\r\n\tbuffer_queue_limit
10\r\n\tflush_interval 20s\r\n\tretry_limit 10\r\n\tretry_wait 30s\r\n</match>\r\n\r\n<match
oms.api.KubeServices**>\t \r\n type out_oms_api\r\n log_level debug\r\n num_threads
5\r\n buffer_chunk_limit 20m\r\n buffer_type file\r\n buffer_path %STATE_DIR_WS%/out_oms_kubeservices*.buffer\r\n
\ buffer_queue_limit 20\r\n buffer_queue_full_action drop_oldest_chunk\r\n flush_interval
20s\r\n retry_limit 10\r\n retry_wait 30s\r\n max_retry_wait 9m\r\n</match>\r\n\r\n<match
oms.containerinsights.KubeNodeInventory**>\r\n type out_oms\r\n log_level debug\r\n
\ num_threads 5\r\n buffer_chunk_limit 20m\r\n buffer_type file\r\n buffer_path
%STATE_DIR_WS%/state/out_oms_kubenodes*.buffer\r\n buffer_queue_limit 20\r\n
\ buffer_queue_full_action drop_oldest_chunk\r\n flush_interval 20s\r\n retry_limit
10\r\n retry_wait 30s\r\n max_retry_wait 9m\r\n</match>\r\n\r\n<match oms.api.KubePerf**>\t\r\n
\ type out_oms\r\n log_level debug\r\n num_threads 5\r\n buffer_chunk_limit
20m\r\n buffer_type file\r\n buffer_path %STATE_DIR_WS%/out_oms_kubeperf*.buffer\r\n
\ buffer_queue_limit 20\r\n buffer_queue_full_action drop_oldest_chunk\r\n flush_interval
20s\r\n retry_limit 10\r\n retry_wait 30s\r\n max_retry_wait 9m\r\n</match>\r\n"
metadata:
name: omsagent-rs-config
namespace: kube-system
labels:
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: omsagent
namespace: kube-system
labels:
component: oms-agent
tier: node
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
name: omsagent
namespace: kube-system
spec:
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: omsagent
agentVersion: <omsAgentVersion>
dockerProviderVersion: <dockerProviderVersion>
spec:
serviceAccountName: omsagent
containers:
- name: omsagent
image: <kubernetesContainerMonitoringSpec>
imagePullPolicy: IfNotPresent
selector:
matchLabels:
component: oms-agent
tier: node
template:
metadata:
annotations:
agentVersion: <omsAgentVersion>
dockerProviderVersion: <dockerProviderVersion>
labels:
component: oms-agent
tier: node
spec:
serviceAccountName: omsagent
containers:
- name: omsagent
image: <kubernetesContainerMonitoringSpec>
imagePullPolicy: Always
resources:
requests:
cpu: <kubernetesOMSAgentCPURequests>
memory: <kubernetesOMSAgentMemoryRequests>
limits:
cpu: <kubernetesOMSAgentCPULimit>
memory: <kubernetesOMSAgentMemoryLimit>
env:
- name: ACS_RESOURCE_NAME
value: "my_acs_cluster_name"
- name: DISABLE_KUBE_SYSTEM_LOG_COLLECTION
value: "true"
- name: WSID
value: <workspaceGuid>
- name: KEY
value: <workspaceKey>
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
securityContext:
privileged: true
ports:
- containerPort: 25225
protocol: TCP
- containerPort: 25224
protocol: UDP
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-sock
- mountPath: /var/log
name: host-log
- mountPath: /var/lib/docker/containers
name: containerlog-path
- name: ACS_RESOURCE_NAME
value: "my_acs_cluster_name"
- name: DISABLE_KUBE_SYSTEM_LOG_COLLECTION
value: "true"
- name: WSID
value: <workspaceGuid>
- name: KEY
value: <workspaceKey>
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
livenessProbe:
exec:
command:
- /bin/bash
- -c
- ps -ef | grep omsagent | grep -v "grep"
- /bin/bash
- -c
- ps -ef | grep omsagent | grep -v "grep"
initialDelaySeconds: 60
periodSeconds: 60
resources:
requests:
cpu: <kubernetesOMSAgentCPURequests>
memory: <kubernetesOMSAgentMemoryRequests>
limits:
cpu: <kubernetesOMSAgentCPULimit>
memory: <kubernetesOMSAgentMemoryLimit>
nodeSelector:
beta.kubernetes.io/os: linux
ports:
- containerPort: 25225
protocol: TCP
- containerPort: 25224
protocol: UDP
securityContext:
privileged: true
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-sock
- mountPath: /var/log
name: host-log
- mountPath: /var/lib/docker/containers
name: containerlog-path
nodeSelector:
beta.kubernetes.io/os: linux
# Tolerate a NoSchedule taint on master that ACS Engine sets.
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Equal"
value: "true"
effect: "NoSchedule"
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.sock
- name: container-hostname
hostPath:
path: /etc/hostname
- name: host-log
hostPath:
path: /var/log
- name: containerlog-path
hostPath:
path: /var/lib/docker/containers
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Equal"
value: "true"
effect: "NoSchedule"
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.sock
- name: container-hostname
hostPath:
path: /etc/hostname
- name: host-log
hostPath:
path: /var/log
- name: containerlog-path
hostPath:
path: /var/lib/docker/containers
updateStrategy:
type: RollingUpdate
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: omsagent-rs
namespace: kube-system
labels:
component: oms-agent
tier: node
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
replicas: 1
selector:
matchLabels:
rsName: "omsagent-rs"
strategy:
type: RollingUpdate
template:
metadata:
labels:
rsName: "omsagent-rs"
annotations:
agentVersion: <omsAgentVersion>
dockerProviderVersion: <dockerProviderVersion>
spec:
serviceAccountName: omsagent
containers:
- name: omsagent
image: <kubernetesContainerMonitoringSpec>
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: <kubernetesOMSAgentCPULimit>
memory: <kubernetesOMSAgentMemoryLimit>
requests:
cpu: <kubernetesOMSAgentCPURequests>
memory: <kubernetesOMSAgentMemoryRequests>
env:
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: AKS_CLUSTER_NAME
value: my_aks_cluster
- name: DISABLE_KUBE_SYSTEM_LOG_COLLECTION
value: "true"
securityContext:
privileged: true
ports:
- containerPort: 25225
protocol: TCP
- containerPort: 25224
protocol: UDP
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-sock
- mountPath: /var/log
name: host-log
- mountPath: /var/lib/docker/containers
name: containerlog-path
- mountPath : /etc/config
name: omsagent-rs-config
livenessProbe:
exec:
command:
- /bin/bash
- -c
- ps -ef | grep omsagent | grep -v "grep"
initialDelaySeconds: 60
periodSeconds: 60
nodeSelector:
beta.kubernetes.io/os: linux
kubernetes.io/role: agent
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.sock
- name: container-hostname
hostPath:
path: /etc/hostname
- name: host-log
hostPath:
path: /var/log
- name: containerlog-path
hostPath:
path: /var/lib/docker/containers
- name: omsagent-rs-config
configMap:
name: omsagent-rs-config
10 changes: 5 additions & 5 deletions pkg/acsengine/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,16 +321,16 @@ var (
Enabled: helpers.PointerToBool(api.DefaultContainerMonitoringAddonEnabled),
Config: map[string]string{
"omsAgentVersion": "1.6.0-42",
"dockerProviderVersion": "2.0.0-2",
"dockerProviderVersion": "2.0.0-3",
},
Containers: []api.KubernetesContainerSpec{
{
Name: "omsagent",
Image: "dockerio.azureedge.net/microsoft/oms:ciprod05082018",
Image: "dockerio.azureedge.net/microsoft/oms:ciprod06072018",
CPURequests: "50m",
MemoryRequests: "150Mi",
CPULimits: "50m",
MemoryLimits: "150Mi",
MemoryRequests: "100Mi",
CPULimits: "150m",
MemoryLimits: "500Mi",
},
},
}
Expand Down

0 comments on commit d8ccad5

Please sign in to comment.