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

Updating the omsagent yaml file to include new changes for node zero dependency #3277

Merged
merged 48 commits into from
Jun 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
860c20e
first stab at enabling container monitoring add on
May 17, 2018
2a2697a
Merge remote-tracking branch 'refs/remotes/upstream/master'
May 21, 2018
a046d1d
addressing PR comments
May 21, 2018
e94195f
making changes to enable container monitoring enabled by default
May 25, 2018
a3afdac
Merge remote-tracking branch 'refs/remotes/upstream/master'
May 25, 2018
867ff17
removing test from kubernetes_test
May 25, 2018
9a349d4
moving defaultcontainermonitoringconfig in defaults.go file
May 25, 2018
42b4f74
updating test for kube version 1.9
May 25, 2018
9508cbf
adding container-monitoring to k8scomponentversions
May 25, 2018
81563f3
Merge remote-tracking branch 'refs/remotes/upstream/master'
May 25, 2018
52665f3
adding test to Kubernetes_test.go
May 25, 2018
64a84d6
editing custom data file
May 26, 2018
13ff3ce
Merge remote-tracking branch 'refs/remotes/upstream/master'
May 26, 2018
fe6949a
updating the yaml reference
May 26, 2018
2954cb0
updating test in case of add on disabled
May 29, 2018
f40d5b0
Merge remote-tracking branch 'refs/remotes/upstream/master'
May 29, 2018
54e17c7
fix gofmt and ineffectual assignment, engage e2e
jackfrancis May 29, 2018
658dff0
fixing oms inage to spec
May 30, 2018
7326e44
Merge remote-tracking branch 'refs/remotes/upstream/master'
May 30, 2018
bc28e0a
syntax
jackfrancis May 30, 2018
6e04b42
merging with remote changes
May 30, 2018
d9e4d8c
Merge branch 'master' of https://github.com/rashmichandrashekar/acs-e…
May 30, 2018
77ed7e0
finxing white spaces
May 30, 2018
a999520
Merge remote-tracking branch 'refs/remotes/upstream/master'
May 30, 2018
4be0b14
adding comma ro defaults.go
May 30, 2018
dac8ac6
Merge remote-tracking branch 'refs/remotes/upstream/master'
May 30, 2018
5974c1e
updating agent to omsagent
May 30, 2018
47d2ec3
updating types_test.go
May 30, 2018
5f4bf3c
Merge remote-tracking branch 'refs/remotes/upstream/master'
May 30, 2018
21fb73c
fixing indentation
May 30, 2018
d950f9b
fixing k8s versions test
May 30, 2018
bf1b734
removing container monitoring from k8s_versions_test
May 30, 2018
7a8887b
fixing params to include all variables
May 30, 2018
cd7712e
updating changes e2e
May 30, 2018
677cc82
fixing gofmt errors
May 30, 2018
51262ea
fixing cmC variable definition
May 30, 2018
012be65
fixing kubernetes master custom data.yml file
May 30, 2018
0d614ce
fixing versions
May 30, 2018
5aba1df
Merge remote-tracking branch 'refs/remotes/upstream/master'
May 30, 2018
3d01a03
updating pod name in kubernetes test
May 30, 2018
88b7957
updating kubernetes container spec to omsagent
May 30, 2018
ac8bc54
Merge remote-tracking branch 'refs/remotes/upstream/master'
May 30, 2018
9d4ef4e
updating cluster name and removing other lcuster params
May 30, 2018
685b14c
syncing to remote master
Jun 14, 2018
bf4587a
updating the yaml file to include the replica set and node zero depen…
Jun 14, 2018
085e514
undoing changes from local branch tp reflect latest changes
Jun 14, 2018
fe22a78
Merge remote-tracking branch 'upstream/master'
Jun 14, 2018
25d08ce
deleting unused file
Jun 14, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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