mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-27 13:15:36 +00:00
Tag dynamically created GCE PD disks.
GCE disks don't have tags, we must encode the tags into Description field. It's encoded as JSON, which is both human and machine readable: description: '{"kubernetes.io/created-for/pv/name":"pv-gce-oxwts","kubernetes.io/created-for/pvc/name":"myclaim","kubernetes.io/created-for/pvc/namespace":"default"}'
This commit is contained in:
@@ -314,7 +314,8 @@ func createPD() (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
err = gceCloud.CreateDisk(pdName, testContext.CloudConfig.Zone, 10 /* sizeGb */)
|
||||
tags := map[string]string{}
|
||||
err = gceCloud.CreateDisk(pdName, testContext.CloudConfig.Zone, 10 /* sizeGb */, tags)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
Reference in New Issue
Block a user