Skip to content

Commit

Permalink
Helm chart container image related parameters modified.
Browse files Browse the repository at this point in the history
* image url
* image pull secret
* image pull policy
  • Loading branch information
europ committed Nov 2, 2023
1 parent 40fa981 commit 11e6f23
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 42 deletions.
6 changes: 3 additions & 3 deletions charts/logan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ Charts for sending Kubernetes platform logs, compute logs, and Kubernetes Object
| fluentd.tailPlugin | object | `{"flushInterval":60,"readFromHead":true}` | Config for Logs Collection using fluentd tail plugin |
| global.namespace | string | `"oci-onm"` | Kubernetes Namespace for creating monitoring resources. Ignored if oci-kubernetes-monitoring-common.createNamespace set to false. |
| global.resourceNamePrefix | string | `"oci-onm"` | Resource names prefix used, where allowed. |
| image.imagePullPolicy | string | `"Always"` | Image pull policy |
| image.imagePullSecrets | string | `nil` | |
| image.url | string | `"container-registry.oracle.com/oci_observability_management/oci-la-fluentd-collector:1.0.0"` | Replace this value with actual docker image url |
| image.imagePullPolicy | string | `"Always"` | Container image pull policy. |
| image.imagePullSecret | string | `nil` | Image pull secret name to use for pulling container image |
| image.imageUrl | string | `"container-registry.oracle.com/oci_observability_management/oci-la-fluentd-collector:1.0.0"` | Replace this value with actual docker image url |
| kubernetesClusterID | string | `nil` | OKE Cluster OCID e.g. ocid1.cluster.oc1.phx.aaaaaaaahhbadf3rxa62faaeixanvr7vftmkg6hupycbf4qszctf2wbmqqxq |
| kubernetesClusterName | string | `nil` | Kubernetes Cluster name. Need not be the OKE Cluster display name. e.g. production-cluster |
| namespace | string | `"{{ .Values.global.namespace }}"` | Kubernetes Namespace for deploying monitoring resources deployed by this chart. |
Expand Down
6 changes: 3 additions & 3 deletions charts/logan/templates/fluentd-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ spec:
effect: NoSchedule
{{- if $imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.image.imagePullSecrets }}
- name: {{ .Values.image.imagePullSecret }}
{{- end}}
containers:
- name: {{ $resourceNamePrefix }}-fluentd
image: {{ .Values.image.url }}
imagePullPolicy: {{ default "IfNotPresent" .Values.image.imagePullPolicy }}
image: {{ .Values.image.imageUrl }}
imagePullPolicy: {{ .Values.image.imagePullPolicy }}
env:
- name: FLUENTD_CONF
value: {{ .Values.fluentd.path }}/{{ .Values.fluentd.file }}
Expand Down
6 changes: 3 additions & 3 deletions charts/logan/templates/fluentd-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ spec:
serviceAccountName: {{ include "logan.serviceAccount" . }}
{{- if $imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.image.imagePullSecrets }}
- name: {{ .Values.image.imagePullSecret }}
{{- end}}
containers:
- name: {{ $resourceNamePrefix }}-fluentd
image: {{ .Values.image.url }}
imagePullPolicy: {{ default "IfNotPresent" .Values.image.imagePullPolicy }}
image: {{ .Values.image.imageUrl }}
imagePullPolicy: {{ .Values.image.imagePullPolicy }}
env:
- name: FLUENTD_CONF
value: {{ .Values.fluentd.path }}/{{ .Values.fluentd.file }}
Expand Down
8 changes: 4 additions & 4 deletions charts/logan/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ resourceNamePrefix: "{{ .Values.global.resourceNamePrefix }}"
# -- Kubernetes ServiceAccount
serviceAccount: "{{ .Values.global.resourceNamePrefix }}"
image:
# Image pull secrets for. Secret must be in the namespace defined by namespace
imagePullSecrets:
# -- Replace this value with actual docker image url
url: container-registry.oracle.com/oci_observability_management/oci-la-fluentd-collector:1.0.0
imageUrl: container-registry.oracle.com/oci_observability_management/oci-la-fluentd-collector:1.0.0
# Image pull secrets for. Secret must be in the namespace defined by namespace
imagePullSecret: ""
# -- Image pull policy
imagePullPolicy: Always
imagePullPolicy: IfNotPresent

# -- Logging Analytics namespace. Can be found in OCI console --> Logging Analytics --> Administration --> Service
ociLANamespace:
Expand Down
5 changes: 3 additions & 2 deletions charts/mgmt-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ 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 |
| 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.image.imageUrl | string | `"container-registry.oracle.com/oci_observability_management/oci-management-agent:1.0.0"` | Replace this value with actual docker image URL for Management Agent |
| mgmtagent.image.imagePullPolicy | string | `IfNotPresent` | Container image pull policy. |
| mgmtagent.image.imagePullSecret | string | `""` | Image pull secret name to use for pulling container image |
| 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 |
| namespace | string | `"{{ .Values.global.namespace }}"` | Kubernetes namespace to create and install this helm chart in |
Expand Down
14 changes: 0 additions & 14 deletions charts/mgmt-agent/templates/mgmt-agent-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,3 @@ data:
{{ else }}
{{ .Files.Get .Values.mgmtagent.installKey | b64enc }}
{{- end }}
---
{{- if .Values.mgmtagent.image.secret }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent-container-registry-key
namespace: {{ include "mgmt-agent.namespace" . }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: |
{{ .Values.mgmtagent.image.secret }}
{{- end }}
5 changes: 3 additions & 2 deletions charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ spec:
fsGroup: {{ default 0 .Values.deployment.security.fsGroup }}
serviceAccountName: {{ include "mgmt-agent.serviceAccount" . }}
imagePullSecrets:
- name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent-container-registry-key
- name: {{ .Values.mgmtagent.image.imagePullSecret }}
restartPolicy: Always
containers:
- name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent
image: {{ .Values.mgmtagent.image.url }}
imagePullPolicy: {{ .Values.mgmtagent.image.imagePullPolicy }}
image: {{ .Values.mgmtagent.image.imageUrl }}
resources:
requests:
cpu: {{ .Values.deployment.resource.request.cpuCore }}
Expand Down
7 changes: 4 additions & 3 deletions charts/mgmt-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ mgmtagent:
# 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:
imageUrl: container-registry.oracle.com/oci_observability_management/oci-management-agent:1.0.0
# -- Image secrets to use for pulling container image (base64 encoded content of ~/.docker/config.json file)
secret:
imagePullSecret: ""
imagePullPolicy: IfNotPresent

# -- Kubernetes namespace to create and install this helm chart in
namespace: "{{ .Values.global.namespace }}"
Expand Down Expand Up @@ -76,6 +77,6 @@ deployment:
cpuCore: 500m
# specify the memory
memory: 1Gi

# Provide the storage class for StatefulSet's PVC. If not provided then the Cluster's default storage class will be used.
storageClass:
6 changes: 3 additions & 3 deletions charts/oci-onm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Helm chart for collecting Kubernetes logs & objects and metrics using Fluentd an
| oci-onm-common.namespace | string | `"{{ .Values.global.namespace }}"` | Kubernetes Namespace in which the serviceaccount to be created. |
| 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 |
| oci-onm-logan.image.url | string | `"container-registry.oracle.com/oci_observability_management/oci-la-fluentd-collector:1.0.0"` | |
| oci-onm-logan.image.imageUrl | string | `"container-registry.oracle.com/oci_observability_management/oci-la-fluentd-collector:1.0.0"` | |
| oci-onm-logan.kubernetesClusterID | string | `"{{ .Values.global.kubernetesClusterID }}"` | |
| oci-onm-logan.kubernetesClusterName | string | `"{{ .Values.global.kubernetesClusterName }}"` | |
| oci-onm-logan.namespace | string | `"{{ .Values.global.namespace }}"` | |
Expand All @@ -34,8 +34,8 @@ Helm chart for collecting Kubernetes logs & objects and metrics using Fluentd an
| oci-onm-logan.ociLANamespace | string | `nil` | |
| 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.image.imagePullSecret | string | `nil` | |
| oci-onm-mgmt-agent.mgmtagent.image.imageUrl | string | `nil` | |
| oci-onm-mgmt-agent.mgmtagent.installKey | string | `"resources/input.rsp"` | |
| oci-onm-mgmt-agent.mgmtagent.installKeyFileContent | string | `nil` | |
| oci-onm-mgmt-agent.namespace | string | `"{{ .Values.global.namespace }}"` | |
Expand Down
9 changes: 6 additions & 3 deletions charts/oci-onm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ oci-onm-logan:
kubernetesClusterID: "{{ .Values.global.kubernetesClusterID }}"
kubernetesClusterName: "{{ .Values.global.kubernetesClusterName }}"
image:
url: container-registry.oracle.com/oci_observability_management/oci-la-fluentd-collector:1.0.0
imageUrl: container-registry.oracle.com/oci_observability_management/oci-la-fluentd-collector:1.0.0
imagePullSecret:
imagePullPolicy: IfNotPresent
# Go to OCI Logging Analytics Administration, click Service Details, and note the namespace value.
ociLANamespace:
# OCI Logging Analytics Default Log Group OCID
Expand All @@ -50,6 +52,7 @@ 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.0.0
imageUrl: container-registry.oracle.com/oci_observability_management/oci-management-agent:1.0.0
# Image secrets to use for pulling container image (base64 encoded content of ~/.docker/config.json file)
secret:
imagePullSecret:
imagePullPolicy: IfNotPresent
4 changes: 2 additions & 2 deletions terraform/modules/helm/helm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ locals {
# oci-onm-logan
"oci-onm-logan.ociLANamespace" = var.oci_la_namespace
"oci-onm-logan.ociLALogGroupID" = var.oci_la_logGroup_id
"oci-onm-logan.image.url" = var.logan_container_image_url
"oci-onm-logan.image.imageUrl" = var.logan_container_image_url
"oci-onm-logan.fluentd.baseDir" = var.fluentd_baseDir_path

#oci-onm-mgmt-agent
"oci-onm-mgmt-agent.mgmtagent.installKeyFileContent" = var.mgmt_agent_install_key_content
"oci-onm-mgmt-agent.mgmtagent.image.url" = var.mgmt_agent_container_image_url
"oci-onm-mgmt-agent.mgmtagent.image.imageUrl" = var.mgmt_agent_container_image_url
"oci-onm-mgmt-agent.deployMetricServer" = var.opt_deploy_metric_server
}

Expand Down

0 comments on commit 11e6f23

Please sign in to comment.