-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* EKS control plane logs collection configuration --------- Co-authored-by: paliwalparitosh <[email protected]>
- Loading branch information
1 parent
6321522
commit 95f21d4
Showing
13 changed files
with
900 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# 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 .Values.enableEKSControlPlaneLogs }} | ||
{{- $authtype := .Values.authtype | lower }} | ||
{{- $imagePullSecrets := .Values.image.imagePullSecrets }} | ||
{{- $resourceNamePrefix := (include "logan.resourceNamePrefix" .) }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ $resourceNamePrefix }}-logan | ||
namespace: {{ include "logan.namespace" . }} | ||
labels: | ||
app: {{ $resourceNamePrefix }}-logan | ||
version: v1 | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{ $resourceNamePrefix }}-logan | ||
version: v1 | ||
template: | ||
metadata: | ||
annotations: | ||
{{- if eq $authtype "config" }} | ||
checksum/secrets: {{ include (print $.Template.BasePath "/oci-config-secret.yaml") . | sha256sum }} | ||
{{- end}} | ||
checksum/ekscpconfigmap: {{ include (print $.Template.BasePath "/ekscp-logs-configmap.yaml") . | sha256sum }} | ||
labels: | ||
app: {{ $resourceNamePrefix }}-logan | ||
version: v1 | ||
spec: | ||
serviceAccountName: {{ include "logan.serviceAccount" . }} | ||
{{- if $imagePullSecrets }} | ||
imagePullSecrets: | ||
- name: {{ .Values.image.imagePullSecrets }} | ||
{{- end}} | ||
containers: | ||
- name: {{ $resourceNamePrefix }}-ekscp-fluentd | ||
image: {{ .Values.image.url }} | ||
imagePullPolicy: {{ default "IfNotPresent" .Values.image.imagePullPolicy }} | ||
env: | ||
- name: FLUENTD_CONF | ||
value: {{ .Values.fluentd.path }}/{{ .Values.fluentd.file }} | ||
- name: K8S_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: FLUENT_OCI_DEFAULT_LOGGROUP_ID | ||
value: {{ .Values.ociLALogGroupID }} | ||
- name: FLUENT_OCI_NAMESPACE | ||
value: {{ .Values.ociLANamespace }} | ||
- name: FLUENT_OCI_KUBERNETES_CLUSTER_ID | ||
value: {{ include "logan.kubernetesClusterId" . }} | ||
- name: FLUENT_OCI_KUBERNETES_CLUSTER_NAME | ||
value: {{ include "logan.kubernetesClusterName" . }} | ||
{{- if eq $authtype "config" }} | ||
- name: FLUENT_OCI_CONFIG_LOCATION | ||
value: {{ .Values.oci.path }}/{{ .Values.oci.file }} | ||
{{- end }} | ||
{{- if .Values.extraEnv }} | ||
{{- toYaml .Values.extraEnv | nindent 10 }} | ||
{{- end }} | ||
{{- if .Values.resources }} | ||
resources: {{- toYaml .Values.resources | nindent 10 }} | ||
{{- end }} | ||
volumeMounts: | ||
# RW mount to store tail plugin output plugin buffer and logs | ||
- name: basedir | ||
mountPath: {{ .Values.fluentd.baseDir }} | ||
{{- if eq $authtype "config" }} | ||
# Mount directory where oci config exists | ||
- name: ociconfigdir | ||
mountPath: {{ .Values.oci.path }} | ||
readOnly: true | ||
{{- end }} | ||
# Mount directory where fluentd config exists | ||
- name: ekscpfluentdconfigdir | ||
mountPath: {{ .Values.fluentd.path }} | ||
readOnly: true | ||
{{- if .Values.extraVolumeMounts }} | ||
{{- toYaml .Values.extraVolumeMounts | nindent 8 }} | ||
{{- end }} | ||
terminationGracePeriodSeconds: 30 | ||
volumes: | ||
{{- if .Values.extraVolumes }} | ||
{{- toYaml .Values.extraVolumes | nindent 6 }} | ||
{{- end }} | ||
# RW mount to store tail plugin output plugin buffer and logs | ||
- name: basedir | ||
hostPath: | ||
path: {{ .Values.fluentd.baseDir }} | ||
{{- if eq $authtype "config" }} | ||
# Mount directory where oci config exists | ||
- name: ociconfigdir | ||
projected: | ||
sources: | ||
- secret: | ||
name: {{ $resourceNamePrefix }}-oci-config | ||
{{- end }} | ||
# Mount directory where fluentd ekscp config exists | ||
- name: ekscpfluentdconfigdir | ||
configMap: | ||
# Provide the name of the ConfigMap to mount. | ||
name: {{ $resourceNamePrefix }}-ekscp-logs | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.