-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass namespace annotations to driver when --extra-create-metadata is enabled #714
Comments
cc: @xing-yang |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
I fully support this request. Today you cannot specify metadata and, in particular, tags in a PVC that are passed down to a CSI driver. Tagging resources is helpful in a multitenant environment for policy tracking and cost charging. Today, the only way to tag managed resources dynamically created by a PVC on a cloud platform is the following:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: contoso-managed-csi-premium
provisioner: disk.csi.azure.com
parameters:
skuname: Premium_LRS
tags: costcenter=1234,tenant=Contoso
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: contoso-managed-csi-premium
spec:
accessModes:
- ReadWriteOnce
storageClassName: contoso-managed-csi-premium
resources:
requests:
storage: 50Gi
In a multi-tenant environment, this approach can lead to two kinds of problems:
You can use a trick to avoid the proliferation of storage classes:
This solution is doable, but it's not very clean. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
@rdpsin imo, fetching namespace annotation shouldnt be in scope of provisioner sidecar. The API object, provisioner really care about is PVC and its bindings. this looks to be out of scope for the provisioner sidecar to fetch and pass namespace annotation as part of the createvolume request. |
we already supports providing following values in csi-provisioner, this time we want to provide more:
|
@andyzhangx looks like there is some confusion here , this issue description says "namespace" annotation to be passed with createVolume
and iiuc your comment here talks about PVC annotation #714 (comment) . Can you please clarify? |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Currently,
external-provisioner
passes the PVC name, PVC namespace and PV name to the CSI driver inCreateVolumeRequest.Parameters
, whenextra-create-metadata
is enabled.It would be useful to also pass namespace annotations to the CSI driver as well. This can be very helpful to cluster admins since a common design is to set boundaries/controls at the namespace level. For e.g., this can allow the CSI driver to attach namespace annotations as tags to the volume for cost allocation, backups, IAM policies, et cetera.
Design:
A new parameter is created:
csi.storage.k8s.io/pvc/namespace/annotations
where the value is a string of comma separated key-value pairs.Note that similar proposals have been put forward, but they include passing PVC annotations to the CSI driver (see #86).
The text was updated successfully, but these errors were encountered: