incubator/azuremonitor-containers - (set image repo corresponding cloud and doc updates) (#17277)

* updates related to support for other azure clouds

Signed-off-by: Ganga Mahesh Siddem <gangams@microsoft.com>

* use latest agent image

Signed-off-by: Ganga Mahesh Siddem <gangams@microsoft.com>

* fix pr feedback

Signed-off-by: Ganga Mahesh Siddem <gangams@microsoft.com>

* use latest docker provider version

Signed-off-by: Ganga Mahesh Siddem <gangams@microsoft.com>

* improve notes.txt file

Signed-off-by: Ganga Mahesh Siddem <gangams@microsoft.com>

* improve readme and notes

Signed-off-by: Ganga Mahesh Siddem <gangams@microsoft.com>

* fix oms tags related to kube health

Signed-off-by: Ganga Mahesh Siddem <gangams@microsoft.com>
This commit is contained in:
ganga1980
2019-10-04 10:14:04 -07:00
committed by Kubernetes Prow Robot
parent 2757fd9367
commit d49c8d54fc
7 changed files with 91 additions and 44 deletions
+3 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
appVersion: 7.0.0-1
description: Helm chart for deploying Azure Monitor container monitoring agent in Kubernetes
name: azuremonitor-containers
version: 2.0.0
version: 2.1.0
keywords:
- monitoring
- azuremonitor
@@ -16,6 +16,8 @@ keywords:
- kubernetesmonitoring
- acs-engine
- aks-engine
- azurestack
- on-prem kubernetes monitoring
- containerlogs
- containerhealth
- containermonitoring
+40 -14
View File
@@ -20,12 +20,15 @@ This article describes how to set up and use [Azure Monitor - Containers](https:
2. [Add the 'AzureMonitor-Containers' Solution to your Log Analytics workspace.](http://aka.ms/coinhelmdoc)
3. [For AKS-Engine or ACS-Engine K8S cluster, add required tags on cluster resources, to be able to use Azure Container monitoring User experience (aka.ms/azmon-containers)](http://aka.ms/coin-acs-tag-doc)
3. [For AKS-Engine or ACS-Engine K8S cluster hosted in Azure, add required tags on cluster resources, to be able to use Azure Container monitoring User experience (aka.ms/azmon-containers)](http://aka.ms/coin-acs-tag-doc)
> Note: Pre-requisite #3 not applicable for the AKS-Engine or ACS-Engine clusters hosted in Azure Stack or On-premise.
---
## Installing the Chart
### To Use Azure Log Analytics Workspace in Public Cloud
```bash
$ helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
$ helm install --name myrelease-1 \
@@ -33,6 +36,23 @@ $ helm install --name myrelease-1 \
```
### To Use Azure Log Analytics Workspace in Azure China Cloud
```bash
$ helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
$ helm install --name myrelease-1 \
--set omsagent.domain=opinsights.azure.cn,omsagent.secret.wsid=<your_workspace_id>,omsagent.secret.key=<your_workspace_key>,omsagent.env.clusterName=<your_cluster_name> incubator/azuremonitor-containers
```
### To Use Azure Log Analytics Workspace in Azure US Government Cloud
```bash
$ helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
$ helm install --name myrelease-1 \
--set omsagent.domain=opinsights.azure.us,omsagent.secret.wsid=<your_workspace_id>,omsagent.secret.key=<your_workspace_key>,omsagent.env.clusterName=<your_cluster_name> incubator/azuremonitor-containers
```
## Uninstalling the Chart
To uninstall/delete the `myrelease-1` release:
@@ -51,18 +71,21 @@ The following table lists the configurable parameters of the MSOMS chart and the
The following table lists the configurable parameters of the MSOMS chart and their default values.
| Parameter | Description | Default |
| ----------------------- | ---------------------------------- | -------------------------------------------------------------------------------- |
| `omsagent.image.tag` | `msoms` image tag. | Most recent release |
| `omsagent.image.pullPolicy`| `msoms` image pull policy. | IfNotPresent |
| `omsagent.secret.wsid` | Azure Log analytics workspace id | Does not have a default value, needs to be provided |
| `omsagent.secret.key` | Azure Log analytics workspace key | Does not have a default value, needs to be provided |
| `omsagent.domain` | Azure Log analytics cloud domain (public / govt) | opinsights.azure.com (Public cloud as default), opinsights.azure.us (Govt Cloud) |
| `omsagent.env.clusterName` | Name of your cluster | Does not have a default value, needs to be provided. If AKS-Engine or ACS-Engine K8S cluster, it is recommended to provide either one of the below as cluster name, to be able to use Azure Container monitoring User experience (aka.ms/azmon-containers) <br/> <br/> - Azure Resource group resource ID of ACS-Engine cluster <br/> - Provide a friendly name here and ensure this name is used to 'tag' the cluster master node(s) - see step-3 in pre-requisites above |
| `omsagent.rbac` | rbac enabled/disabled | true (i.e enabled) |
| Parameter | Description | Default |
| ----------------------- | --------------------------------------------------------| -------------------------------------------------------------------------------- |
| `omsagent.image.tag` | `msoms` image tag. | Most recent release |
| `omsagent.image.pullPolicy`| `msoms` image pull policy. | IfNotPresent |
| `omsagent.secret.wsid` | Azure Log analytics workspace id | Does not have a default value, needs to be provided |
| `omsagent.secret.key` | Azure Log analytics workspace key | Does not have a default value, needs to be provided |
| `omsagent.domain` | Azure Log analytics cloud domain (public,china, us govt) | opinsights.azure.com (Public cloud as default), opinsights.azure.cn (China Cloud), opinsights.azure.us (US Govt Cloud) |
| `omsagent.env.clusterName` | Name of your cluster | Does not have a default value, needs to be provided |
| `omsagent.rbac` | rbac enabled/disabled | true (i.e enabled) |
### Note
Parameter `omsagent.env.doNotCollectKubeSystemLogs` has been removed starting chart version 1.0.0. Refer to 'Agent data collection settings' section below to configure it using configmap.
- Parameter `omsagent.env.doNotCollectKubeSystemLogs` has been removed starting chart version 1.0.0. Refer to 'Agent data collection settings' section below to configure it using configmap.
- onboarding of multiple clusters with the same cluster name to same log analytics workspace not supported. If need this configuration, use the cluster FQDN name rather than cluster dns prefix to avoid collision with clusterName
## Agent data collection settings
@@ -75,9 +98,9 @@ Specify each parameter using the `--set key=value[,key=value]` argument to `helm
```bash
$ helm install --name myrelease-1 \
--set omsagent.secret.wsid=<your_workspace_id>,omsagent.secret.key=<your_workspace_key>,omsagent.env.clusterName=<my_AKS-Engine_k8s_cluster_RG_ResourceID> incubator/azuremonitor-containers
--set omsagent.secret.wsid=<your_workspace_id>,omsagent.secret.key=<your_workspace_key>,omsagent.env.clusterName=<your_cluster_name>
incubator/azuremonitor-containers
```
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
```bash
@@ -86,7 +109,10 @@ $ helm install --name myrelease-1 -f values.yaml incubator/azuremonitor-containe
```
After you successfully deploy the chart, you will be able to see your data in the [azure portal](aka.ms/azmon-containers)
After you successfully deploy the chart, you will be able to see your data in
- [azure public cloud portal](https://aka.ms/azmon-containers) for the clusters in Azure Public Cloud
- [azure china cloud portal](https://aka.ms/azmon-containers-mooncake) for the clusters in Azure China Cloud
- [azure us government cloud portal](https://aka.ms/azmon-containers-fairfax) for the clusters in Azure US Government Cloud
If you need help with this chart, please reach us out through [this](mailto:askcoin@microsoft.com) email.
@@ -24,17 +24,28 @@
{{- if or (eq .Values.omsagent.secret.key "<your_workspace_key>") (eq .Values.omsagent.secret.wsid "<your_workspace_id>") (eq .Values.omsagent.env.clusterName "<your_cluster_name>")}}
This deployment will not complete. To proceed, run
This deployment will not complete. To proceed, run
helm upgrade {{ .Release.Name }} \
--set omsagent.secret.wsid=<your_workspace_id> \
--set omsagent.secret.key=<your_workspace_key> \
--set omsagent.secret.key=<your_workspace_key> \
--set omsagent.env.clusterName=<your_cluster_name> \
incubator/azuremonitor-containers
{{- else -}}
{{ .Release.Name }} deployment is complete.
Data should start flowing to the Log Analytics workspace shortly.
Proceed to https://aka.ms/azmon-containers if you would like to view this data.
{{ .Release.Name }} deployment is complete.
{{ .Values.omsagent.domain}} is configured Azure Log Analytics Workspace Domain.
Data should start flowing to the Log Analytics workspace shortly.
Proceed to below link to view health and monitoring data of your clusters
{{- if eq (.Values.omsagent.domain | lower) "opinsights.azure.com" }}
- Azure Public Cloud Portal URL : https://aka.ms/azmon-containers
{{- else if eq (.Values.omsagent.domain | lower) "opinsights.azure.cn" }}
- Azure China Cloud Portal URL: https://aka.ms/azmon-containers-mooncake
{{- else if eq (.Values.omsagent.domain | lower) "opinsights.azure.us" }}
- Azure US Government Cloud Portal URL: https://aka.ms/azmon-containers-fairfax
{{- else }}
########################################################################################
#### ERROR: Provided omsagent.domain value either invalid or not supported ####
########################################################################################
{{- end }}
{{- end }}
@@ -24,8 +24,12 @@ spec:
serviceAccountName: omsagent
{{- end }}
containers:
- name: omsagent
- name: omsagent
{{- if eq (.Values.omsagent.domain | lower) "opinsights.azure.cn" }}
image: "dockerhub.azk8s.cn/microsoft/oms:{{ .Values.omsagent.image.tag }}"
{{- else }}
image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:{{ .Values.omsagent.image.tag }}"
{{- end }}
imagePullPolicy: IfNotPresent
resources:
{{ toYaml .Values.omsagent.resources.daemonset | indent 9 }}
@@ -54,7 +58,7 @@ spec:
privileged: true
ports:
- containerPort: 25225
protocol: TCP
protocol: TCP
- containerPort: 25224
protocol: UDP
volumeMounts:
@@ -63,9 +67,9 @@ spec:
readOnly: true
- mountPath: /var/run/host
name: docker-sock
- mountPath: /var/log
- mountPath: /var/log
name: host-log
- mountPath: /var/lib/docker/containers
- mountPath: /var/lib/docker/containers
name: containerlog-path
- mountPath: /etc/kubernetes/host
name: azure-json-path
@@ -84,18 +88,18 @@ spec:
initialDelaySeconds: 60
periodSeconds: 60
nodeSelector:
beta.kubernetes.io/os: linux
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"
effect: "NoSchedule"
volumes:
- name: host-root
hostPath:
path: /
- name: docker-sock
- name: docker-sock
hostPath:
path: /var/run
- name: container-hostname
@@ -117,4 +121,4 @@ spec:
configMap:
name: container-azm-ms-agentconfig
optional: true
{{- end }}
{{- end }}
@@ -28,8 +28,12 @@ spec:
serviceAccountName: omsagent
{{- end }}
containers:
- name: omsagent
- name: omsagent
{{- if eq (.Values.omsagent.domain | lower) "opinsights.azure.cn" }}
image: "dockerhub.azk8s.cn/microsoft/oms:{{ .Values.omsagent.image.tag }}"
{{- else }}
image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:{{ .Values.omsagent.image.tag }}"
{{- end }}
imagePullPolicy: IfNotPresent
resources:
{{ toYaml .Values.omsagent.resources.deployment | indent 9 }}
@@ -41,12 +45,12 @@ spec:
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
fieldPath: status.hostIP
securityContext:
privileged: true
ports:
- containerPort: 25225
protocol: TCP
protocol: TCP
- containerPort: 25224
protocol: UDP
- containerPort: 25227
@@ -55,9 +59,9 @@ spec:
volumeMounts:
- mountPath: /var/run/host
name: docker-sock
- mountPath: /var/log
- mountPath: /var/log
name: host-log
- mountPath: /var/lib/docker/containers
- mountPath: /var/lib/docker/containers
name: containerlog-path
- mountPath: /etc/kubernetes/host
name: azure-json-path
@@ -81,7 +85,7 @@ spec:
beta.kubernetes.io/os: linux
kubernetes.io/role: agent
volumes:
- name: docker-sock
- name: docker-sock
hostPath:
path: /var/run
- name: container-hostname
@@ -106,4 +110,4 @@ spec:
configMap:
name: container-azm-ms-agentconfig
optional: true
{{- end }}
{{- end }}
@@ -61,7 +61,7 @@ data:
#Kubernetes health
<source>
type kubehealth
tag oms.api.KubeHealth.ReplicaSet
tag kubehealth.ReplicaSet
run_interval 60s
log_level debug
</source>
@@ -89,7 +89,7 @@ data:
</filter>
#health model aggregation filter
<filter oms.api.KubeHealth**>
<filter kubehealth**>
type filter_health_model_builder
</filter>
@@ -178,7 +178,7 @@ data:
max_retry_wait 9m
</match>
<match oms.api.KubePerf**>
<match oms.api.KubePerf**>
type out_oms
log_level debug
num_threads 5
@@ -258,4 +258,4 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- end }}
{{- end }}
@@ -6,9 +6,9 @@
## ref: https://github.com/Microsoft/OMS-docker/tree/ci_feature_prod
omsagent:
image:
tag: "ciprod09092019"
tag: "ciprod09262019"
pullPolicy: IfNotPresent
dockerProviderVersion: "7.0.0-1"
dockerProviderVersion: "7.0.0-3"
agentVersion: "1.10.0.1"
## To get your workspace id and key do the following
## You can create a Azure Loganalytics workspace from portal.azure.com and get its ID & PRIMARY KEY from 'Advanced Settings' tab in the Ux.
@@ -18,7 +18,7 @@ omsagent:
key: <your_workspace_key>
domain: opinsights.azure.com
env:
clusterName: <my_Acs-engine_k8s_cluster_RG_ResourceID>
clusterName: <your_cluster_name>
rbac: true
logsettings:
logflushintervalsecs: ""