AKS icon indicating copy to clipboard operation
AKS copied to clipboard

OMS add-on: Monitoring Metrics Publisher Role not assigned to OMS agent Identity when using template deployment

Open petegrimsdale opened this issue 5 years ago • 16 comments

When deploying a new AKS cluster using an ARM template with the OMS addon enabled as:

                "addonProfiles": {
                  "omsagent": {
                    "enabled": true,
                    "config": {
                      "logAnalyticsWorkspaceResourceId": "<<id of the workspace>>"
                    }
                  }
                },

The oms agent is correctly deployed and insights is enabled as expected however, the identity created for the OMS agent does not have the Monitoring Metrics Publisher Role assigned preventing the visibility of container insights metrics until enabled via the portal by using the "Enable" button on the container insights blade

OMS identity: image

What you expected to happen: When deploying a cluster from the portal the OMS identity has the role described above automatically assigned to the cluster and insights metrics are available as expected - I would expect this to work in the same way if the AKS cluster is deployed via template automations without the need to add an additional role assignment.

Role assignment with portal based deployment: image

How to reproduce it (as minimally and precisely as possible): (1) deploy AKS cluster using template deployment with OMS addon enabled (2) check the role assignments for the OMS identity (3) There will be no role assignments

Anything else we need to know?: This issue can be mitigated by adding a role assignment automation step to assign the role to the identity which is the same deployment which can be observed when a portal based deployment of a cluster is initiated

Environment:

  • Kubernetes version (use kubectl version): 1.19.9
  • Size of cluster (how many worker nodes are in the cluster?) 3 worker nodes ( 6 nodes in total, 3 system, 3 agent )
  • General description of workloads in the cluster (e.g. HTTP microservices, Java app, Ruby on Rails, machine learning, etc.) There are minimal workloads - simple http pods to validate metrics

Attached zip contains bicep template files used to deploy with the addition of the role assignment template to have the role enabled oms.zip

petegrimsdale avatar May 07 '21 17:05 petegrimsdale

Hi petegrimsdale, AKS bot here :wave: Thank you for posting on the AKS Repo, I'll do my best to get a kind human from the AKS team to assist you.

I might be just a bot, but I'm told my suggestions are normally quite good, as such:

  1. If this case is urgent, please open a Support Request so that our 24/7 support team may help you faster.
  2. Please abide by the AKS repo Guidelines and Code of Conduct.
  3. If you're having an issue, could it be described on the AKS Troubleshooting guides or AKS Diagnostics?
  4. Make sure your subscribed to the AKS Release Notes to keep up to date with all that's new on AKS.
  5. Make sure there isn't a duplicate of this issue already reported. If there is, feel free to close this one and '+1' the existing issue.
  6. If you have a question, do take a look at our AKS FAQ. We place the most common ones there!

ghost avatar May 07 '21 17:05 ghost

Triage required from @Azure/aks-pm

ghost avatar May 09 '21 18:05 ghost

Action required from @Azure/aks-pm

ghost avatar May 14 '21 19:05 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar May 30 '21 00:05 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar Jun 14 '21 06:06 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar Jun 29 '21 06:06 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar Jul 14 '21 12:07 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar Jul 29 '21 18:07 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar Aug 14 '21 00:08 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar Aug 29 '21 06:08 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar Sep 13 '21 12:09 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar Sep 28 '21 12:09 ghost

@vishiy, @saaror would you be able to assist?

Issue Details

When deploying a new AKS cluster using an ARM template with the OMS addon enabled as:

                "addonProfiles": {
                  "omsagent": {
                    "enabled": true,
                    "config": {
                      "logAnalyticsWorkspaceResourceId": "<<id of the workspace>>"
                    }
                  }
                },

The oms agent is correctly deployed and insights is enabled as expected however, the identity created for the OMS agent does not have the Monitoring Metrics Publisher Role assigned preventing the visibility of container insights metrics until enabled via the portal by using the "Enable" button on the container insights blade

OMS identity: image

What you expected to happen: When deploying a cluster from the portal the OMS identity has the role described above automatically assigned to the cluster and insights metrics are available as expected - I would expect this to work in the same way if the AKS cluster is deployed via template automations without the need to add an additional role assignment.

Role assignment with portal based deployment: image

How to reproduce it (as minimally and precisely as possible): (1) deploy AKS cluster using template deployment with OMS addon enabled (2) check the role assignments for the OMS identity (3) There will be no role assignments

Anything else we need to know?: This issue can be mitigated by adding a role assignment automation step to assign the role to the identity which is the same deployment which can be observed when a portal based deployment of a cluster is initiated

Environment:

  • Kubernetes version (use kubectl version): 1.19.9
  • Size of cluster (how many worker nodes are in the cluster?) 3 worker nodes ( 6 nodes in total, 3 system, 3 agent )
  • General description of workloads in the cluster (e.g. HTTP microservices, Java app, Ruby on Rails, machine learning, etc.) There are minimal workloads - simple http pods to validate metrics

Attached zip contains bicep template files used to deploy with the addition of the role assignment template to have the role enabled oms.zip

Author: petegrimsdale
Assignees: -
Labels:

azure/oms, triage, azure/log-analytics, action-required, Needs Attention :wave:

Milestone: -

ghost avatar Sep 29 '21 16:09 ghost

Currently the Container Insights template does not support the role assignment.

@rashmichandrashekar would you be able to extend this template to include role assignments?

austonli avatar Oct 29 '21 16:10 austonli

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

ghost avatar Dec 28 '21 20:12 ghost

This issue will now be closed because it hasn't had any activity for 7 days after stale. petegrimsdale feel free to comment again on the next 7 days to reopen or open a new issue after that time if you still have a question/issue or suggestion.

ghost avatar Jan 05 '22 01:01 ghost