Skip to content

Commit

Permalink
fix set pvc name
Browse files Browse the repository at this point in the history
  • Loading branch information
wanyaoqi committed Jul 10, 2020
1 parent 1f7f33e commit ddf338e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/manager/component/baremetal.go
Expand Up @@ -142,7 +142,7 @@ func newBaremetalVolHelper(oc *v1alpha1.OnecloudCluster, optCfgMap string, compo
Name: "opt",
VolumeSource: corev1.VolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: controller.NewClusterComponentName(oc.GetName(), v1alpha1.BaremetalAgentComponentType),
ClaimName: m.newPvcName(oc.GetName(), oc.Spec.BaremetalAgent.StorageClassName, v1alpha1.BaremetalAgentComponentType),
ReadOnly: false,
},
},
Expand Down
3 changes: 1 addition & 2 deletions pkg/manager/component/esxi.go
Expand Up @@ -23,7 +23,6 @@ import (

"yunion.io/x/onecloud-operator/pkg/apis/constants"
"yunion.io/x/onecloud-operator/pkg/apis/onecloud/v1alpha1"
"yunion.io/x/onecloud-operator/pkg/controller"
"yunion.io/x/onecloud-operator/pkg/manager"
)

Expand Down Expand Up @@ -86,7 +85,7 @@ func (m *esxiManager) getDeployment(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.
Name: "opt",
VolumeSource: corev1.VolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: controller.NewClusterComponentName(oc.GetName(), v1alpha1.EsxiAgentComponentType),
ClaimName: m.newPvcName(oc.GetName(), oc.Spec.EsxiAgent.StorageClassName, v1alpha1.EsxiAgentComponentType),
ReadOnly: false,
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/manager/component/influxdb.go
Expand Up @@ -138,7 +138,7 @@ func (m *influxdbManager) getDeployment(oc *v1alpha1.OnecloudCluster, cfg *v1alp
Name: "data",
VolumeSource: corev1.VolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: controller.NewClusterComponentName(oc.GetName(), v1alpha1.InfluxdbComponentType),
ClaimName: m.newPvcName(oc.GetName(), oc.Spec.Influxdb.StorageClassName, v1alpha1.InfluxdbComponentType),
ReadOnly: false,
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/manager/component/meter.go
Expand Up @@ -111,7 +111,7 @@ func (m *meterManager) getDeployment(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1
Name: "data",
VolumeSource: corev1.VolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: controller.NewClusterComponentName(oc.GetName(), v1alpha1.MeterComponentType),
ClaimName: m.newPvcName(oc.GetName(), oc.Spec.Meter.StorageClassName, v1alpha1.MeterComponentType),
ReadOnly: false,
},
},
Expand Down

0 comments on commit ddf338e

Please sign in to comment.