Repository: Azure/ARO-RP
Pull request #1531 (2021-06-04 09:11:45)

Bump ws from 6.2.1 to 6.2.2 in /portal
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/websockets/ws/commits">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ws&package-manager=npm_and_yarn&previous-version=6.2.1&new-version=6.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/Azure/ARO-RP/network/alerts).

</details>


Patch:
diff --git a/README.md b/README.md
index 6ef627cdd..17768f5a0 100644
--- a/README.md
+++ b/README.md
@@ -89,6 +89,8 @@ questions or comments.
       aro-operator-master.openshift-azure-operator:8080, to avoid the
       `AlertmanagerReceiversNotConfigured` warning.
 
+    * azurensg: Ensures that the Network Security Groups (NSGs) are correct, and updates the Azure Machine Provider spec with subnet, vnet, and Network Resource Group.
+
     * checker: Watches the `Cluster` resource for changes and updates conditions
       of the resource based on checks mentioned below
 
diff --git a/pkg/operator/controllers/monitoring/monitoring_controller.go b/pkg/operator/controllers/monitoring/monitoring_controller.go
index 12bd5b89a..c2d6bd84a 100644
--- a/pkg/operator/controllers/monitoring/monitoring_controller.go
+++ b/pkg/operator/controllers/monitoring/monitoring_controller.go
@@ -43,6 +43,12 @@ type Config struct {
 			api.MissingFields
 		} `json:"volumeClaimTemplate,omitempty"`
 	} `json:"prometheusK8s,omitempty"`
+	AlertManagerMain struct {
+		api.MissingFields
+		VolumeClaimTemplate struct {
+			api.MissingFields
+		} `json:"volumeClaimTemplate,omitempty"`
+	} `json:"alertmanagerMain,omitempty"`
 }
 
 var defaultConfig = `prometheusK8s: {}`
@@ -95,6 +101,11 @@ func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.
 		changed = true
 	}
 
+	if !reflect.DeepEqual(configData.AlertManagerMain.VolumeClaimTemplate, struct{ api.MissingFields }{}) {
+		configData.AlertManagerMain.VolumeClaimTemplate = struct{ api.MissingFields }{}
+		changed = true
+	}
+
 	if !isCreate && !changed {
 		return reconcile.Result{}, nil
 	}
diff --git a/portal/package-lock.json b/portal/package-lock.json
index dd7a65de7..01d7ef15b 100644
--- a/portal/package-lock.json
+++ b/portal/package-lock.json
@@ -1694,9 +1694,9 @@
       "dev": true
     },
     "dns-packet": {
-      "version": "1.3.1",
-      "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz",
-      "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==",
+      "version": "1.3.4",
+      "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.4.tgz",
+      "integrity": "sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==",
       "dev": true,
       "requires": {
         "ip": "^1.1.0",
@@ -6133,9 +6133,9 @@
       "dev": true
     },
     "ws": {
-      "version": "6.2.1",
-      "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
-      "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
+      "version": "6.2.2",
+      "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz",
+      "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==",
       "dev": true,
       "requires": {
         "async-limiter": "~1.0.0"


Test patch:
diff --git a/pkg/operator/controllers/monitoring/monitoring_controller_test.go b/pkg/operator/controllers/monitoring/monitoring_controller_test.go
index d7ff70477..f237f0e4d 100644
--- a/pkg/operator/controllers/monitoring/monitoring_controller_test.go
+++ b/pkg/operator/controllers/monitoring/monitoring_controller_test.go
@@ -77,6 +77,7 @@ func TestReconcileMonitoringConfig(t *testing.T) {
 						Data: map[string]string{
 							"config.yaml": `
 prometheusK8s:
+  extraField: prometheus
   retention: 1d
   volumeClaimTemplate:
     metadata:
@@ -87,27 +88,17 @@ prometheusK8s:
           storage: 50Gi
       storageClassName: fast
       volumeMode: Filesystem
-`,
-						},
-					}),
-					log:        log,
-					jsonHandle: new(codec.JsonHandle),
-				}
-			},
-			wantConfig: `
-{}`,
-		},
-		{
-			name: "other monitoring components are configured",
-			setConfigMap: func() *Reconciler {
-				return &Reconciler{
-					kubernetescli: fake.NewSimpleClientset(&corev1.ConfigMap{
-						ObjectMeta: cmMetadata,
-						Data: map[string]string{
-							"config.yaml": `
 alertmanagerMain:
-  nodeSelector:
-    foo: bar
+  extraField: yeet
+  volumeClaimTemplate:
+    metadata:
+      name: slowest-storage
+    spec:
+      resources:
+        requests:
+          storage: 50Gi
+        storageClassName: snail-mail
+        volumeMode: Filesystem
 `,
 						},
 					}),
@@ -117,12 +108,13 @@ alertmanagerMain:
 			},
 			wantConfig: `
 alertmanagerMain:
-  nodeSelector:
-    foo: bar
+  extraField: yeet
+prometheusK8s:
+  extraField: prometheus
 `,
 		},
 		{
-			name: "enabled and we want to disable",
+			name: "other monitoring components are configured",
 			setConfigMap: func() *Reconciler {
 				return &Reconciler{
 					kubernetescli: fake.NewSimpleClientset(&corev1.ConfigMap{
@@ -132,13 +124,8 @@ alertmanagerMain:
 alertmanagerMain:
   nodeSelector:
     foo: bar
-prometheusK8s:
-    retention: 15d
-    volumeClaimTemplate:
-      spec:
-        resources:
-          requests:
-            storage: 100Gi
+somethingElse:
+  configured: true
 `,
 						},
 					}),
@@ -150,6 +137,8 @@ prometheusK8s:
 alertmanagerMain:
   nodeSelector:
     foo: bar
+somethingElse:
+  configured: true
 `,
 		},
 	} {