Support for labels at pvc level (#254)

This commit is contained in:
Daniel Valdivia
2020-08-20 22:46:07 -07:00
committed by GitHub
parent c59737a71d
commit 54d0a1d342
4 changed files with 27 additions and 1 deletions

View File

@@ -207,6 +207,9 @@ func (m *Zone) UnmarshalBinary(b []byte) error {
// swagger:model ZoneVolumeConfiguration
type ZoneVolumeConfiguration struct {
// labels
Labels map[string]string `json:"labels,omitempty"`
// size
// Required: true
Size *int64 `json:"size"`

View File

@@ -1141,7 +1141,8 @@ func parseTenantZoneRequest(zoneParams *models.Zone, annotations map[string]stri
// Pass annotations to the volume
vct := &corev1.PersistentVolumeClaim{
ObjectMeta: metav1.ObjectMeta{
Name: "data",
Name: "data",
Labels: zoneParams.VolumeConfiguration.Labels,
},
Spec: volTemp,
}

View File

@@ -3250,6 +3250,12 @@ func init() {
"size"
],
"properties": {
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"size": {
"type": "integer"
},
@@ -5721,6 +5727,12 @@ func init() {
"size"
],
"properties": {
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"size": {
"type": "integer"
},
@@ -7126,6 +7138,12 @@ func init() {
"size"
],
"properties": {
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"size": {
"type": "integer"
},

View File

@@ -2088,6 +2088,10 @@ definitions:
type: integer
storage_class_name:
type: string
labels:
type: object
additionalProperties:
type: string
resources:
$ref: "#/definitions/zoneResources"
node_selector: