From 666773cb67399f6d1f5e10e4b23dbd7aa619bfd1 Mon Sep 17 00:00:00 2001 From: Amogh Date: Tue, 31 Jan 2023 23:46:18 +0530 Subject: [PATCH 1/3] Adding possibility for annotations in logs pvc --- chart/templates/logs-persistent-volume-claim.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chart/templates/logs-persistent-volume-claim.yaml b/chart/templates/logs-persistent-volume-claim.yaml index deeaa2ef97fab..1c5b9bd681a1b 100644 --- a/chart/templates/logs-persistent-volume-claim.yaml +++ b/chart/templates/logs-persistent-volume-claim.yaml @@ -29,6 +29,10 @@ metadata: {{- with .Values.labels }} {{- toYaml . | nindent 4 }} {{- end }} + annotations: + {{- if .Values.logs.persistence.annotations}} + {{- toYaml .Values.logs.persistence.annotations | nindent 4 }} + {{- end }} spec: accessModes: ["ReadWriteMany"] resources: From c6842c361f049ac2d8e939f629204dd0b33045d3 Mon Sep 17 00:00:00 2001 From: Amogh Date: Mon, 20 Feb 2023 08:41:21 +0530 Subject: [PATCH 2/3] Handling review comments --- chart/templates/logs-persistent-volume-claim.yaml | 6 +++--- chart/values.schema.json | 8 ++++++++ chart/values.yaml | 2 ++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/chart/templates/logs-persistent-volume-claim.yaml b/chart/templates/logs-persistent-volume-claim.yaml index 1c5b9bd681a1b..4c89c3db787b8 100644 --- a/chart/templates/logs-persistent-volume-claim.yaml +++ b/chart/templates/logs-persistent-volume-claim.yaml @@ -29,10 +29,10 @@ metadata: {{- with .Values.labels }} {{- toYaml . | nindent 4 }} {{- end }} +{{- with .Values.logs.persistence.annotations }} annotations: - {{- if .Values.logs.persistence.annotations}} - {{- toYaml .Values.logs.persistence.annotations | nindent 4 }} - {{- end }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: accessModes: ["ReadWriteMany"] resources: diff --git a/chart/values.schema.json b/chart/values.schema.json index 8bd29c0f6b7f9..d76f8dad95aa9 100644 --- a/chart/values.schema.json +++ b/chart/values.schema.json @@ -5531,6 +5531,14 @@ ], "default": null }, + "annotations": { + "description": "Annotations to add to logs PVC", + "type": "object", + "default": {}, + "additionalProperties": { + "type": "string" + } + }, "existingClaim": { "description": "The name of an existing PVC to use.", "type": [ diff --git a/chart/values.yaml b/chart/values.yaml index 339bcb844d902..d73e72a4de43f 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1899,6 +1899,8 @@ logs: enabled: false # Volume size for logs size: 100Gi + # Annotations for the logs PVC + annotations: {} # If using a custom storageClass, pass name here storageClassName: ## the name of an existing PVC to use From 33345cc7fb66131e1591f8b0a5615f418e6facbb Mon Sep 17 00:00:00 2001 From: Amogh Date: Mon, 20 Feb 2023 19:32:56 +0530 Subject: [PATCH 3/3] Handling review comments --- chart/templates/logs-persistent-volume-claim.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/logs-persistent-volume-claim.yaml b/chart/templates/logs-persistent-volume-claim.yaml index 4c89c3db787b8..07374c1fd57d2 100644 --- a/chart/templates/logs-persistent-volume-claim.yaml +++ b/chart/templates/logs-persistent-volume-claim.yaml @@ -29,7 +29,7 @@ metadata: {{- with .Values.labels }} {{- toYaml . | nindent 4 }} {{- end }} -{{- with .Values.logs.persistence.annotations }} + {{- with .Values.logs.persistence.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }}