Skip to content

Commit

Permalink
fix: storage type created by sts is incorrect (#1737)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangSetSail authored Aug 9, 2023
1 parent d98f2ee commit 1a73ac9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions worker/appm/volume/other.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ func (v *OtherVolume) CreateVolume(define *Define) error {
return "linux"
}(),
}
v.as.SetClaim(claim) // store claim to appService
v.as.SetClaim(claim) // store claim to appService
statefulset := v.as.GetStatefulSet() //有状态组件
vo := corev1.Volume{Name: volumeMountName}
vo.PersistentVolumeClaim = &corev1.PersistentVolumeClaimVolumeSource{ClaimName: claim.GetName(), ReadOnly: volumeReadOnly}
define.volumes = append(define.volumes, vo)
if shareFile {
v.as.SetClaimManually(claim)
if statefulset != nil {
statefulset.Spec.VolumeClaimTemplates = append(statefulset.Spec.VolumeClaimTemplates, *claim)
logrus.Debugf("stateset.Spec.VolumeClaimTemplates: %+v", statefulset.Spec.VolumeClaimTemplates)
} else {
statefulset := v.as.GetStatefulSet() //有状态组件
if statefulset != nil {
statefulset.Spec.VolumeClaimTemplates = append(statefulset.Spec.VolumeClaimTemplates, *claim)
logrus.Debugf("stateset.Spec.VolumeClaimTemplates: %+v", statefulset.Spec.VolumeClaimTemplates)
if shareFile {
v.as.SetClaimManually(claim)
}
define.volumes = append(define.volumes, vo)
}

vm := corev1.VolumeMount{
Expand Down

0 comments on commit 1a73ac9

Please sign in to comment.