From 48ed9baf3c16d19da081cfbbfc342aa87974e5a3 Mon Sep 17 00:00:00 2001 From: prasebha Date: Thu, 18 Jan 2024 19:30:52 +0530 Subject: [PATCH 01/25] add daemonset support --- .../templates/mgmt-agent-daemonset.yaml | 64 +++++++++++++++++++ .../templates/mgmt-agent-statefulset.yaml | 2 + charts/mgmt-agent/values.schema.json | 36 +++++++++++ charts/mgmt-agent/values.yaml | 7 ++ 4 files changed, 109 insertions(+) create mode 100644 charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml diff --git a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml new file mode 100644 index 00000000..c44b7216 --- /dev/null +++ b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml @@ -0,0 +1,64 @@ +# Copyright (c) 2024, Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. + +{{- if .Values.deployment.daemonSetDeployment }} +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent + namespace: {{ include "mgmt-agent.namespace" . }} + labels: + app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent +spec: + selector: + matchLabels: + app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent + template: + metadata: + labels: + app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent + spec: + securityContext: + runAsUser: {{ default 0 .Values.deployment.security.runAsUser }} + runAsGroup: {{ default 0 .Values.deployment.security.runAsGroup }} + fsGroup: {{ default 0 .Values.deployment.security.fsGroup }} + serviceAccountName: {{ include "mgmt-agent.serviceAccount" . }} + imagePullSecrets: + - name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent-container-registry-key + restartPolicy: Always + containers: + - name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent + image: {{ .Values.mgmtagent.image.url }} + resources: + requests: + cpu: {{ .Values.deployment.resource.request.cpuCore }} + memory: {{ .Values.deployment.resource.request.memory }} + limits: + cpu: {{ .Values.deployment.resource.limit.cpuCore }} + memory: {{ .Values.deployment.resource.limit.memory }} + volumeMounts: + - name: mgmtagent-secret + mountPath: /opt/oracle/mgmtagent_secret + readOnly: true + - name: mgmtagent-hostpath + mountPath: /opt/oracle + - name: mgmtagent-config + mountPath: /opt/oracle/mgmtagent_config + - mountPath: /tmp + name: tmp + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + volumes: + - name: mgmtagent-secret + secret: + secretName: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent-rsp + - name: mgmtagent-config + configMap: + name: {{ include "mgmt-agent.resourceNamePrefix" . }}-metrics + - name: mgmtagent-hostpath + hostPath: + path: {{ .Values.deployment.daemonSet.hostPath }} + - emptyDir: {} + name: tmp +{{- end }} diff --git a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml index 239c5f9b..3cc7611f 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml @@ -1,6 +1,7 @@ # Copyright (c) 2023, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. +{{- if not .Values.deployment.daemonSetDeployment }} apiVersion: apps/v1 kind: StatefulSet metadata: @@ -70,3 +71,4 @@ spec: resources: requests: storage: {{ .Values.deployment.resource.request.storage }} +{{- end }} diff --git a/charts/mgmt-agent/values.schema.json b/charts/mgmt-agent/values.schema.json index 701acfad..710c65c8 100644 --- a/charts/mgmt-agent/values.schema.json +++ b/charts/mgmt-agent/values.schema.json @@ -153,6 +153,20 @@ "integer", "null" ] + }, + "daemonSetDeployment": + { + "type": "boolean" + } + } + }, + "daemonSet": + { + "properties": + { + "hostPath": + { + "type": "string" } } }, @@ -205,6 +219,28 @@ } } } + }, + "required": + [ + "daemonSetDeployment" + ], + "if": + { + "properties": { "daemonSetDeployment": { "const": true } } + }, + "then": + { + "required": ["daemonSet"], + "properties": + { + "daemonSet": + { + "required": + [ + "hostPath" + ] + } + } } } }, diff --git a/charts/mgmt-agent/values.yaml b/charts/mgmt-agent/values.yaml index 56b5c372..5369cc90 100644 --- a/charts/mgmt-agent/values.yaml +++ b/charts/mgmt-agent/values.yaml @@ -60,6 +60,13 @@ deployment: # Files created in the Container will use group ID 2000, replace it with a different value if desired fsGroup: 2000 + # By default Agent will be deployed as StatefulSet. For DaemonSet deployment, set this to true + daemonSetDeployment: false + + daemonSet: + # Provide the host path if Agent is deployed as DaemonSet. Agent should have read-write access to it. + hostPath: + # Provide the agent resources as per Kubernetes resource quantity resource: # Provide the minimum required resources From 2248505c6d7e75606ce92746c81b28590319c88d Mon Sep 17 00:00:00 2001 From: prasebha Date: Thu, 18 Jan 2024 19:47:46 +0530 Subject: [PATCH 02/25] update versions --- charts/mgmt-agent/Chart.yaml | 4 ++-- charts/oci-onm/Chart.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/mgmt-agent/Chart.yaml b/charts/mgmt-agent/Chart.yaml index f2fdc0fb..68d0034b 100644 --- a/charts/mgmt-agent/Chart.yaml +++ b/charts/mgmt-agent/Chart.yaml @@ -18,7 +18,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 3.0.1 +version: 3.0.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to @@ -28,6 +28,6 @@ appVersion: "1.16.0" dependencies: - name: oci-onm-common - version: "3.0.1" + version: "3.0.2" repository: "file://../common" condition: oci-onm-common.enabled diff --git a/charts/oci-onm/Chart.yaml b/charts/oci-onm/Chart.yaml index 11ad3cea..3108d9b6 100644 --- a/charts/oci-onm/Chart.yaml +++ b/charts/oci-onm/Chart.yaml @@ -18,7 +18,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 3.2.2 +version: 3.2.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to @@ -36,6 +36,6 @@ dependencies: repository: "file://../logan" condition: oci-onm-logan.enabled - name: oci-onm-mgmt-agent - version: "3.0.1" + version: "3.0.2" repository: "file://../mgmt-agent" condition: oci-onm-mgmt-agent.enabled From 542724b85adff9897605de3e835d24b8c750de49 Mon Sep 17 00:00:00 2001 From: prasebha Date: Thu, 8 Feb 2024 20:38:27 +0530 Subject: [PATCH 03/25] update readme.md --- charts/mgmt-agent/README.md | 1 + charts/oci-onm/README.md | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/mgmt-agent/README.md b/charts/mgmt-agent/README.md index bb1e6ee0..3d7b4158 100644 --- a/charts/mgmt-agent/README.md +++ b/charts/mgmt-agent/README.md @@ -31,6 +31,7 @@ A Helm chart for collecting Kubernetes Metrics using OCI Management Agent into O | oci-onm-common.resourceNamePrefix | string | `"{{ .Values.global.resourceNamePrefix }}"` | Prefix to be attached to resources created through this chart. Not all resources may have this prefix. | | oci-onm-common.serviceAccount | string | `"{{ .Values.global.resourceNamePrefix }}"` | Name of the Kubernetes ServiceAccount | | serviceAccount | string | `"{{ .Values.global.resourceNamePrefix }}"` | Name of the Kubernetes ServiceAccount | +| deployment.security.runAsUser | integer | `1000` | Processes in the Container will run as the specified user ID | ---------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) diff --git a/charts/oci-onm/README.md b/charts/oci-onm/README.md index d0471d97..276fd723 100644 --- a/charts/oci-onm/README.md +++ b/charts/oci-onm/README.md @@ -35,9 +35,9 @@ Helm chart for collecting Kubernetes logs & objects and metrics using Fluentd an | oci-onm-logan.serviceAccount | string | `"{{ .Values.global.resourceNamePrefix }}"` | | | oci-onm-mgmt-agent.kubernetesCluster.name | string | `"{{ .Values.global.kubernetesClusterName }}"` | | | oci-onm-mgmt-agent.mgmtagent.image.secret | string | `nil` | | -| oci-onm-mgmt-agent.mgmtagent.image.url | string | `nil` | | -| oci-onm-mgmt-agent.mgmtagent.installKey | string | `"resources/input.rsp"` | | -| oci-onm-mgmt-agent.mgmtagent.installKeyFileContent | string | `nil` | | +| oci-onm-mgmt-agent.mgmtagent.image.url | string | `"container-registry.oracle.com/oci_observability_management/oci-management-agent:1.2.0"` | | +| oci-onm-mgmt-agent.mgmtagent.installKey | string | `"resources/input.rsp"` | Copy the downloaded Management Agent Install Key file under root helm directory as resources/input.rsp . Provide either installKeyFileContent or installKey as an install key | +| oci-onm-mgmt-agent.mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file. Provide either installKeyFileContent or installKey as an install key | | oci-onm-mgmt-agent.namespace | string | `"{{ .Values.global.namespace }}"` | | | oci-onm-mgmt-agent.oci-onm-common.enabled | bool | `false` | | | oci-onm-mgmt-agent.serviceAccount | string | `"{{ .Values.global.resourceNamePrefix }}"` | | From fa1aab2fb1c245847d4a9cc155991bedea503df3 Mon Sep 17 00:00:00 2001 From: prasebha Date: Thu, 8 Feb 2024 20:46:47 +0530 Subject: [PATCH 04/25] updated readme.md --- charts/mgmt-agent/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/mgmt-agent/README.md b/charts/mgmt-agent/README.md index 3d7b4158..e3ea508c 100644 --- a/charts/mgmt-agent/README.md +++ b/charts/mgmt-agent/README.md @@ -31,7 +31,11 @@ A Helm chart for collecting Kubernetes Metrics using OCI Management Agent into O | oci-onm-common.resourceNamePrefix | string | `"{{ .Values.global.resourceNamePrefix }}"` | Prefix to be attached to resources created through this chart. Not all resources may have this prefix. | | oci-onm-common.serviceAccount | string | `"{{ .Values.global.resourceNamePrefix }}"` | Name of the Kubernetes ServiceAccount | | serviceAccount | string | `"{{ .Values.global.resourceNamePrefix }}"` | Name of the Kubernetes ServiceAccount | -| deployment.security.runAsUser | integer | `1000` | Processes in the Container will run as the specified user ID | +| deployment.security.runAsUser | integer | `1000` | Processes in the Container will use the specified user ID | +| deployment.security.runAsGroup | integer | `2000` | Processes in the Container will use the specified group ID | +| deployment.security.fsGroup | integer | `2000` | Files created in the Container will use the specified group ID | +| deployment.daemonSetDeployment | bool | `false` | By default Agent will be deployed as StatefulSet. For DaemonSet deployment, set this to true | +| deployment.daemonSet.hostPath | string | `nil` | Provide the host path if Agent is deployed as DaemonSet. Agent should have read-write access to it | ---------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) From 947763e99652bf0197cf5fdab968543668460ca2 Mon Sep 17 00:00:00 2001 From: prasebha Date: Thu, 8 Feb 2024 21:11:58 +0530 Subject: [PATCH 05/25] updated readme.md --- charts/mgmt-agent/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/mgmt-agent/README.md b/charts/mgmt-agent/README.md index e3ea508c..61a83df4 100644 --- a/charts/mgmt-agent/README.md +++ b/charts/mgmt-agent/README.md @@ -35,7 +35,13 @@ A Helm chart for collecting Kubernetes Metrics using OCI Management Agent into O | deployment.security.runAsGroup | integer | `2000` | Processes in the Container will use the specified group ID | | deployment.security.fsGroup | integer | `2000` | Files created in the Container will use the specified group ID | | deployment.daemonSetDeployment | bool | `false` | By default Agent will be deployed as StatefulSet. For DaemonSet deployment, set this to true | -| deployment.daemonSet.hostPath | string | `nil` | Provide the host path if Agent is deployed as DaemonSet. Agent should have read-write access to it | +| deployment.daemonSet.hostPath | string | `nil` | The host path to store data, if Agent is deployed as DaemonSet. Agent should have read-write access to it | +| deployment.resource.request.cpuCore | string | `200m` | Minimum CPU cores(millicore) for each agent instance | +| deployment.resource.request.memory | string | `500Mi` | Minimum memory(mebibytes) for each agent instance | +| deployment.resource.request.storage | string | `2Gi` | Minimum storage(gibibyte) for StatefulSet's PVC | +| deployment.resource.limit.cpuCore | string | `500m` | Maximum CPU cores(millicore) for each agent instance | +| deployment.resource.limit.memory | string | `1Gi` | Maximum memory(gibibyte) for each agent instance | +| deployment.storageClass | string | `nil` | The storage class for StatefulSet's PVC. If not provided then the Cluster's default storage class will be used | ---------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) From 690ad5c54f82d49cf2d75a4478e188ef758a4e7d Mon Sep 17 00:00:00 2001 From: prasebha Date: Wed, 14 Feb 2024 09:33:28 +0530 Subject: [PATCH 06/25] add helm deployment flag --- charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml | 3 +++ charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml | 3 +++ charts/mgmt-agent/values.schema.json | 7 +++++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml index c44b7216..01ae50b9 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml @@ -29,6 +29,9 @@ spec: containers: - name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent image: {{ .Values.mgmtagent.image.url }} + env: + - name: HELM_DEPLOYMENT + value: "true" resources: requests: cpu: {{ .Values.deployment.resource.request.cpuCore }} diff --git a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml index 3cc7611f..9388d12b 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml @@ -31,6 +31,9 @@ spec: containers: - name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent image: {{ .Values.mgmtagent.image.url }} + env: + - name: HELM_DEPLOYMENT + value: "true" resources: requests: cpu: {{ .Values.deployment.resource.request.cpuCore }} diff --git a/charts/mgmt-agent/values.schema.json b/charts/mgmt-agent/values.schema.json index 710c65c8..ea5f7d29 100644 --- a/charts/mgmt-agent/values.schema.json +++ b/charts/mgmt-agent/values.schema.json @@ -109,7 +109,11 @@ { "name": { - "type": "string" + "type": + [ + "string", + "null" + ] }, "namespace": { @@ -118,7 +122,6 @@ }, "required": [ - "name", "namespace" ] }, From 86a808ee073002b23698d35c407889eb25af6808 Mon Sep 17 00:00:00 2001 From: prasebha Date: Wed, 21 Feb 2024 17:59:21 +0530 Subject: [PATCH 07/25] add monitoring namespace and override allow metrics --- charts/mgmt-agent/README.md | 5 +++++ charts/mgmt-agent/templates/metrics-configmap.yaml | 10 ++++++++++ charts/mgmt-agent/values.yaml | 10 ++++++++++ 3 files changed, 25 insertions(+) diff --git a/charts/mgmt-agent/README.md b/charts/mgmt-agent/README.md index 61a83df4..0e1095e2 100644 --- a/charts/mgmt-agent/README.md +++ b/charts/mgmt-agent/README.md @@ -20,6 +20,11 @@ A Helm chart for collecting Kubernetes Metrics using OCI Management Agent into O | kubernetesCluster.compartmentId | string | `nil` | OCI Compartment Id to push Kubernetes Monitoring metrics. If not specified default is same as Agent compartment | | kubernetesCluster.name | string | `nil` | Kubernetes cluster name | | kubernetesCluster.namespace | string | `"*"` | Kubernetes cluster namespace(s) to monitor. This can be a comma-separated list of namespaces or '*' to monitor all the namespaces | +| kubernetesCluster.monitoringNamespace | string | `nil` | OCI namespace to push Kubernetes Monitoring metrics. If not specified then it will pushed to 'mgmtagent_kubernetes_metrics' | +| kubernetesCluster.overrideAllowMetricsAPIServer | string | `nil` | Provide the specific list of comma separated metric names for agent computed metrics to be collected. | +| kubernetesCluster.overrideAllowMetricsCluster | string | `nil` | Provide the specific list of comma separated metric names for agent computed metrics to be collected | +| kubernetesCluster.overrideAllowMetricsKubelet | string | `nil` | Provide the specific list of comma separated metric names for Kubelet (/api/v1/nodes//proxy/metrics) metrics to be collected | +| kubernetesCluster.overrideAllowMetricsNode | string | `nil` | Provide the specific list of comma separated metric names for Node (/api/v1/nodes//proxy/metrics/resource, /api/v1/nodes//proxy/metrics/cadvisor) metrics to be collected | | mgmtagent.image.secret | string | `nil` | Image secrets to use for pulling container image (base64 encoded content of ~/.docker/config.json file) | | mgmtagent.image.url | string | `nil` | Replace this value with actual docker image URL for Management Agent | | mgmtagent.installKey | string | `"resources/input.rsp"` | Copy the downloaded Management Agent Install Key file under root helm directory as resources/input.rsp | diff --git a/charts/mgmt-agent/templates/metrics-configmap.yaml b/charts/mgmt-agent/templates/metrics-configmap.yaml index 258b53cd..68de507a 100644 --- a/charts/mgmt-agent/templates/metrics-configmap.yaml +++ b/charts/mgmt-agent/templates/metrics-configmap.yaml @@ -14,3 +14,13 @@ data: clusterName={{ include "mgmt-agent.kubernetesClusterName" . }} # Kubernetes Namespace to monitor kubernetesNamespace={{ .Values.kubernetesCluster.namespace }} + # namespace to push monitoring metrics + monitoringNamespace={{ .Values.kubernetesCluster.monitoringNamespace }} + # list of comma separated metric names for API server (/metrics) metrics + overrideAllowMetricsAPIServer={{ .Values.kubernetesCluster.overrideAllowMetricsAPIServer }} + # list of comma separated metric names for agent computed metrics + overrideAllowMetricsCluster={{ .Values.kubernetesCluster.overrideAllowMetricsCluster }} + # list of comma separated metric names for Kubelet (/api/v1/nodes//proxy/metrics) metrics + overrideAllowMetricsKubelet={{ .Values.kubernetesCluster.overrideAllowMetricsKubelet }} + # list of comma separated metric names for Node (/api/v1/nodes//proxy/metrics/resource, /api/v1/nodes//proxy/metrics/cadvisor) metrics + overrideAllowMetricsNode={{ .Values.kubernetesCluster.overrideAllowMetricsNode }} diff --git a/charts/mgmt-agent/values.yaml b/charts/mgmt-agent/values.yaml index 5369cc90..8ca8abff 100644 --- a/charts/mgmt-agent/values.yaml +++ b/charts/mgmt-agent/values.yaml @@ -50,6 +50,16 @@ kubernetesCluster: name: # -- Kubernetes cluster namespace(s) to monitor. This can be a comma-separated list of namespaces or '*' to monitor all the namespaces namespace: '*' + # -- OCI namespace to push Kubernetes Monitoring metrics. If not specified then it will pushed to stream's namespace + monitoringNamespace: + # -- Provide the specific list of comma separated metric names for API server (/metrics) metrics to be collected. + overrideAllowMetricsAPIServer: + # -- Provide the specific list of comma separated metric names for agent computed metrics to be collected. + overrideAllowMetricsCluster: + # -- Provide the specific list of comma separated metric names for Kubelet (/api/v1/nodes//proxy/metrics) metrics to be collected. + overrideAllowMetricsKubelet: + # -- Provide the specific list of comma separated metric names for Node (/api/v1/nodes//proxy/metrics/resource, /api/v1/nodes//proxy/metrics/cadvisor) metrics to be collected. + overrideAllowMetricsNode: deployment: security: From 36c18c998e94597d1741cb884d6795edf363126e Mon Sep 17 00:00:00 2001 From: prasebha Date: Wed, 21 Feb 2024 18:05:58 +0530 Subject: [PATCH 08/25] fix comment --- charts/mgmt-agent/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/mgmt-agent/values.yaml b/charts/mgmt-agent/values.yaml index 8ca8abff..3bf2aca0 100644 --- a/charts/mgmt-agent/values.yaml +++ b/charts/mgmt-agent/values.yaml @@ -50,7 +50,7 @@ kubernetesCluster: name: # -- Kubernetes cluster namespace(s) to monitor. This can be a comma-separated list of namespaces or '*' to monitor all the namespaces namespace: '*' - # -- OCI namespace to push Kubernetes Monitoring metrics. If not specified then it will pushed to stream's namespace + # -- OCI namespace to push Kubernetes Monitoring metrics. If not specified then it will pushed to 'mgmtagent_kubernetes_metrics' monitoringNamespace: # -- Provide the specific list of comma separated metric names for API server (/metrics) metrics to be collected. overrideAllowMetricsAPIServer: From 83da8ae3e912a9b1150978c10fc0af83b7a96b60 Mon Sep 17 00:00:00 2001 From: prasebha Date: Wed, 21 Feb 2024 19:05:31 +0530 Subject: [PATCH 09/25] add support for pod redeployment when config map changes --- charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml | 2 ++ charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml index 01ae50b9..d493ab6d 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml @@ -15,6 +15,8 @@ spec: app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent template: metadata: + annotations: + checksum/configmap: {{ include (print $.Template.BasePath "/metrics-configmap.yaml") . | sha256sum }} labels: app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent spec: diff --git a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml index 9388d12b..335d6a5b 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml @@ -17,6 +17,8 @@ spec: app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent template: metadata: + annotations: + checksum/configmap: {{ include (print $.Template.BasePath "/metrics-configmap.yaml") . | sha256sum }} labels: app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent spec: From a2372ec68579c079d5cae68668ed7937c76d362f Mon Sep 17 00:00:00 2001 From: prasebha Date: Wed, 6 Mar 2024 22:54:49 +0530 Subject: [PATCH 10/25] add install_namespace env prop --- charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml | 2 ++ charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml index d493ab6d..0b181ba5 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml @@ -34,6 +34,8 @@ spec: env: - name: HELM_DEPLOYMENT value: "true" + - name: INSTALL_NAMESPACE + value: {{ include "mgmt-agent.namespace" . }} resources: requests: cpu: {{ .Values.deployment.resource.request.cpuCore }} diff --git a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml index 335d6a5b..7cdbc171 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml @@ -36,6 +36,8 @@ spec: env: - name: HELM_DEPLOYMENT value: "true" + - name: INSTALL_NAMESPACE + value: {{ include "mgmt-agent.namespace" . }} resources: requests: cpu: {{ .Values.deployment.resource.request.cpuCore }} From 0b155d0e00edfa84225e24f848b9a8975a2a9f59 Mon Sep 17 00:00:00 2001 From: prasebha Date: Fri, 22 Mar 2024 20:31:23 +0530 Subject: [PATCH 11/25] add agent configMap to override and fix validation --- .../mgmt-agent/templates/agent-configmap.yaml | 11 ++++++++ .../templates/mgmt-agent-daemonset.yaml | 10 +++++-- .../templates/mgmt-agent-statefulset.yaml | 8 +++++- charts/mgmt-agent/values.schema.json | 26 +++++-------------- 4 files changed, 32 insertions(+), 23 deletions(-) create mode 100644 charts/mgmt-agent/templates/agent-configmap.yaml diff --git a/charts/mgmt-agent/templates/agent-configmap.yaml b/charts/mgmt-agent/templates/agent-configmap.yaml new file mode 100644 index 00000000..426d9e99 --- /dev/null +++ b/charts/mgmt-agent/templates/agent-configmap.yaml @@ -0,0 +1,11 @@ +# Copyright (c) 2024, Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "mgmt-agent.resourceNamePrefix" . }}-agent + namespace: {{ include "mgmt-agent.namespace" . }} +data: + emd.properties: | + # provide the key=value pair below to override diff --git a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml index 0b181ba5..74c5783e 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml @@ -16,7 +16,8 @@ spec: template: metadata: annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/metrics-configmap.yaml") . | sha256sum }} + checksum/metrics-configmap: {{ include (print $.Template.BasePath "/metrics-configmap.yaml") . | sha256sum }} + checksum/agent-configmap: {{ include (print $.Template.BasePath "/agent-configmap.yaml") . | sha256sum }} labels: app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent spec: @@ -51,6 +52,8 @@ spec: mountPath: /opt/oracle - name: mgmtagent-config mountPath: /opt/oracle/mgmtagent_config + - name: mgmtagent-agent-config + mountPath: /opt/oracle/mgmtagent_agent_config - mountPath: /tmp name: tmp securityContext: @@ -63,9 +66,12 @@ spec: - name: mgmtagent-config configMap: name: {{ include "mgmt-agent.resourceNamePrefix" . }}-metrics + - name: mgmtagent-agent-config + configMap: + name: {{ include "mgmt-agent.resourceNamePrefix" . }}-agent - name: mgmtagent-hostpath hostPath: - path: {{ .Values.deployment.daemonSet.hostPath }} + path: {{ required "deployment.daemonSet.hostPath is required" .Values.deployment.daemonSet.hostPath }} - emptyDir: {} name: tmp {{- end }} diff --git a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml index 7cdbc171..fb41c77b 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml @@ -18,7 +18,8 @@ spec: template: metadata: annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/metrics-configmap.yaml") . | sha256sum }} + checksum/metrics-configmap: {{ include (print $.Template.BasePath "/metrics-configmap.yaml") . | sha256sum }} + checksum/agent-configmap: {{ include (print $.Template.BasePath "/agent-configmap.yaml") . | sha256sum }} labels: app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent spec: @@ -53,6 +54,8 @@ spec: mountPath: /opt/oracle - name: mgmtagent-config mountPath: /opt/oracle/mgmtagent_config + - name: mgmtagent-agent-config + mountPath: /opt/oracle/mgmtagent_agent_config - mountPath: /tmp name: tmp securityContext: @@ -65,6 +68,9 @@ spec: - name: mgmtagent-config configMap: name: {{ include "mgmt-agent.resourceNamePrefix" . }}-metrics + - name: mgmtagent-agent-config + configMap: + name: {{ include "mgmt-agent.resourceNamePrefix" . }}-agent - emptyDir: {} name: tmp volumeClaimTemplates: diff --git a/charts/mgmt-agent/values.schema.json b/charts/mgmt-agent/values.schema.json index ea5f7d29..2ab61f1b 100644 --- a/charts/mgmt-agent/values.schema.json +++ b/charts/mgmt-agent/values.schema.json @@ -169,7 +169,11 @@ { "hostPath": { - "type": "string" + "type": + [ + "string", + "null" + ] } } }, @@ -226,25 +230,7 @@ "required": [ "daemonSetDeployment" - ], - "if": - { - "properties": { "daemonSetDeployment": { "const": true } } - }, - "then": - { - "required": ["daemonSet"], - "properties": - { - "daemonSet": - { - "required": - [ - "hostPath" - ] - } - } - } + ] } }, "required": From 51150bcd09de498ad37d22a6c3006d2dfff51a7d Mon Sep 17 00:00:00 2001 From: prasebha Date: Fri, 29 Mar 2024 09:27:34 +0530 Subject: [PATCH 12/25] add support for statefulset and daemonset deployment --- charts/mgmt-agent/README.md | 2 +- charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml | 2 ++ charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml | 4 ++-- charts/mgmt-agent/values.yaml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/charts/mgmt-agent/README.md b/charts/mgmt-agent/README.md index 0e1095e2..4eb116a4 100644 --- a/charts/mgmt-agent/README.md +++ b/charts/mgmt-agent/README.md @@ -39,7 +39,7 @@ A Helm chart for collecting Kubernetes Metrics using OCI Management Agent into O | deployment.security.runAsUser | integer | `1000` | Processes in the Container will use the specified user ID | | deployment.security.runAsGroup | integer | `2000` | Processes in the Container will use the specified group ID | | deployment.security.fsGroup | integer | `2000` | Files created in the Container will use the specified group ID | -| deployment.daemonSetDeployment | bool | `false` | By default Agent will be deployed as StatefulSet. For DaemonSet deployment, set this to true | +| deployment.daemonSetDeployment | bool | `false` | Set the daemonset deployment to true, to deploy additional agents, to distribute the node metrics collection | | deployment.daemonSet.hostPath | string | `nil` | The host path to store data, if Agent is deployed as DaemonSet. Agent should have read-write access to it | | deployment.resource.request.cpuCore | string | `200m` | Minimum CPU cores(millicore) for each agent instance | | deployment.resource.request.memory | string | `500Mi` | Minimum memory(mebibytes) for each agent instance | diff --git a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml index 74c5783e..47daa0b1 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml @@ -33,6 +33,8 @@ spec: - name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent image: {{ .Values.mgmtagent.image.url }} env: + - name: DAEMONSET_DEPLOYMENT + value: "{{ .Values.deployment.daemonSetDeployment }}" - name: HELM_DEPLOYMENT value: "true" - name: INSTALL_NAMESPACE diff --git a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml index fb41c77b..ee95080c 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml @@ -1,7 +1,6 @@ # Copyright (c) 2023, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. -{{- if not .Values.deployment.daemonSetDeployment }} apiVersion: apps/v1 kind: StatefulSet metadata: @@ -35,6 +34,8 @@ spec: - name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent image: {{ .Values.mgmtagent.image.url }} env: + - name: DAEMONSET_DEPLOYMENT + value: "{{ .Values.deployment.daemonSetDeployment }}" - name: HELM_DEPLOYMENT value: "true" - name: INSTALL_NAMESPACE @@ -84,4 +85,3 @@ spec: resources: requests: storage: {{ .Values.deployment.resource.request.storage }} -{{- end }} diff --git a/charts/mgmt-agent/values.yaml b/charts/mgmt-agent/values.yaml index 3bf2aca0..4b20f7d1 100644 --- a/charts/mgmt-agent/values.yaml +++ b/charts/mgmt-agent/values.yaml @@ -70,7 +70,7 @@ deployment: # Files created in the Container will use group ID 2000, replace it with a different value if desired fsGroup: 2000 - # By default Agent will be deployed as StatefulSet. For DaemonSet deployment, set this to true + # Set the daemonset deployment to true, to deploy additional agents, to distribute the node metrics collection daemonSetDeployment: false daemonSet: From e31dd161b0c0b16053dc91e9dc29e3b0c688072a Mon Sep 17 00:00:00 2001 From: prasebha Date: Fri, 29 Mar 2024 21:57:11 +0530 Subject: [PATCH 13/25] resolve review comments --- charts/mgmt-agent/README.md | 2 +- charts/mgmt-agent/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/mgmt-agent/README.md b/charts/mgmt-agent/README.md index 4eb116a4..5ccf916c 100644 --- a/charts/mgmt-agent/README.md +++ b/charts/mgmt-agent/README.md @@ -39,7 +39,7 @@ A Helm chart for collecting Kubernetes Metrics using OCI Management Agent into O | deployment.security.runAsUser | integer | `1000` | Processes in the Container will use the specified user ID | | deployment.security.runAsGroup | integer | `2000` | Processes in the Container will use the specified group ID | | deployment.security.fsGroup | integer | `2000` | Files created in the Container will use the specified group ID | -| deployment.daemonSetDeployment | bool | `false` | Set the daemonset deployment to true, to deploy additional agents, to distribute the node metrics collection | +| deployment.daemonSetDeployment | bool | `false` | Setting the daemonset deployment to true, will deploy the Management Agents as a daemonset in addition to deploying the Management Agent as a statefulset. This is done to to distribute the node metrics collection to agents running on the node | | deployment.daemonSet.hostPath | string | `nil` | The host path to store data, if Agent is deployed as DaemonSet. Agent should have read-write access to it | | deployment.resource.request.cpuCore | string | `200m` | Minimum CPU cores(millicore) for each agent instance | | deployment.resource.request.memory | string | `500Mi` | Minimum memory(mebibytes) for each agent instance | diff --git a/charts/mgmt-agent/values.yaml b/charts/mgmt-agent/values.yaml index 4b20f7d1..94e2433c 100644 --- a/charts/mgmt-agent/values.yaml +++ b/charts/mgmt-agent/values.yaml @@ -70,7 +70,7 @@ deployment: # Files created in the Container will use group ID 2000, replace it with a different value if desired fsGroup: 2000 - # Set the daemonset deployment to true, to deploy additional agents, to distribute the node metrics collection + # Setting the daemonset deployment to true, will deploy the Management Agents as a daemonset in addition to deploying the Management Agent as a statefulset. This is done to to distribute the node metrics collection to agents running on the node daemonSetDeployment: false daemonSet: From 4855b4fe0b0fd1ab718e61c00489fd512dd879a5 Mon Sep 17 00:00:00 2001 From: prasebha Date: Sat, 30 Mar 2024 22:13:58 +0530 Subject: [PATCH 14/25] bugfix - remove configMap key without value --- charts/mgmt-agent/templates/metrics-configmap.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/charts/mgmt-agent/templates/metrics-configmap.yaml b/charts/mgmt-agent/templates/metrics-configmap.yaml index 68de507a..6fad8980 100644 --- a/charts/mgmt-agent/templates/metrics-configmap.yaml +++ b/charts/mgmt-agent/templates/metrics-configmap.yaml @@ -14,13 +14,23 @@ data: clusterName={{ include "mgmt-agent.kubernetesClusterName" . }} # Kubernetes Namespace to monitor kubernetesNamespace={{ .Values.kubernetesCluster.namespace }} + {{- if .Values.kubernetesCluster.monitoringNamespace }} # namespace to push monitoring metrics monitoringNamespace={{ .Values.kubernetesCluster.monitoringNamespace }} + {{- end }} + {{- if .Values.kubernetesCluster.overrideAllowMetricsAPIServer }} # list of comma separated metric names for API server (/metrics) metrics overrideAllowMetricsAPIServer={{ .Values.kubernetesCluster.overrideAllowMetricsAPIServer }} + {{- end }} + {{- if .Values.kubernetesCluster.overrideAllowMetricsCluster }} # list of comma separated metric names for agent computed metrics overrideAllowMetricsCluster={{ .Values.kubernetesCluster.overrideAllowMetricsCluster }} + {{- end }} + {{- if .Values.kubernetesCluster.overrideAllowMetricsKubelet }} # list of comma separated metric names for Kubelet (/api/v1/nodes//proxy/metrics) metrics overrideAllowMetricsKubelet={{ .Values.kubernetesCluster.overrideAllowMetricsKubelet }} + {{- end }} + {{- if .Values.kubernetesCluster.overrideAllowMetricsNode }} # list of comma separated metric names for Node (/api/v1/nodes//proxy/metrics/resource, /api/v1/nodes//proxy/metrics/cadvisor) metrics overrideAllowMetricsNode={{ .Values.kubernetesCluster.overrideAllowMetricsNode }} + {{- end }} From c8af2e6a2302d870b9c63445fdcdcfd7aa6608f8 Mon Sep 17 00:00:00 2001 From: prasebha Date: Tue, 2 Apr 2024 20:30:08 +0530 Subject: [PATCH 15/25] add validation to monitoringNamespace pattern --- charts/mgmt-agent/README.md | 2 +- charts/mgmt-agent/values.schema.json | 13 +++++++++++++ charts/mgmt-agent/values.yaml | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/charts/mgmt-agent/README.md b/charts/mgmt-agent/README.md index 5ccf916c..ea5d15e6 100644 --- a/charts/mgmt-agent/README.md +++ b/charts/mgmt-agent/README.md @@ -20,7 +20,7 @@ A Helm chart for collecting Kubernetes Metrics using OCI Management Agent into O | kubernetesCluster.compartmentId | string | `nil` | OCI Compartment Id to push Kubernetes Monitoring metrics. If not specified default is same as Agent compartment | | kubernetesCluster.name | string | `nil` | Kubernetes cluster name | | kubernetesCluster.namespace | string | `"*"` | Kubernetes cluster namespace(s) to monitor. This can be a comma-separated list of namespaces or '*' to monitor all the namespaces | -| kubernetesCluster.monitoringNamespace | string | `nil` | OCI namespace to push Kubernetes Monitoring metrics. If not specified then it will pushed to 'mgmtagent_kubernetes_metrics' | +| kubernetesCluster.monitoringNamespace | string | `nil` | OCI namespace to push Kubernetes Monitoring metrics. The namespace should match the pattern '^[a-z][a-z0-9_]*[a-z0-9]$'. By default metrics will be pushed to 'mgmtagent_kubernetes_metrics' | | kubernetesCluster.overrideAllowMetricsAPIServer | string | `nil` | Provide the specific list of comma separated metric names for agent computed metrics to be collected. | | kubernetesCluster.overrideAllowMetricsCluster | string | `nil` | Provide the specific list of comma separated metric names for agent computed metrics to be collected | | kubernetesCluster.overrideAllowMetricsKubelet | string | `nil` | Provide the specific list of comma separated metric names for Kubelet (/api/v1/nodes//proxy/metrics) metrics to be collected | diff --git a/charts/mgmt-agent/values.schema.json b/charts/mgmt-agent/values.schema.json index 2ab61f1b..a1a45b2a 100644 --- a/charts/mgmt-agent/values.schema.json +++ b/charts/mgmt-agent/values.schema.json @@ -118,6 +118,19 @@ "namespace": { "type": "string" + }, + "monitoringNamespace": + { + "anyOf": + [ + { + "type": "string", + "pattern": "^[a-z][a-z0-9_]*[a-z0-9]$" + }, + { + "type": "null" + } + ] } }, "required": diff --git a/charts/mgmt-agent/values.yaml b/charts/mgmt-agent/values.yaml index 94e2433c..b7560a38 100644 --- a/charts/mgmt-agent/values.yaml +++ b/charts/mgmt-agent/values.yaml @@ -50,7 +50,7 @@ kubernetesCluster: name: # -- Kubernetes cluster namespace(s) to monitor. This can be a comma-separated list of namespaces or '*' to monitor all the namespaces namespace: '*' - # -- OCI namespace to push Kubernetes Monitoring metrics. If not specified then it will pushed to 'mgmtagent_kubernetes_metrics' + # -- OCI namespace to push Kubernetes Monitoring metrics. The namespace should match the pattern '^[a-z][a-z0-9_]*[a-z0-9]$'. By default metrics will be pushed to 'mgmtagent_kubernetes_metrics' monitoringNamespace: # -- Provide the specific list of comma separated metric names for API server (/metrics) metrics to be collected. overrideAllowMetricsAPIServer: From 062be9b8cab090f92f692b9f3f0f93fb803ac84b Mon Sep 17 00:00:00 2001 From: prasebha Date: Thu, 4 Apr 2024 15:16:38 +0530 Subject: [PATCH 16/25] add clean up for old deployment --- charts/mgmt-agent/README.md | 1 + .../templates/mgmt-agent-daemonset.yaml | 4 ++++ .../templates/mgmt-agent-statefulset.yaml | 4 ++++ charts/mgmt-agent/values.schema.json | 16 ++++++++++++---- charts/mgmt-agent/values.yaml | 3 +++ 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/charts/mgmt-agent/README.md b/charts/mgmt-agent/README.md index ea5d15e6..397e324b 100644 --- a/charts/mgmt-agent/README.md +++ b/charts/mgmt-agent/README.md @@ -39,6 +39,7 @@ A Helm chart for collecting Kubernetes Metrics using OCI Management Agent into O | deployment.security.runAsUser | integer | `1000` | Processes in the Container will use the specified user ID | | deployment.security.runAsGroup | integer | `2000` | Processes in the Container will use the specified group ID | | deployment.security.fsGroup | integer | `2000` | Files created in the Container will use the specified group ID | +| deployment.cleanupEpochTime | integer | `nil` | Please provide the current epoch time in seconds (date +%s) to clean up the agent installation directory from previous deployment | | deployment.daemonSetDeployment | bool | `false` | Setting the daemonset deployment to true, will deploy the Management Agents as a daemonset in addition to deploying the Management Agent as a statefulset. This is done to to distribute the node metrics collection to agents running on the node | | deployment.daemonSet.hostPath | string | `nil` | The host path to store data, if Agent is deployed as DaemonSet. Agent should have read-write access to it | | deployment.resource.request.cpuCore | string | `200m` | Minimum CPU cores(millicore) for each agent instance | diff --git a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml index 47daa0b1..ac819d5e 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml @@ -39,6 +39,10 @@ spec: value: "true" - name: INSTALL_NAMESPACE value: {{ include "mgmt-agent.namespace" . }} + {{- if .Values.deployment.cleanupEpochTime }} + - name: POD_CLEANUP_ID + value: "{{ .Values.deployment.cleanupEpochTime }}" + {{- end }} resources: requests: cpu: {{ .Values.deployment.resource.request.cpuCore }} diff --git a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml index ee95080c..51fd4417 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml @@ -40,6 +40,10 @@ spec: value: "true" - name: INSTALL_NAMESPACE value: {{ include "mgmt-agent.namespace" . }} + {{- if .Values.deployment.cleanupEpochTime }} + - name: POD_CLEANUP_ID + value: "{{ .Values.deployment.cleanupEpochTime }}" + {{- end }} resources: requests: cpu: {{ .Values.deployment.resource.request.cpuCore }} diff --git a/charts/mgmt-agent/values.schema.json b/charts/mgmt-agent/values.schema.json index a1a45b2a..2c614ee9 100644 --- a/charts/mgmt-agent/values.schema.json +++ b/charts/mgmt-agent/values.schema.json @@ -169,13 +169,21 @@ "integer", "null" ] - }, - "daemonSetDeployment": - { - "type": "boolean" } } }, + "cleanupEpochTime": + { + "type": + [ + "integer", + "null" + ] + }, + "daemonSetDeployment": + { + "type": "boolean" + }, "daemonSet": { "properties": diff --git a/charts/mgmt-agent/values.yaml b/charts/mgmt-agent/values.yaml index b7560a38..368fcfcc 100644 --- a/charts/mgmt-agent/values.yaml +++ b/charts/mgmt-agent/values.yaml @@ -70,6 +70,9 @@ deployment: # Files created in the Container will use group ID 2000, replace it with a different value if desired fsGroup: 2000 + # Please provide the current epoch time in seconds (date +%s) to clean up the agent installation directory from previous deployment + cleanupEpochTime: + # Setting the daemonset deployment to true, will deploy the Management Agents as a daemonset in addition to deploying the Management Agent as a statefulset. This is done to to distribute the node metrics collection to agents running on the node daemonSetDeployment: false From f74d780bf84b923cd0259bf65631146bd35669bd Mon Sep 17 00:00:00 2001 From: prasebha Date: Thu, 11 Apr 2024 08:13:07 +0530 Subject: [PATCH 17/25] create configmap for env props --- .../mgmt-agent/templates/env-configmap.yaml | 20 +++++++++++++++++++ .../templates/mgmt-agent-daemonset.yaml | 20 +++++++++---------- .../templates/mgmt-agent-statefulset.yaml | 20 +++++++++---------- 3 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 charts/mgmt-agent/templates/env-configmap.yaml diff --git a/charts/mgmt-agent/templates/env-configmap.yaml b/charts/mgmt-agent/templates/env-configmap.yaml new file mode 100644 index 00000000..838e031c --- /dev/null +++ b/charts/mgmt-agent/templates/env-configmap.yaml @@ -0,0 +1,20 @@ +# Copyright (c) 2024, Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "mgmt-agent.resourceNamePrefix" . }}-env + namespace: {{ include "mgmt-agent.namespace" . }} +data: + # Unmodifiable properties + # Please do not remove/modify the below properties + DAEMONSET_DEPLOYMENT: "{{ .Values.deployment.daemonSetDeployment }}" + HELM_DEPLOYMENT: "true" + INSTALL_NAMESPACE: "{{ include "mgmt-agent.namespace" . }}" + {{- if .Values.deployment.cleanupEpochTime }} + POD_CLEANUP_ID: "{{ .Values.deployment.cleanupEpochTime }}" + {{- end }} + + # Modifiable properties + # Add new or change the below existing properties as required diff --git a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml index ac819d5e..f39bd348 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml @@ -18,6 +18,7 @@ spec: annotations: checksum/metrics-configmap: {{ include (print $.Template.BasePath "/metrics-configmap.yaml") . | sha256sum }} checksum/agent-configmap: {{ include (print $.Template.BasePath "/agent-configmap.yaml") . | sha256sum }} + checksum/env-configmap: {{ include (print $.Template.BasePath "/env-configmap.yaml") . | sha256sum }} labels: app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent spec: @@ -32,17 +33,9 @@ spec: containers: - name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent image: {{ .Values.mgmtagent.image.url }} - env: - - name: DAEMONSET_DEPLOYMENT - value: "{{ .Values.deployment.daemonSetDeployment }}" - - name: HELM_DEPLOYMENT - value: "true" - - name: INSTALL_NAMESPACE - value: {{ include "mgmt-agent.namespace" . }} - {{- if .Values.deployment.cleanupEpochTime }} - - name: POD_CLEANUP_ID - value: "{{ .Values.deployment.cleanupEpochTime }}" - {{- end }} + envFrom: + - configMapRef: + name: {{ include "mgmt-agent.resourceNamePrefix" . }}-env resources: requests: cpu: {{ .Values.deployment.resource.request.cpuCore }} @@ -58,6 +51,8 @@ spec: mountPath: /opt/oracle - name: mgmtagent-config mountPath: /opt/oracle/mgmtagent_config + - name: mgmtagent-env + mountPath: /opt/oracle/mgmtagent_env - name: mgmtagent-agent-config mountPath: /opt/oracle/mgmtagent_agent_config - mountPath: /tmp @@ -72,6 +67,9 @@ spec: - name: mgmtagent-config configMap: name: {{ include "mgmt-agent.resourceNamePrefix" . }}-metrics + - name: mgmtagent-env + configMap: + name: {{ include "mgmt-agent.resourceNamePrefix" . }}-env - name: mgmtagent-agent-config configMap: name: {{ include "mgmt-agent.resourceNamePrefix" . }}-agent diff --git a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml index 51fd4417..f7faa937 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml @@ -19,6 +19,7 @@ spec: annotations: checksum/metrics-configmap: {{ include (print $.Template.BasePath "/metrics-configmap.yaml") . | sha256sum }} checksum/agent-configmap: {{ include (print $.Template.BasePath "/agent-configmap.yaml") . | sha256sum }} + checksum/env-configmap: {{ include (print $.Template.BasePath "/env-configmap.yaml") . | sha256sum }} labels: app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent spec: @@ -33,17 +34,9 @@ spec: containers: - name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent image: {{ .Values.mgmtagent.image.url }} - env: - - name: DAEMONSET_DEPLOYMENT - value: "{{ .Values.deployment.daemonSetDeployment }}" - - name: HELM_DEPLOYMENT - value: "true" - - name: INSTALL_NAMESPACE - value: {{ include "mgmt-agent.namespace" . }} - {{- if .Values.deployment.cleanupEpochTime }} - - name: POD_CLEANUP_ID - value: "{{ .Values.deployment.cleanupEpochTime }}" - {{- end }} + envFrom: + - configMapRef: + name: {{ include "mgmt-agent.resourceNamePrefix" . }}-env resources: requests: cpu: {{ .Values.deployment.resource.request.cpuCore }} @@ -59,6 +52,8 @@ spec: mountPath: /opt/oracle - name: mgmtagent-config mountPath: /opt/oracle/mgmtagent_config + - name: mgmtagent-env + mountPath: /opt/oracle/mgmtagent_env - name: mgmtagent-agent-config mountPath: /opt/oracle/mgmtagent_agent_config - mountPath: /tmp @@ -73,6 +68,9 @@ spec: - name: mgmtagent-config configMap: name: {{ include "mgmt-agent.resourceNamePrefix" . }}-metrics + - name: mgmtagent-env + configMap: + name: {{ include "mgmt-agent.resourceNamePrefix" . }}-env - name: mgmtagent-agent-config configMap: name: {{ include "mgmt-agent.resourceNamePrefix" . }}-agent From c3200200d1e52fa646dae0232c84b3b36f90df71 Mon Sep 17 00:00:00 2001 From: prasebha Date: Mon, 15 Apr 2024 08:47:48 +0530 Subject: [PATCH 18/25] resolve review comments --- charts/mgmt-agent/README.md | 4 ++-- charts/mgmt-agent/values.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/mgmt-agent/README.md b/charts/mgmt-agent/README.md index 397e324b..c9ea15c5 100644 --- a/charts/mgmt-agent/README.md +++ b/charts/mgmt-agent/README.md @@ -39,9 +39,9 @@ A Helm chart for collecting Kubernetes Metrics using OCI Management Agent into O | deployment.security.runAsUser | integer | `1000` | Processes in the Container will use the specified user ID | | deployment.security.runAsGroup | integer | `2000` | Processes in the Container will use the specified group ID | | deployment.security.fsGroup | integer | `2000` | Files created in the Container will use the specified group ID | -| deployment.cleanupEpochTime | integer | `nil` | Please provide the current epoch time in seconds (date +%s) to clean up the agent installation directory from previous deployment | +| deployment.cleanupEpochTime | integer | `nil` | Please provide the current epoch time in seconds (Eg: Executing the following command in a bash shell will provide the epoch time: "date +%s") to clean up the agent installation directory from previous deployment | | deployment.daemonSetDeployment | bool | `false` | Setting the daemonset deployment to true, will deploy the Management Agents as a daemonset in addition to deploying the Management Agent as a statefulset. This is done to to distribute the node metrics collection to agents running on the node | -| deployment.daemonSet.hostPath | string | `nil` | The host path to store data, if Agent is deployed as DaemonSet. Agent should have read-write access to it | +| deployment.daemonSet.hostPath | string | `nil` | The host path to store data, if Agent is deployed as DaemonSet. Management Agent Pod should have read-write access to it | | deployment.resource.request.cpuCore | string | `200m` | Minimum CPU cores(millicore) for each agent instance | | deployment.resource.request.memory | string | `500Mi` | Minimum memory(mebibytes) for each agent instance | | deployment.resource.request.storage | string | `2Gi` | Minimum storage(gibibyte) for StatefulSet's PVC | diff --git a/charts/mgmt-agent/values.yaml b/charts/mgmt-agent/values.yaml index 368fcfcc..c3f4aae1 100644 --- a/charts/mgmt-agent/values.yaml +++ b/charts/mgmt-agent/values.yaml @@ -70,14 +70,14 @@ deployment: # Files created in the Container will use group ID 2000, replace it with a different value if desired fsGroup: 2000 - # Please provide the current epoch time in seconds (date +%s) to clean up the agent installation directory from previous deployment + # Please provide the current epoch time in seconds (Eg: Executing the following command in a bash shell will provide the epoch time: "date +%s") to clean up the agent installation directory from previous deployment cleanupEpochTime: # Setting the daemonset deployment to true, will deploy the Management Agents as a daemonset in addition to deploying the Management Agent as a statefulset. This is done to to distribute the node metrics collection to agents running on the node daemonSetDeployment: false daemonSet: - # Provide the host path if Agent is deployed as DaemonSet. Agent should have read-write access to it. + # Provide the host path if Agent is deployed as DaemonSet. Management Agent Pod should have read-write access to it. hostPath: # Provide the agent resources as per Kubernetes resource quantity From 38f5d5e9fef6e624defd433f254884538d9c7102 Mon Sep 17 00:00:00 2001 From: prasebha Date: Mon, 22 Apr 2024 16:06:06 +0530 Subject: [PATCH 19/25] skip imagePullSecret if not created --- charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml | 2 ++ charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml index f39bd348..eca14e81 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-daemonset.yaml @@ -27,8 +27,10 @@ spec: runAsGroup: {{ default 0 .Values.deployment.security.runAsGroup }} fsGroup: {{ default 0 .Values.deployment.security.fsGroup }} serviceAccountName: {{ include "mgmt-agent.serviceAccount" . }} + {{- if .Values.mgmtagent.image.secret }} imagePullSecrets: - name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent-container-registry-key + {{- end }} restartPolicy: Always containers: - name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent diff --git a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml index f7faa937..e9c25ccd 100644 --- a/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml +++ b/charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml @@ -28,8 +28,10 @@ spec: runAsGroup: {{ default 0 .Values.deployment.security.runAsGroup }} fsGroup: {{ default 0 .Values.deployment.security.fsGroup }} serviceAccountName: {{ include "mgmt-agent.serviceAccount" . }} + {{- if .Values.mgmtagent.image.secret }} imagePullSecrets: - name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent-container-registry-key + {{- end }} restartPolicy: Always containers: - name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent From 60f1da8e350144e587283cf6f35bb287a0c73c00 Mon Sep 17 00:00:00 2001 From: prasebha Date: Mon, 22 Apr 2024 20:28:10 +0530 Subject: [PATCH 20/25] upgrade chart version and changelog --- CHANGELOG.md | 4 ++++ charts/oci-onm/Chart.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d4848e7..7b7f44c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 2024-04-22 +### Added +- Support for Management Agent Daemonset deployment + ## 2024-03-08 ### Added - Support for AWS EKS system and control plane logs collection. diff --git a/charts/oci-onm/Chart.yaml b/charts/oci-onm/Chart.yaml index 92536c74..0530999e 100644 --- a/charts/oci-onm/Chart.yaml +++ b/charts/oci-onm/Chart.yaml @@ -18,7 +18,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 3.4.0 +version: 3.4.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to From 0da1480c8e4817a9a1ab3bddd9e0a433b43e1302 Mon Sep 17 00:00:00 2001 From: prasebha Date: Tue, 23 Apr 2024 07:49:05 +0530 Subject: [PATCH 21/25] update agent image --- charts/oci-onm/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/oci-onm/values.yaml b/charts/oci-onm/values.yaml index 70415ef9..5f455a18 100644 --- a/charts/oci-onm/values.yaml +++ b/charts/oci-onm/values.yaml @@ -52,6 +52,6 @@ oci-onm-mgmt-agent: # Follow steps documented at https://github.com/oracle/docker-images/tree/main/OracleManagementAgent to build docker image. image: # Replace this value with actual docker image URL for Management Agent - url: container-registry.oracle.com/oci_observability_management/oci-management-agent:1.2.0 + url: container-registry.oracle.com/oci_observability_management/oci-management-agent:1.3.0 # Image secrets to use for pulling container image (base64 encoded content of ~/.docker/config.json file) secret: From 92871b436c581200d06fb1d97d76e00e10190120 Mon Sep 17 00:00:00 2001 From: prasebha Date: Tue, 23 Apr 2024 07:50:55 +0530 Subject: [PATCH 22/25] update readme --- charts/oci-onm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/oci-onm/README.md b/charts/oci-onm/README.md index 276fd723..e3506c47 100644 --- a/charts/oci-onm/README.md +++ b/charts/oci-onm/README.md @@ -35,7 +35,7 @@ Helm chart for collecting Kubernetes logs & objects and metrics using Fluentd an | oci-onm-logan.serviceAccount | string | `"{{ .Values.global.resourceNamePrefix }}"` | | | oci-onm-mgmt-agent.kubernetesCluster.name | string | `"{{ .Values.global.kubernetesClusterName }}"` | | | oci-onm-mgmt-agent.mgmtagent.image.secret | string | `nil` | | -| oci-onm-mgmt-agent.mgmtagent.image.url | string | `"container-registry.oracle.com/oci_observability_management/oci-management-agent:1.2.0"` | | +| oci-onm-mgmt-agent.mgmtagent.image.url | string | `"container-registry.oracle.com/oci_observability_management/oci-management-agent:1.3.0"` | | | oci-onm-mgmt-agent.mgmtagent.installKey | string | `"resources/input.rsp"` | Copy the downloaded Management Agent Install Key file under root helm directory as resources/input.rsp . Provide either installKeyFileContent or installKey as an install key | | oci-onm-mgmt-agent.mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file. Provide either installKeyFileContent or installKey as an install key | | oci-onm-mgmt-agent.namespace | string | `"{{ .Values.global.namespace }}"` | | From dccc69ee17a0fafa33acec6e45245c3e0a7a4cf6 Mon Sep 17 00:00:00 2001 From: prasebha Date: Wed, 24 Apr 2024 19:47:04 +0530 Subject: [PATCH 23/25] add doc for input.rsp --- charts/mgmt-agent/README.md | 2 +- charts/mgmt-agent/values.yaml | 2 +- charts/oci-onm/README.md | 2 +- charts/oci-onm/values.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/mgmt-agent/README.md b/charts/mgmt-agent/README.md index c9ea15c5..764a0598 100644 --- a/charts/mgmt-agent/README.md +++ b/charts/mgmt-agent/README.md @@ -28,7 +28,7 @@ A Helm chart for collecting Kubernetes Metrics using OCI Management Agent into O | mgmtagent.image.secret | string | `nil` | Image secrets to use for pulling container image (base64 encoded content of ~/.docker/config.json file) | | mgmtagent.image.url | string | `nil` | Replace this value with actual docker image URL for Management Agent | | mgmtagent.installKey | string | `"resources/input.rsp"` | Copy the downloaded Management Agent Install Key file under root helm directory as resources/input.rsp | -| mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file | +| mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file (e.g. `cat input.rsp | base64 -w 0`) | | namespace | string | `"{{ .Values.global.namespace }}"` | Kubernetes namespace to create and install this helm chart in | | oci-onm-common.createNamespace | bool | `true` | If createNamespace is set to true, it tries to create the namespace defined in 'namespace' variable. | | oci-onm-common.createServiceAccount | bool | `true` | By default, a cluster role, cluster role binding and serviceaccount will be created for the monitoring pods to be able to (readonly) access various objects within the cluster, to support collection of various telemetry data. You may set this to false and provide your own serviceaccount (in the parent chart(s)) which has the necessary cluster role(s) binded to it. Refer, README for the cluster role definition and other details. | diff --git a/charts/mgmt-agent/values.yaml b/charts/mgmt-agent/values.yaml index c3f4aae1..45950e21 100644 --- a/charts/mgmt-agent/values.yaml +++ b/charts/mgmt-agent/values.yaml @@ -22,7 +22,7 @@ oci-onm-common: mgmtagent: # Provide either installKeyFileContent or installKey as an install key. If both provided then installKeyFileContent will take higher precedence. - # -- Provide the base64 encoded content of the Management Agent Install Key file + # -- Provide the base64 encoded content of the Management Agent Install Key file (e.g. `cat input.rsp | base64 -w 0`) installKeyFileContent: # -- Copy the downloaded Management Agent Install Key file under root helm directory as resources/input.rsp installKey: resources/input.rsp diff --git a/charts/oci-onm/README.md b/charts/oci-onm/README.md index e3506c47..e0610b14 100644 --- a/charts/oci-onm/README.md +++ b/charts/oci-onm/README.md @@ -37,7 +37,7 @@ Helm chart for collecting Kubernetes logs & objects and metrics using Fluentd an | oci-onm-mgmt-agent.mgmtagent.image.secret | string | `nil` | | | oci-onm-mgmt-agent.mgmtagent.image.url | string | `"container-registry.oracle.com/oci_observability_management/oci-management-agent:1.3.0"` | | | oci-onm-mgmt-agent.mgmtagent.installKey | string | `"resources/input.rsp"` | Copy the downloaded Management Agent Install Key file under root helm directory as resources/input.rsp . Provide either installKeyFileContent or installKey as an install key | -| oci-onm-mgmt-agent.mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file. Provide either installKeyFileContent or installKey as an install key | +| oci-onm-mgmt-agent.mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file (e.g. `cat input.rsp | base64 -w 0`). Provide either installKeyFileContent or installKey as an install key | | oci-onm-mgmt-agent.namespace | string | `"{{ .Values.global.namespace }}"` | | | oci-onm-mgmt-agent.oci-onm-common.enabled | bool | `false` | | | oci-onm-mgmt-agent.serviceAccount | string | `"{{ .Values.global.resourceNamePrefix }}"` | | diff --git a/charts/oci-onm/values.yaml b/charts/oci-onm/values.yaml index 5f455a18..23a963bc 100644 --- a/charts/oci-onm/values.yaml +++ b/charts/oci-onm/values.yaml @@ -47,7 +47,7 @@ oci-onm-mgmt-agent: kubernetesCluster: name: "{{ .Values.global.kubernetesClusterName }}" mgmtagent: - # Provide the base64 encoded content of the Management Agent Install Key file + # Provide the base64 encoded content of the Management Agent Install Key file (e.g. `cat input.rsp | base64 -w 0`) installKeyFileContent: # Follow steps documented at https://github.com/oracle/docker-images/tree/main/OracleManagementAgent to build docker image. image: From 28421cbf6cb056778307854de9fd992d71599087 Mon Sep 17 00:00:00 2001 From: prasebha Date: Wed, 24 Apr 2024 19:51:18 +0530 Subject: [PATCH 24/25] add doc for input.rsp --- charts/mgmt-agent/README.md | 2 +- charts/mgmt-agent/values.yaml | 2 +- charts/oci-onm/README.md | 2 +- charts/oci-onm/values.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/mgmt-agent/README.md b/charts/mgmt-agent/README.md index 764a0598..da69f2e5 100644 --- a/charts/mgmt-agent/README.md +++ b/charts/mgmt-agent/README.md @@ -28,7 +28,7 @@ A Helm chart for collecting Kubernetes Metrics using OCI Management Agent into O | mgmtagent.image.secret | string | `nil` | Image secrets to use for pulling container image (base64 encoded content of ~/.docker/config.json file) | | mgmtagent.image.url | string | `nil` | Replace this value with actual docker image URL for Management Agent | | mgmtagent.installKey | string | `"resources/input.rsp"` | Copy the downloaded Management Agent Install Key file under root helm directory as resources/input.rsp | -| mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file (e.g. `cat input.rsp | base64 -w 0`) | +| mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file (e.g. cat input.rsp | base64 -w 0) | | namespace | string | `"{{ .Values.global.namespace }}"` | Kubernetes namespace to create and install this helm chart in | | oci-onm-common.createNamespace | bool | `true` | If createNamespace is set to true, it tries to create the namespace defined in 'namespace' variable. | | oci-onm-common.createServiceAccount | bool | `true` | By default, a cluster role, cluster role binding and serviceaccount will be created for the monitoring pods to be able to (readonly) access various objects within the cluster, to support collection of various telemetry data. You may set this to false and provide your own serviceaccount (in the parent chart(s)) which has the necessary cluster role(s) binded to it. Refer, README for the cluster role definition and other details. | diff --git a/charts/mgmt-agent/values.yaml b/charts/mgmt-agent/values.yaml index 45950e21..785b022d 100644 --- a/charts/mgmt-agent/values.yaml +++ b/charts/mgmt-agent/values.yaml @@ -22,7 +22,7 @@ oci-onm-common: mgmtagent: # Provide either installKeyFileContent or installKey as an install key. If both provided then installKeyFileContent will take higher precedence. - # -- Provide the base64 encoded content of the Management Agent Install Key file (e.g. `cat input.rsp | base64 -w 0`) + # -- Provide the base64 encoded content of the Management Agent Install Key file (e.g. cat input.rsp | base64 -w 0) installKeyFileContent: # -- Copy the downloaded Management Agent Install Key file under root helm directory as resources/input.rsp installKey: resources/input.rsp diff --git a/charts/oci-onm/README.md b/charts/oci-onm/README.md index e0610b14..fe5bda80 100644 --- a/charts/oci-onm/README.md +++ b/charts/oci-onm/README.md @@ -37,7 +37,7 @@ Helm chart for collecting Kubernetes logs & objects and metrics using Fluentd an | oci-onm-mgmt-agent.mgmtagent.image.secret | string | `nil` | | | oci-onm-mgmt-agent.mgmtagent.image.url | string | `"container-registry.oracle.com/oci_observability_management/oci-management-agent:1.3.0"` | | | oci-onm-mgmt-agent.mgmtagent.installKey | string | `"resources/input.rsp"` | Copy the downloaded Management Agent Install Key file under root helm directory as resources/input.rsp . Provide either installKeyFileContent or installKey as an install key | -| oci-onm-mgmt-agent.mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file (e.g. `cat input.rsp | base64 -w 0`). Provide either installKeyFileContent or installKey as an install key | +| oci-onm-mgmt-agent.mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file (e.g. cat input.rsp | base64 -w 0). Provide either installKeyFileContent or installKey as an install key | | oci-onm-mgmt-agent.namespace | string | `"{{ .Values.global.namespace }}"` | | | oci-onm-mgmt-agent.oci-onm-common.enabled | bool | `false` | | | oci-onm-mgmt-agent.serviceAccount | string | `"{{ .Values.global.resourceNamePrefix }}"` | | diff --git a/charts/oci-onm/values.yaml b/charts/oci-onm/values.yaml index 23a963bc..5fa0d0c1 100644 --- a/charts/oci-onm/values.yaml +++ b/charts/oci-onm/values.yaml @@ -47,7 +47,7 @@ oci-onm-mgmt-agent: kubernetesCluster: name: "{{ .Values.global.kubernetesClusterName }}" mgmtagent: - # Provide the base64 encoded content of the Management Agent Install Key file (e.g. `cat input.rsp | base64 -w 0`) + # Provide the base64 encoded content of the Management Agent Install Key file (e.g. cat input.rsp | base64 -w 0) installKeyFileContent: # Follow steps documented at https://github.com/oracle/docker-images/tree/main/OracleManagementAgent to build docker image. image: From 0dfc95093b0241349fe7dd05c12fc53b6d9d9e76 Mon Sep 17 00:00:00 2001 From: prasebha Date: Wed, 24 Apr 2024 19:58:37 +0530 Subject: [PATCH 25/25] add doc for input.rsp --- charts/mgmt-agent/README.md | 2 +- charts/oci-onm/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/mgmt-agent/README.md b/charts/mgmt-agent/README.md index da69f2e5..b6c8d637 100644 --- a/charts/mgmt-agent/README.md +++ b/charts/mgmt-agent/README.md @@ -28,7 +28,7 @@ A Helm chart for collecting Kubernetes Metrics using OCI Management Agent into O | mgmtagent.image.secret | string | `nil` | Image secrets to use for pulling container image (base64 encoded content of ~/.docker/config.json file) | | mgmtagent.image.url | string | `nil` | Replace this value with actual docker image URL for Management Agent | | mgmtagent.installKey | string | `"resources/input.rsp"` | Copy the downloaded Management Agent Install Key file under root helm directory as resources/input.rsp | -| mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file (e.g. cat input.rsp | base64 -w 0) | +| mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file (e.g. `cat input.rsp \| base64 -w 0`) | | namespace | string | `"{{ .Values.global.namespace }}"` | Kubernetes namespace to create and install this helm chart in | | oci-onm-common.createNamespace | bool | `true` | If createNamespace is set to true, it tries to create the namespace defined in 'namespace' variable. | | oci-onm-common.createServiceAccount | bool | `true` | By default, a cluster role, cluster role binding and serviceaccount will be created for the monitoring pods to be able to (readonly) access various objects within the cluster, to support collection of various telemetry data. You may set this to false and provide your own serviceaccount (in the parent chart(s)) which has the necessary cluster role(s) binded to it. Refer, README for the cluster role definition and other details. | diff --git a/charts/oci-onm/README.md b/charts/oci-onm/README.md index fe5bda80..bb844564 100644 --- a/charts/oci-onm/README.md +++ b/charts/oci-onm/README.md @@ -37,7 +37,7 @@ Helm chart for collecting Kubernetes logs & objects and metrics using Fluentd an | oci-onm-mgmt-agent.mgmtagent.image.secret | string | `nil` | | | oci-onm-mgmt-agent.mgmtagent.image.url | string | `"container-registry.oracle.com/oci_observability_management/oci-management-agent:1.3.0"` | | | oci-onm-mgmt-agent.mgmtagent.installKey | string | `"resources/input.rsp"` | Copy the downloaded Management Agent Install Key file under root helm directory as resources/input.rsp . Provide either installKeyFileContent or installKey as an install key | -| oci-onm-mgmt-agent.mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file (e.g. cat input.rsp | base64 -w 0). Provide either installKeyFileContent or installKey as an install key | +| oci-onm-mgmt-agent.mgmtagent.installKeyFileContent | string | `nil` | Provide the base64 encoded content of the Management Agent Install Key file (e.g. `cat input.rsp \| base64 -w 0`). Provide either installKeyFileContent or installKey as an install key | | oci-onm-mgmt-agent.namespace | string | `"{{ .Values.global.namespace }}"` | | | oci-onm-mgmt-agent.oci-onm-common.enabled | bool | `false` | | | oci-onm-mgmt-agent.serviceAccount | string | `"{{ .Values.global.resourceNamePrefix }}"` | |