From b4484f87eb370fa8440f0f35eae6cb770ce6333b Mon Sep 17 00:00:00 2001 From: r-dilip Date: Sat, 24 Aug 2019 15:42:56 -0700 Subject: [PATCH 1/4] Expose replica set service as an env variable --- Kubernetes/omsagent-ai-res-id.yaml | 914 +++++++++++++++-------------- Kubernetes/omsagent.yaml | 914 +++++++++++++++-------------- 2 files changed, 916 insertions(+), 912 deletions(-) diff --git a/Kubernetes/omsagent-ai-res-id.yaml b/Kubernetes/omsagent-ai-res-id.yaml index b5a97525..f6ee1af3 100644 --- a/Kubernetes/omsagent-ai-res-id.yaml +++ b/Kubernetes/omsagent-ai-res-id.yaml @@ -9,17 +9,17 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 metadata: name: omsagent-user rules: -- apiGroups: [""] - resources: ["pods", "events", "nodes", "namespaces", "services"] - verbs: ["list", "get", "watch"] -- apiGroups: ["extensions"] - resources: ["deployments"] - verbs: ["list"] -- apiGroups: ["azmon.container.insights"] - resources: ["healthstates"] - verbs: ["get", "create", "patch"] -- nonResourceURLs: ["/metrics"] - verbs: ["get"] + - apiGroups: [""] + resources: ["pods", "events", "nodes", "namespaces", "services"] + verbs: ["list", "get", "watch"] + - apiGroups: ["extensions"] + resources: ["deployments"] + verbs: ["list"] + - apiGroups: ["azmon.container.insights"] + resources: ["healthstates"] + verbs: ["get", "create", "patch"] + - nonResourceURLs: ["/metrics"] + verbs: ["get"] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1beta1 @@ -45,255 +45,255 @@ metadata: kind: ConfigMap apiVersion: v1 data: - kube.conf: |- - # Fluentd config file for OMS Docker - cluster components (kubeAPI) - #fluent forward plugin - - type forward - port 25227 - bind 0.0.0.0 - + kube.conf: |- + # Fluentd config file for OMS Docker - cluster components (kubeAPI) + #fluent forward plugin + + type forward + port 25227 + bind 0.0.0.0 + + + #Kubernetes pod inventory + + type kubepodinventory + tag oms.containerinsights.KubePodInventory + run_interval 60s + log_level debug + - #Kubernetes pod inventory - - type kubepodinventory - tag oms.containerinsights.KubePodInventory - run_interval 60s - log_level debug + #Kubernetes events + + type kubeevents + tag oms.containerinsights.KubeEvents + run_interval 60s + log_level debug - #Kubernetes events - - type kubeevents - tag oms.containerinsights.KubeEvents - run_interval 60s - log_level debug - + #Kubernetes logs + + type kubelogs + tag oms.api.KubeLogs + run_interval 60s + - #Kubernetes logs - - type kubelogs - tag oms.api.KubeLogs - run_interval 60s - + #Kubernetes services + + type kubeservices + tag oms.containerinsights.KubeServices + run_interval 60s + log_level debug + - #Kubernetes services - - type kubeservices - tag oms.containerinsights.KubeServices - run_interval 60s - log_level debug - + #Kubernetes Nodes + + type kubenodeinventory + tag oms.containerinsights.KubeNodeInventory + run_interval 60s + log_level debug + - #Kubernetes Nodes - - type kubenodeinventory - tag oms.containerinsights.KubeNodeInventory - run_interval 60s - log_level debug - + #Kubernetes perf + + type kubeperf + tag oms.api.KubePerf + run_interval 60s + log_level debug + - #Kubernetes perf - - type kubeperf - tag oms.api.KubePerf - run_interval 60s - log_level debug - + #Kubernetes health + + type kubehealth + tag oms.api.KubeHealth.ReplicaSet + run_interval 60s + log_level debug + - #Kubernetes health - - type kubehealth - tag oms.api.KubeHealth.ReplicaSet - run_interval 60s - log_level debug - - - #cadvisor perf- Windows nodes - - type wincadvisorperf - tag oms.api.wincadvisorperf - run_interval 60s - log_level debug - + #cadvisor perf- Windows nodes + + type wincadvisorperf + tag oms.api.wincadvisorperf + run_interval 60s + log_level debug + - - type filter_inventory2mdm - custom_metrics_azure_regions eastus,southcentralus,westcentralus,westus2,southeastasia,northeurope,westEurope - log_level info - + + type filter_inventory2mdm + custom_metrics_azure_regions eastus,southcentralus,westcentralus,westus2,southeastasia,northeurope,westEurope + log_level info + - # custom_metrics_mdm filter plugin for perf data from windows nodes - - type filter_cadvisor2mdm - custom_metrics_azure_regions eastus,southcentralus,westcentralus,westus2,southeastasia,northeurope,westEurope - metrics_to_collect cpuUsageNanoCores,memoryWorkingSetBytes - log_level info - + # custom_metrics_mdm filter plugin for perf data from windows nodes + + type filter_cadvisor2mdm + custom_metrics_azure_regions eastus,southcentralus,westcentralus,westus2,southeastasia,northeurope,westEurope + metrics_to_collect cpuUsageNanoCores,memoryWorkingSetBytes + log_level info + - #health model aggregation filter - - type filter_health_model_builder - + #health model aggregation filter + + type filter_health_model_builder + - - type out_oms - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_kubepods*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_kubepods*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + - - type out_oms - log_level debug - num_threads 5 - buffer_chunk_limit 5m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_kubeevents*.buffer - buffer_queue_limit 10 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 5m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_kubeevents*.buffer + buffer_queue_limit 10 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + - - type out_oms_api - log_level debug - buffer_chunk_limit 10m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_api_kubernetes_logs*.buffer - buffer_queue_limit 10 - flush_interval 20s - retry_limit 10 - retry_wait 30s - + + type out_oms_api + log_level debug + buffer_chunk_limit 10m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_api_kubernetes_logs*.buffer + buffer_queue_limit 10 + flush_interval 20s + retry_limit 10 + retry_wait 30s + - - type out_oms - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_kubeservices*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_kubeservices*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + - - type out_oms - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/state/out_oms_kubenodes*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/state/out_oms_kubenodes*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + - - type out_oms - log_level debug - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_containernodeinventory*.buffer - buffer_queue_limit 20 - flush_interval 20s - retry_limit 10 - retry_wait 15s - max_retry_wait 9m - + + type out_oms + log_level debug + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_containernodeinventory*.buffer + buffer_queue_limit 20 + flush_interval 20s + retry_limit 10 + retry_wait 15s + max_retry_wait 9m + - - type out_oms - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_kubeperf*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_kubeperf*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + - - type out_mdm - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_mdm_*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - retry_mdm_post_wait_minutes 60 - + + type out_mdm + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_mdm_*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + retry_mdm_post_wait_minutes 60 + - - type out_oms - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_api_wincadvisorperf*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_api_wincadvisorperf*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + - - type out_mdm - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_mdm_cdvisorperf*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - retry_mdm_post_wait_minutes 60 - - - - type out_oms_api - log_level debug - buffer_chunk_limit 10m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_api_kubehealth*.buffer - buffer_queue_limit 10 - flush_interval 20s - retry_limit 10 - retry_wait 30s - + + type out_mdm + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_mdm_cdvisorperf*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + retry_mdm_post_wait_minutes 60 + + + + type out_oms_api + log_level debug + buffer_chunk_limit 10m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_api_kubehealth*.buffer + buffer_queue_limit 10 + flush_interval 20s + retry_limit 10 + retry_wait 30s + metadata: name: omsagent-rs-config namespace: kube-system @@ -301,8 +301,8 @@ metadata: apiVersion: v1 kind: Secret metadata: - name: omsagent-secret - namespace: kube-system + name: omsagent-secret + namespace: kube-system type: Opaque data: #BASE64 ENCODED (Both WSID & KEY) INSIDE DOUBLE QUOTE ("") @@ -312,224 +312,226 @@ data: apiVersion: extensions/v1beta1 kind: DaemonSet metadata: - name: omsagent - namespace: kube-system + name: omsagent + namespace: kube-system spec: - updateStrategy: - type: RollingUpdate - template: - metadata: - labels: - dsName: "omsagent-ds" - annotations: - agentVersion: "1.10.0.1" - dockerProviderVersion: "7.0.0-0" - schema-versions: "v1" - spec: - serviceAccountName: omsagent - containers: - - name: omsagent - image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08192019" - imagePullPolicy: IfNotPresent - resources: - limits: - cpu: 150m - memory: 600Mi - requests: - cpu: 75m - memory: 225Mi - env: - #- name: AKS_RESOURCE_ID - # value: "VALUE_AKS_RESOURCE_ID_VALUE" - #- name: AKS_REGION - # value: "VALUE_AKS_RESOURCE_REGION_VALUE" - #Uncomment below two lines for ACS clusters and set the cluster names manually. Also comment out the above two lines for ACS clusters - - name: ACS_RESOURCE_NAME - value: "my_acs_cluster_name" - - name: CONTROLLER_TYPE - value: "DaemonSet" - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - securityContext: - privileged: true - ports: - - containerPort: 25225 - protocol: TCP - - containerPort: 25224 - protocol: UDP - volumeMounts: - - mountPath: /hostfs - name: host-root - readOnly: true - - mountPath: /var/run/host - name: docker-sock - - mountPath: /var/log - name: host-log - - mountPath: /var/lib/docker/containers - name: containerlog-path - - mountPath: /etc/kubernetes/host - name: azure-json-path - - mountPath: /etc/omsagent-secret - name: omsagent-secret - - mountPath: /etc/config/settings - name: settings-vol-config - readOnly: true - livenessProbe: - exec: - command: - - /bin/bash - - -c - - /opt/livenessprobe.sh - initialDelaySeconds: 60 - periodSeconds: 60 - 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: host-root - hostPath: - path: / - - name: docker-sock - hostPath: - path: /var/run - - name: container-hostname - hostPath: - path: /etc/hostname - - name: host-log - hostPath: - path: /var/log - - name: containerlog-path - hostPath: - path: /var/lib/docker/containers - - name: azure-json-path - hostPath: - path: /etc/kubernetes - - name: omsagent-secret - secret: - secretName: omsagent-secret - - name: settings-vol-config - configMap: - name: container-azm-ms-agentconfig - optional: true + updateStrategy: + type: RollingUpdate + template: + metadata: + labels: + dsName: "omsagent-ds" + annotations: + agentVersion: "1.10.0.1" + dockerProviderVersion: "7.0.0-0" + schema-versions: "v1" + spec: + serviceAccountName: omsagent + containers: + - name: omsagent + image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08192019" + imagePullPolicy: IfNotPresent + resources: + limits: + cpu: 150m + memory: 600Mi + requests: + cpu: 75m + memory: 225Mi + env: + #- name: AKS_RESOURCE_ID + # value: "VALUE_AKS_RESOURCE_ID_VALUE" + #- name: AKS_REGION + # value: "VALUE_AKS_RESOURCE_REGION_VALUE" + #Uncomment below two lines for ACS clusters and set the cluster names manually. Also comment out the above two lines for ACS clusters + - name: ACS_RESOURCE_NAME + value: "my_acs_cluster_name" + - name: CONTROLLER_TYPE + value: "DaemonSet" + - name: REPLICASET_SERVICE_ENDPOINT + value: "healthmodel-replicaset-service.kube-system" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + securityContext: + privileged: true + ports: + - containerPort: 25225 + protocol: TCP + - containerPort: 25224 + protocol: UDP + volumeMounts: + - mountPath: /hostfs + name: host-root + readOnly: true + - mountPath: /var/run/host + name: docker-sock + - mountPath: /var/log + name: host-log + - mountPath: /var/lib/docker/containers + name: containerlog-path + - mountPath: /etc/kubernetes/host + name: azure-json-path + - mountPath: /etc/omsagent-secret + name: omsagent-secret + - mountPath: /etc/config/settings + name: settings-vol-config + readOnly: true + livenessProbe: + exec: + command: + - /bin/bash + - -c + - /opt/livenessprobe.sh + initialDelaySeconds: 60 + periodSeconds: 60 + 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: host-root + hostPath: + path: / + - name: docker-sock + hostPath: + path: /var/run + - name: container-hostname + hostPath: + path: /etc/hostname + - name: host-log + hostPath: + path: /var/log + - name: containerlog-path + hostPath: + path: /var/lib/docker/containers + - name: azure-json-path + hostPath: + path: /etc/kubernetes + - name: omsagent-secret + secret: + secretName: omsagent-secret + - name: settings-vol-config + configMap: + name: container-azm-ms-agentconfig + optional: true --- apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: omsagent-rs - namespace: kube-system + name: omsagent-rs + namespace: kube-system spec: - replicas: 1 - selector: - matchLabels: - rsName: "omsagent-rs" - strategy: - type: RollingUpdate - template: - metadata: - labels: - rsName: "omsagent-rs" - annotations: - agentVersion: "1.10.0.1" - dockerProviderVersion: "7.0.0-0" - schema-versions: "v1" - spec: - serviceAccountName: omsagent - containers: - - name: omsagent - image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08192019" - imagePullPolicy: IfNotPresent - resources: - limits: - cpu: 150m - memory: 500Mi - requests: - cpu: 110m - memory: 250Mi - env: - #- name: AKS_RESOURCE_ID - # value: "VALUE_AKS_RESOURCE_ID_VALUE" - #- name: AKS_REGION - # value: "VALUE_AKS_RESOURCE_REGION_VALUE" - #Uncomment below two lines for ACS clusters and set the cluster names manually. Also comment out the above two lines for ACS clusters - - name: ACS_RESOURCE_NAME - value: "my_acs_cluster_name" - - name: CONTROLLER_TYPE - value: "ReplicaSet" - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - securityContext: - privileged: true - ports: - - containerPort: 25225 - protocol: TCP - - containerPort: 25224 - protocol: UDP - - containerPort: 25227 - protocol: TCP - name: in-rs-tcp - volumeMounts: - - mountPath: /var/run/host - name: docker-sock - - mountPath: /var/log - name: host-log - - mountPath: /var/lib/docker/containers - name: containerlog-path - - mountPath: /etc/kubernetes/host - name: azure-json-path - - mountPath: /etc/omsagent-secret - name: omsagent-secret - readOnly: true - - mountPath : /etc/config - name: omsagent-rs-config - - mountPath: /etc/config/settings - name: settings-vol-config - readOnly: true - livenessProbe: - exec: - command: - - /bin/bash - - -c - - /opt/livenessprobe.sh - initialDelaySeconds: 60 - periodSeconds: 60 - nodeSelector: - beta.kubernetes.io/os: linux - kubernetes.io/role: agent - volumes: - - name: docker-sock - hostPath: - path: /var/run - - name: container-hostname - hostPath: - path: /etc/hostname - - name: host-log - hostPath: - path: /var/log - - name: containerlog-path - hostPath: - path: /var/lib/docker/containers - - name: azure-json-path - hostPath: - path: /etc/kubernetes - - name: omsagent-secret - secret: - secretName: omsagent-secret - - name: omsagent-rs-config - configMap: - name: omsagent-rs-config - - name: settings-vol-config - configMap: - name: container-azm-ms-agentconfig - optional: true + replicas: 1 + selector: + matchLabels: + rsName: "omsagent-rs" + strategy: + type: RollingUpdate + template: + metadata: + labels: + rsName: "omsagent-rs" + annotations: + agentVersion: "1.10.0.1" + dockerProviderVersion: "7.0.0-0" + schema-versions: "v1" + spec: + serviceAccountName: omsagent + containers: + - name: omsagent + image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08192019" + imagePullPolicy: IfNotPresent + resources: + limits: + cpu: 150m + memory: 500Mi + requests: + cpu: 110m + memory: 250Mi + env: + #- name: AKS_RESOURCE_ID + # value: "VALUE_AKS_RESOURCE_ID_VALUE" + #- name: AKS_REGION + # value: "VALUE_AKS_RESOURCE_REGION_VALUE" + #Uncomment below two lines for ACS clusters and set the cluster names manually. Also comment out the above two lines for ACS clusters + - name: ACS_RESOURCE_NAME + value: "my_acs_cluster_name" + - name: CONTROLLER_TYPE + value: "ReplicaSet" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + securityContext: + privileged: true + ports: + - containerPort: 25225 + protocol: TCP + - containerPort: 25224 + protocol: UDP + - containerPort: 25227 + protocol: TCP + name: in-rs-tcp + volumeMounts: + - mountPath: /var/run/host + name: docker-sock + - mountPath: /var/log + name: host-log + - mountPath: /var/lib/docker/containers + name: containerlog-path + - mountPath: /etc/kubernetes/host + name: azure-json-path + - mountPath: /etc/omsagent-secret + name: omsagent-secret + readOnly: true + - mountPath: /etc/config + name: omsagent-rs-config + - mountPath: /etc/config/settings + name: settings-vol-config + readOnly: true + livenessProbe: + exec: + command: + - /bin/bash + - -c + - /opt/livenessprobe.sh + initialDelaySeconds: 60 + periodSeconds: 60 + nodeSelector: + beta.kubernetes.io/os: linux + kubernetes.io/role: agent + volumes: + - name: docker-sock + hostPath: + path: /var/run + - name: container-hostname + hostPath: + path: /etc/hostname + - name: host-log + hostPath: + path: /var/log + - name: containerlog-path + hostPath: + path: /var/lib/docker/containers + - name: azure-json-path + hostPath: + path: /etc/kubernetes + - name: omsagent-secret + secret: + secretName: omsagent-secret + - name: omsagent-rs-config + configMap: + name: omsagent-rs-config + - name: settings-vol-config + configMap: + name: container-azm-ms-agentconfig + optional: true --- kind: Service apiVersion: v1 @@ -540,9 +542,9 @@ spec: selector: rsName: "omsagent-rs" ports: - - protocol: TCP - port: 25227 - targetPort: in-rs-tcp + - protocol: TCP + port: 25227 + targetPort: in-rs-tcp --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition diff --git a/Kubernetes/omsagent.yaml b/Kubernetes/omsagent.yaml index 08a958c8..3835befd 100644 --- a/Kubernetes/omsagent.yaml +++ b/Kubernetes/omsagent.yaml @@ -9,17 +9,17 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 metadata: name: omsagent-user rules: -- apiGroups: [""] - resources: ["pods", "events", "nodes", "namespaces", "services"] - verbs: ["list", "get", "watch"] -- apiGroups: ["extensions"] - resources: ["deployments"] - verbs: ["list"] -- apiGroups: ["azmon.container.insights"] - resources: ["healthstates"] - verbs: ["get", "create", "patch"] -- nonResourceURLs: ["/metrics"] - verbs: ["get"] + - apiGroups: [""] + resources: ["pods", "events", "nodes", "namespaces", "services"] + verbs: ["list", "get", "watch"] + - apiGroups: ["extensions"] + resources: ["deployments"] + verbs: ["list"] + - apiGroups: ["azmon.container.insights"] + resources: ["healthstates"] + verbs: ["get", "create", "patch"] + - nonResourceURLs: ["/metrics"] + verbs: ["get"] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1beta1 @@ -37,255 +37,255 @@ roleRef: kind: ConfigMap apiVersion: v1 data: - kube.conf: |- - # Fluentd config file for OMS Docker - cluster components (kubeAPI) - #fluent forward plugin - - type forward - port 25227 - bind 0.0.0.0 - + kube.conf: |- + # Fluentd config file for OMS Docker - cluster components (kubeAPI) + #fluent forward plugin + + type forward + port 25227 + bind 0.0.0.0 + + + #Kubernetes pod inventory + + type kubepodinventory + tag oms.containerinsights.KubePodInventory + run_interval 60s + log_level debug + - #Kubernetes pod inventory - - type kubepodinventory - tag oms.containerinsights.KubePodInventory - run_interval 60s - log_level debug + #Kubernetes events + + type kubeevents + tag oms.containerinsights.KubeEvents + run_interval 60s + log_level debug - #Kubernetes events - - type kubeevents - tag oms.containerinsights.KubeEvents - run_interval 60s - log_level debug - + #Kubernetes logs + + type kubelogs + tag oms.api.KubeLogs + run_interval 60s + - #Kubernetes logs - - type kubelogs - tag oms.api.KubeLogs - run_interval 60s - + #Kubernetes services + + type kubeservices + tag oms.containerinsights.KubeServices + run_interval 60s + log_level debug + - #Kubernetes services - - type kubeservices - tag oms.containerinsights.KubeServices - run_interval 60s - log_level debug - + #Kubernetes Nodes + + type kubenodeinventory + tag oms.containerinsights.KubeNodeInventory + run_interval 60s + log_level debug + - #Kubernetes Nodes - - type kubenodeinventory - tag oms.containerinsights.KubeNodeInventory - run_interval 60s - log_level debug - + #Kubernetes perf + + type kubeperf + tag oms.api.KubePerf + run_interval 60s + log_level debug + - #Kubernetes perf - - type kubeperf - tag oms.api.KubePerf - run_interval 60s - log_level debug - + #Kubernetes health + + type kubehealth + tag oms.api.KubeHealth.ReplicaSet + run_interval 60s + log_level debug + - #Kubernetes health - - type kubehealth - tag oms.api.KubeHealth.ReplicaSet - run_interval 60s - log_level debug - - - #cadvisor perf- Windows nodes - - type wincadvisorperf - tag oms.api.wincadvisorperf - run_interval 60s - log_level debug - + #cadvisor perf- Windows nodes + + type wincadvisorperf + tag oms.api.wincadvisorperf + run_interval 60s + log_level debug + - - type filter_inventory2mdm - custom_metrics_azure_regions eastus,southcentralus,westcentralus,westus2,southeastasia,northeurope,westEurope - log_level info - + + type filter_inventory2mdm + custom_metrics_azure_regions eastus,southcentralus,westcentralus,westus2,southeastasia,northeurope,westEurope + log_level info + - # custom_metrics_mdm filter plugin for perf data from windows nodes - - type filter_cadvisor2mdm - custom_metrics_azure_regions eastus,southcentralus,westcentralus,westus2,southeastasia,northeurope,westEurope - metrics_to_collect cpuUsageNanoCores,memoryWorkingSetBytes - log_level info - + # custom_metrics_mdm filter plugin for perf data from windows nodes + + type filter_cadvisor2mdm + custom_metrics_azure_regions eastus,southcentralus,westcentralus,westus2,southeastasia,northeurope,westEurope + metrics_to_collect cpuUsageNanoCores,memoryWorkingSetBytes + log_level info + - #health model aggregation filter - - type filter_health_model_builder - + #health model aggregation filter + + type filter_health_model_builder + - - type out_oms - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_kubepods*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_kubepods*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + - - type out_oms - log_level debug - num_threads 5 - buffer_chunk_limit 5m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_kubeevents*.buffer - buffer_queue_limit 10 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 5m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_kubeevents*.buffer + buffer_queue_limit 10 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + - - type out_oms_api - log_level debug - buffer_chunk_limit 10m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_api_kubernetes_logs*.buffer - buffer_queue_limit 10 - flush_interval 20s - retry_limit 10 - retry_wait 30s - + + type out_oms_api + log_level debug + buffer_chunk_limit 10m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_api_kubernetes_logs*.buffer + buffer_queue_limit 10 + flush_interval 20s + retry_limit 10 + retry_wait 30s + - - type out_oms - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_kubeservices*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_kubeservices*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + - - type out_oms - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/state/out_oms_kubenodes*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/state/out_oms_kubenodes*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + - - type out_oms - log_level debug - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_containernodeinventory*.buffer - buffer_queue_limit 20 - flush_interval 20s - retry_limit 10 - retry_wait 15s - max_retry_wait 9m - + + type out_oms + log_level debug + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_containernodeinventory*.buffer + buffer_queue_limit 20 + flush_interval 20s + retry_limit 10 + retry_wait 15s + max_retry_wait 9m + - - type out_oms - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_kubeperf*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_kubeperf*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + - - type out_mdm - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_mdm_*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - retry_mdm_post_wait_minutes 60 - + + type out_mdm + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_mdm_*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + retry_mdm_post_wait_minutes 60 + - - type out_oms - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_api_wincadvisorperf*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_api_wincadvisorperf*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + - - type out_mdm - log_level debug - num_threads 5 - buffer_chunk_limit 20m - buffer_type file - buffer_path %STATE_DIR_WS%/out_mdm_cdvisorperf*.buffer - buffer_queue_limit 20 - buffer_queue_full_action drop_oldest_chunk - flush_interval 20s - retry_limit 10 - retry_wait 30s - max_retry_wait 9m - retry_mdm_post_wait_minutes 60 - - - - type out_oms_api - log_level debug - buffer_chunk_limit 10m - buffer_type file - buffer_path %STATE_DIR_WS%/out_oms_api_kubehealth*.buffer - buffer_queue_limit 10 - flush_interval 20s - retry_limit 10 - retry_wait 30s - + + type out_mdm + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_mdm_cdvisorperf*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + retry_mdm_post_wait_minutes 60 + + + + type out_oms_api + log_level debug + buffer_chunk_limit 10m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_api_kubehealth*.buffer + buffer_queue_limit 10 + flush_interval 20s + retry_limit 10 + retry_wait 30s + metadata: name: omsagent-rs-config namespace: kube-system @@ -293,8 +293,8 @@ metadata: apiVersion: v1 kind: Secret metadata: - name: omsagent-secret - namespace: kube-system + name: omsagent-secret + namespace: kube-system type: Opaque data: #BASE64 ENCODED (Both WSID & KEY) INSIDE DOUBLE QUOTE ("") @@ -304,224 +304,226 @@ data: apiVersion: extensions/v1beta1 kind: DaemonSet metadata: - name: omsagent - namespace: kube-system + name: omsagent + namespace: kube-system spec: - updateStrategy: - type: RollingUpdate - template: - metadata: - labels: - dsName: "omsagent-ds" - annotations: - agentVersion: "1.10.0.1" - dockerProviderVersion: "7.0.0-0" - schema-versions: "v1" - spec: - serviceAccountName: omsagent - containers: - - name: omsagent - image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08192019" - imagePullPolicy: IfNotPresent - resources: - limits: - cpu: 150m - memory: 600Mi - requests: - cpu: 75m - memory: 225Mi - env: - #- name: AKS_RESOURCE_ID - # value: "VALUE_AKS_RESOURCE_ID_VALUE" - #- name: AKS_REGION - # value: "VALUE_AKS_RESOURCE_REGION_VALUE" - #Uncomment below two lines for ACS clusters and set the cluster names manually. Also comment out the above two lines for ACS clusters - - name: ACS_RESOURCE_NAME - value: "my_acs_cluster_name" - - name: CONTROLLER_TYPE - value: "DaemonSet" - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - securityContext: - privileged: true - ports: - - containerPort: 25225 - protocol: TCP - - containerPort: 25224 - protocol: UDP - volumeMounts: - - mountPath: /hostfs - name: host-root - readOnly: true - - mountPath: /var/run/host - name: docker-sock - - mountPath: /var/log - name: host-log - - mountPath: /var/lib/docker/containers - name: containerlog-path - - mountPath: /etc/kubernetes/host - name: azure-json-path - - mountPath: /etc/omsagent-secret - name: omsagent-secret - - mountPath: /etc/config/settings - name: settings-vol-config - readOnly: true - livenessProbe: - exec: - command: - - /bin/bash - - -c - - /opt/livenessprobe.sh - initialDelaySeconds: 60 - periodSeconds: 60 - 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: host-root - hostPath: - path: / - - name: docker-sock - hostPath: - path: /var/run - - name: container-hostname - hostPath: - path: /etc/hostname - - name: host-log - hostPath: - path: /var/log - - name: containerlog-path - hostPath: - path: /var/lib/docker/containers - - name: azure-json-path - hostPath: - path: /etc/kubernetes - - name: omsagent-secret - secret: - secretName: omsagent-secret - - name: settings-vol-config - configMap: - name: container-azm-ms-agentconfig - optional: true + updateStrategy: + type: RollingUpdate + template: + metadata: + labels: + dsName: "omsagent-ds" + annotations: + agentVersion: "1.10.0.1" + dockerProviderVersion: "7.0.0-0" + schema-versions: "v1" + spec: + serviceAccountName: omsagent + containers: + - name: omsagent + image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08192019" + imagePullPolicy: IfNotPresent + resources: + limits: + cpu: 150m + memory: 600Mi + requests: + cpu: 75m + memory: 225Mi + env: + #- name: AKS_RESOURCE_ID + # value: "VALUE_AKS_RESOURCE_ID_VALUE" + #- name: AKS_REGION + # value: "VALUE_AKS_RESOURCE_REGION_VALUE" + #Uncomment below two lines for ACS clusters and set the cluster names manually. Also comment out the above two lines for ACS clusters + - name: ACS_RESOURCE_NAME + value: "my_acs_cluster_name" + - name: CONTROLLER_TYPE + value: "DaemonSet" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: REPLICASET_SERVICE_ENDPOINT + value: "healthmodel-replicaset-service.kube-system" + securityContext: + privileged: true + ports: + - containerPort: 25225 + protocol: TCP + - containerPort: 25224 + protocol: UDP + volumeMounts: + - mountPath: /hostfs + name: host-root + readOnly: true + - mountPath: /var/run/host + name: docker-sock + - mountPath: /var/log + name: host-log + - mountPath: /var/lib/docker/containers + name: containerlog-path + - mountPath: /etc/kubernetes/host + name: azure-json-path + - mountPath: /etc/omsagent-secret + name: omsagent-secret + - mountPath: /etc/config/settings + name: settings-vol-config + readOnly: true + livenessProbe: + exec: + command: + - /bin/bash + - -c + - /opt/livenessprobe.sh + initialDelaySeconds: 60 + periodSeconds: 60 + 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: host-root + hostPath: + path: / + - name: docker-sock + hostPath: + path: /var/run + - name: container-hostname + hostPath: + path: /etc/hostname + - name: host-log + hostPath: + path: /var/log + - name: containerlog-path + hostPath: + path: /var/lib/docker/containers + - name: azure-json-path + hostPath: + path: /etc/kubernetes + - name: omsagent-secret + secret: + secretName: omsagent-secret + - name: settings-vol-config + configMap: + name: container-azm-ms-agentconfig + optional: true --- apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: omsagent-rs - namespace: kube-system + name: omsagent-rs + namespace: kube-system spec: - replicas: 1 - selector: - matchLabels: - rsName: "omsagent-rs" - strategy: - type: RollingUpdate - template: - metadata: - labels: - rsName: "omsagent-rs" - annotations: - agentVersion: "1.10.0.1" - dockerProviderVersion: "7.0.0-0" - schema-versions: "v1" - spec: - serviceAccountName: omsagent - containers: - - name: omsagent - image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08192019" - imagePullPolicy: IfNotPresent - resources: - limits: - cpu: 150m - memory: 500Mi - requests: - cpu: 110m - memory: 250Mi - env: - #- name: AKS_RESOURCE_ID - # value: "VALUE_AKS_RESOURCE_ID_VALUE" - #- name: AKS_REGION - # value: "VALUE_AKS_RESOURCE_REGION_VALUE" - #Uncomment below two lines for ACS clusters and set the cluster names manually. Also comment out the above two lines for ACS clusters - - name: ACS_RESOURCE_NAME - value: "my_acs_cluster_name" - - name: CONTROLLER_TYPE - value: "ReplicaSet" - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - securityContext: - privileged: true - ports: - - containerPort: 25225 - protocol: TCP - - containerPort: 25224 - protocol: UDP - - containerPort: 25227 - protocol: TCP - name: in-rs-tcp - volumeMounts: - - mountPath: /var/run/host - name: docker-sock - - mountPath: /var/log - name: host-log - - mountPath: /var/lib/docker/containers - name: containerlog-path - - mountPath: /etc/kubernetes/host - name: azure-json-path - - mountPath: /etc/omsagent-secret - name: omsagent-secret - readOnly: true - - mountPath : /etc/config - name: omsagent-rs-config - - mountPath: /etc/config/settings - name: settings-vol-config - readOnly: true - livenessProbe: - exec: - command: - - /bin/bash - - -c - - /opt/livenessprobe.sh - initialDelaySeconds: 60 - periodSeconds: 60 - nodeSelector: - beta.kubernetes.io/os: linux - kubernetes.io/role: agent - volumes: - - name: docker-sock - hostPath: - path: /var/run - - name: container-hostname - hostPath: - path: /etc/hostname - - name: host-log - hostPath: - path: /var/log - - name: containerlog-path - hostPath: - path: /var/lib/docker/containers - - name: azure-json-path - hostPath: - path: /etc/kubernetes - - name: omsagent-secret - secret: - secretName: omsagent-secret - - name: omsagent-rs-config - configMap: - name: omsagent-rs-config - - name: settings-vol-config - configMap: - name: container-azm-ms-agentconfig - optional: true + replicas: 1 + selector: + matchLabels: + rsName: "omsagent-rs" + strategy: + type: RollingUpdate + template: + metadata: + labels: + rsName: "omsagent-rs" + annotations: + agentVersion: "1.10.0.1" + dockerProviderVersion: "7.0.0-0" + schema-versions: "v1" + spec: + serviceAccountName: omsagent + containers: + - name: omsagent + image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08192019" + imagePullPolicy: IfNotPresent + resources: + limits: + cpu: 150m + memory: 500Mi + requests: + cpu: 110m + memory: 250Mi + env: + #- name: AKS_RESOURCE_ID + # value: "VALUE_AKS_RESOURCE_ID_VALUE" + #- name: AKS_REGION + # value: "VALUE_AKS_RESOURCE_REGION_VALUE" + #Uncomment below two lines for ACS clusters and set the cluster names manually. Also comment out the above two lines for ACS clusters + - name: ACS_RESOURCE_NAME + value: "my_acs_cluster_name" + - name: CONTROLLER_TYPE + value: "ReplicaSet" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + securityContext: + privileged: true + ports: + - containerPort: 25225 + protocol: TCP + - containerPort: 25224 + protocol: UDP + - containerPort: 25227 + protocol: TCP + name: in-rs-tcp + volumeMounts: + - mountPath: /var/run/host + name: docker-sock + - mountPath: /var/log + name: host-log + - mountPath: /var/lib/docker/containers + name: containerlog-path + - mountPath: /etc/kubernetes/host + name: azure-json-path + - mountPath: /etc/omsagent-secret + name: omsagent-secret + readOnly: true + - mountPath: /etc/config + name: omsagent-rs-config + - mountPath: /etc/config/settings + name: settings-vol-config + readOnly: true + livenessProbe: + exec: + command: + - /bin/bash + - -c + - /opt/livenessprobe.sh + initialDelaySeconds: 60 + periodSeconds: 60 + nodeSelector: + beta.kubernetes.io/os: linux + kubernetes.io/role: agent + volumes: + - name: docker-sock + hostPath: + path: /var/run + - name: container-hostname + hostPath: + path: /etc/hostname + - name: host-log + hostPath: + path: /var/log + - name: containerlog-path + hostPath: + path: /var/lib/docker/containers + - name: azure-json-path + hostPath: + path: /etc/kubernetes + - name: omsagent-secret + secret: + secretName: omsagent-secret + - name: omsagent-rs-config + configMap: + name: omsagent-rs-config + - name: settings-vol-config + configMap: + name: container-azm-ms-agentconfig + optional: true --- kind: Service apiVersion: v1 @@ -532,9 +534,9 @@ spec: selector: rsName: "omsagent-rs" ports: - - protocol: TCP - port: 25227 - targetPort: in-rs-tcp + - protocol: TCP + port: 25227 + targetPort: in-rs-tcp --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition From 57b5bb7f8b023e89172d0bb4ef8274f7c534c297 Mon Sep 17 00:00:00 2001 From: r-dilip Date: Wed, 4 Sep 2019 08:40:52 -0700 Subject: [PATCH 2/4] Few yaml changes including exposing as ENV variable the RS service name, revert back clusterrole name change(this is already fixed in the chart) --- Kubernetes/container-azm-ms-agentconfig.yaml | 6 +++--- Kubernetes/omsagent-ai-res-id.yaml | 10 +++++----- Kubernetes/omsagent.yaml | 6 +++--- ci_feature/Dockerfile | 2 +- ci_feature_prod/Dockerfile | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Kubernetes/container-azm-ms-agentconfig.yaml b/Kubernetes/container-azm-ms-agentconfig.yaml index fdea022b..3e41d16d 100644 --- a/Kubernetes/container-azm-ms-agentconfig.yaml +++ b/Kubernetes/container-azm-ms-agentconfig.yaml @@ -1,7 +1,7 @@ kind: ConfigMap apiVersion: v1 data: - schema-version: + schema-version: #string.used by agent to parse config. supported versions are {v1}. Configs with other schema versions will be rejected by the agent. v1 config-version: @@ -62,7 +62,7 @@ data: # Node level scrape endpoint(s). These metrics will be scraped from agent's DaemonSet running in every node in the cluster #Interval specifying how often to scrape for metrics. This is duration of time and can be specified for supporting settings by combining an integer value and time unit as a string value. Valid time units are ns, us (or µs), ms, s, m, h. - interval = "1m" + interval : "1 ## Uncomment the following settings with valid string arrays for prometheus scraping @@ -76,7 +76,7 @@ data: # agent health model feature settings [agent_settings.health_model] # In the absence of this configmap, default value for enabled is false - enabled = false + enabled = true metadata: name: container-azm-ms-agentconfig namespace: kube-system diff --git a/Kubernetes/omsagent-ai-res-id.yaml b/Kubernetes/omsagent-ai-res-id.yaml index f6ee1af3..2bf9893b 100644 --- a/Kubernetes/omsagent-ai-res-id.yaml +++ b/Kubernetes/omsagent-ai-res-id.yaml @@ -7,7 +7,7 @@ metadata: kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1beta1 metadata: - name: omsagent-user + name: omsagent-reader rules: - apiGroups: [""] resources: ["pods", "events", "nodes", "namespaces", "services"] @@ -31,7 +31,7 @@ subjects: namespace: kube-system roleRef: kind: ClusterRole - name: omsagent-user + name: omsagent-reader apiGroup: rbac.authorization.k8s.io --- kind: ConfigMap @@ -329,7 +329,7 @@ spec: serviceAccountName: omsagent containers: - name: omsagent - image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08192019" + image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08222019" imagePullPolicy: IfNotPresent resources: limits: @@ -348,7 +348,7 @@ spec: value: "my_acs_cluster_name" - name: CONTROLLER_TYPE value: "DaemonSet" - - name: REPLICASET_SERVICE_ENDPOINT + - name: HEALTHMODEL_REPLICASET_SERVICE_ENDPOINT value: "healthmodel-replicaset-service.kube-system" - name: NODE_IP valueFrom: @@ -445,7 +445,7 @@ spec: serviceAccountName: omsagent containers: - name: omsagent - image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08192019" + image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08222019" imagePullPolicy: IfNotPresent resources: limits: diff --git a/Kubernetes/omsagent.yaml b/Kubernetes/omsagent.yaml index 3835befd..5d952fa5 100644 --- a/Kubernetes/omsagent.yaml +++ b/Kubernetes/omsagent.yaml @@ -321,7 +321,7 @@ spec: serviceAccountName: omsagent containers: - name: omsagent - image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08192019" + image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08222019" imagePullPolicy: IfNotPresent resources: limits: @@ -344,7 +344,7 @@ spec: valueFrom: fieldRef: fieldPath: status.hostIP - - name: REPLICASET_SERVICE_ENDPOINT + - name: HEALTHMODEL_REPLICASET_SERVICE_ENDPOINT value: "healthmodel-replicaset-service.kube-system" securityContext: privileged: true @@ -437,7 +437,7 @@ spec: serviceAccountName: omsagent containers: - name: omsagent - image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08192019" + image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08222019" imagePullPolicy: IfNotPresent resources: limits: diff --git a/ci_feature/Dockerfile b/ci_feature/Dockerfile index 35fd5dbe..2ed7fa8c 100644 --- a/ci_feature/Dockerfile +++ b/ci_feature/Dockerfile @@ -5,7 +5,7 @@ LABEL vendor=Microsoft\ Corp \ com.microsoft.version="7.0.0-0" ENV tmpdir /opt ENV APPLICATIONINSIGHTS_AUTH OTQzNWI0M2YtOTdkNS00ZGVkLThkOTAtYjA0Nzk1OGU2ZTg3 -ENV AGENT_VERSION ciprod08192019 +ENV AGENT_VERSION ciprod08212019 ENV HOST_MOUNT_PREFIX /hostfs ENV HOST_PROC /hostfs/proc ENV HOST_SYS /hostfs/sys diff --git a/ci_feature_prod/Dockerfile b/ci_feature_prod/Dockerfile index a37ef8a7..8024cf38 100644 --- a/ci_feature_prod/Dockerfile +++ b/ci_feature_prod/Dockerfile @@ -5,7 +5,7 @@ LABEL vendor=Microsoft\ Corp \ com.microsoft.version="7.0.0-0" ENV tmpdir /opt ENV APPLICATIONINSIGHTS_AUTH NzAwZGM5OGYtYTdhZC00NThkLWI5NWMtMjA3ZjM3NmM3YmRi -ENV AGENT_VERSION ciprod08192019 +ENV AGENT_VERSION ciprod08212019 ENV HOST_MOUNT_PREFIX /hostfs ENV HOST_PROC /hostfs/proc ENV HOST_SYS /hostfs/sys From eb03b7e8ddb3a2e475b350cb71083f080dcd0cb7 Mon Sep 17 00:00:00 2001 From: r-dilip Date: Wed, 4 Sep 2019 08:42:49 -0700 Subject: [PATCH 3/4] Revert config map change --- Kubernetes/container-azm-ms-agentconfig.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kubernetes/container-azm-ms-agentconfig.yaml b/Kubernetes/container-azm-ms-agentconfig.yaml index 3e41d16d..e39d1c3a 100644 --- a/Kubernetes/container-azm-ms-agentconfig.yaml +++ b/Kubernetes/container-azm-ms-agentconfig.yaml @@ -62,7 +62,7 @@ data: # Node level scrape endpoint(s). These metrics will be scraped from agent's DaemonSet running in every node in the cluster #Interval specifying how often to scrape for metrics. This is duration of time and can be specified for supporting settings by combining an integer value and time unit as a string value. Valid time units are ns, us (or µs), ms, s, m, h. - interval : "1 + interval = "1m" ## Uncomment the following settings with valid string arrays for prometheus scraping From 82ad1b4b062a1a6d591c86bcb3ee8eee6ce6c0f3 Mon Sep 17 00:00:00 2001 From: r-dilip Date: Wed, 4 Sep 2019 08:43:23 -0700 Subject: [PATCH 4/4] Revert config map change --- Kubernetes/container-azm-ms-agentconfig.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kubernetes/container-azm-ms-agentconfig.yaml b/Kubernetes/container-azm-ms-agentconfig.yaml index e39d1c3a..fc4acbd5 100644 --- a/Kubernetes/container-azm-ms-agentconfig.yaml +++ b/Kubernetes/container-azm-ms-agentconfig.yaml @@ -76,7 +76,7 @@ data: # agent health model feature settings [agent_settings.health_model] # In the absence of this configmap, default value for enabled is false - enabled = true + enabled = false metadata: name: container-azm-ms-agentconfig namespace: kube-system