Skip to content

Commit

Permalink
Enable adding annotations of PVCs (minio#1897)
Browse files Browse the repository at this point in the history
Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
  • Loading branch information
shtripat authored Dec 5, 2023
1 parent 4b6bd3d commit 3067975
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/tenant-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,7 @@ func parseTenantPool(pool *miniov2.Pool) *models.Pool {
VolumeConfiguration: &models.PoolVolumeConfiguration{
Size: size,
StorageClassName: storageClassName,
Annotations: pool.VolumeClaimTemplate.ObjectMeta.Annotations,
},
NodeSelector: pool.NodeSelector,
Resources: resources,
Expand Down
3 changes: 3 additions & 0 deletions helm/tenant/templates/tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ spec:
volumeClaimTemplate:
metadata:
name: data
{{- with (dig "storageAnnotations" (dict) .) }}
annotations: {{- toYaml . | nindent 12 }}
{{- end }}
spec:
storageClassName: {{ dig "storageClassName" "" . }}
accessModes:
Expand Down
3 changes: 3 additions & 0 deletions helm/tenant/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ tenant:
# Docs: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/master/docs/parameters.md
storageClassName: standard
###
# Specify `storageAnnotations <https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/>`__ to associate to PVCs.
storageAnnotations: { }
###
# Specify `annotations <https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/>`__ to associate to Tenant pods.
annotations: { }
###
Expand Down

0 comments on commit 3067975

Please sign in to comment.