From a0843842afbd00c3c2b4e7a68e12ca1b71041292 Mon Sep 17 00:00:00 2001 From: rashmichandrashekar Date: Wed, 28 Aug 2024 15:31:21 -0700 Subject: [PATCH] Adding back log mount for tailing logs (#966) [comment]: # (Note that your PR title should follow the conventional commit format: https://conventionalcommits.org/en/v1.0.0/#summary) # PR Description [comment]: # (The below checklist is for PRs adding new features. If a box is not checked, add a reason why it's not needed.) # New Feature Checklist - [ ] List telemetry added about the feature. - [ ] Link to the one-pager about the feature. - [ ] List any tasks necessary for release (3P docs, AKS RP chart changes, etc.) after merging the PR. - [ ] Attach results of scale and perf testing. [comment]: # (The below checklist is for code changes. Not all boxes necessarily need to be checked. Build, doc, and template changes do not need to fill out the checklist.) # Tests Checklist - [ ] Have end-to-end Ginkgo tests been run on your cluster and passed? To bootstrap your cluster to run the tests, follow [these instructions](/otelcollector/test/README.md#bootstrap-a-dev-cluster-to-run-ginkgo-tests). - Labels used when running the tests on your cluster: - [ ] `operator` - [ ] `windows` - [ ] `arm64` - [ ] `arc-extension` - [ ] `fips` - [ ] Have new tests been added? For features, have tests been added for this feature? For fixes, is there a test that could have caught this issue and could validate that the fix works? - [ ] Is a new scrape job needed? - [ ] The scrape job was added to the folder [test-cluster-yamls](/otelcollector/test/test-cluster-yamls/) in the correct configmap or as a CR. - [ ] Was a new test label added? - [ ] A string constant for the label was added to [constants.go](/otelcollector/test/utils/constants.go). - [ ] The label and description was added to the [test README](/otelcollector/test/README.md). - [ ] The label was added to this [PR checklist](/.github/pull_request_template). - [ ] The label was added as needed to [testkube-test-crs.yaml](/otelcollector/test/testkube/testkube-test-crs.yaml). - [ ] Are additional API server permissions needed for the new tests? - [ ] These permissions have been added to [api-server-permissions.yaml](/otelcollector/test/testkube/api-server-permissions.yaml). - [ ] Was a new test suite (a new folder under `/tests`) added? - [ ] The new test suite is included in [testkube-test-crs.yaml](/otelcollector/test/testkube/testkube-test-crs.yaml). --- .../templates/ama-metrics-daemonset.yaml | 12 ++++++++++++ .../templates/ama-metrics-deployment.yaml | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/templates/ama-metrics-daemonset.yaml b/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/templates/ama-metrics-daemonset.yaml index dc273b141..591fc455a 100644 --- a/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/templates/ama-metrics-daemonset.yaml +++ b/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/templates/ama-metrics-daemonset.yaml @@ -158,6 +158,9 @@ spec: - name: host-log-containers readOnly: true mountPath: /var/log/containers + - name: host-log-pods + readOnly: true + mountPath: /var/log/pods - mountPath: /anchors/mariner name: anchors-mariner readOnly: true @@ -285,6 +288,9 @@ spec: - name: host-log-containers hostPath: path: /var/log/containers + - name: host-log-pods + hostPath: + path: /var/log/pods - name: anchors-mariner hostPath: path: /etc/pki/ca-trust/anchors/ @@ -428,6 +434,9 @@ spec: - name: host-log-containers readOnly: true mountPath: /var/log/containers + - name: host-log-pods + readOnly: true + mountPath: /var/log/pods livenessProbe: exec: command: @@ -499,6 +508,9 @@ spec: - name: host-log-containers hostPath: path: /var/log/containers + - name: host-log-pods + hostPath: + path: /var/log/pods - name: ama-metrics-tls-secret-volume secret: secretName: ama-metrics-mtls-secret diff --git a/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/templates/ama-metrics-deployment.yaml b/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/templates/ama-metrics-deployment.yaml index 5e71cd5f9..09893df4f 100644 --- a/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/templates/ama-metrics-deployment.yaml +++ b/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/templates/ama-metrics-deployment.yaml @@ -181,6 +181,9 @@ spec: - name: host-log-containers readOnly: true mountPath: /var/log/containers + - name: host-log-pods + readOnly: true + mountPath: /var/log/pods - mountPath: /anchors/mariner name: anchors-mariner readOnly: true @@ -333,6 +336,9 @@ spec: - name: host-log-containers hostPath: path: /var/log/containers + - name: host-log-pods + hostPath: + path: /var/log/pods - name: anchors-mariner hostPath: path: /etc/pki/ca-trust/anchors/