Skip to content

Commit

Permalink
PWX-32976: cherry-pick ccm config mount change for 2.13.8 (#1214)
Browse files Browse the repository at this point in the history
* need to mount ccm config for 2.13.8 as well
  • Loading branch information
ezhang-px committed Aug 16, 2023
1 parent d005edc commit b694ed3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions drivers/storage/portworx/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ const (
)

var (
pxVer2_3_2, _ = version.NewVersion("2.3.2")
pxVer2_5_5, _ = version.NewVersion("2.5.5")
pxVer2_6, _ = version.NewVersion("2.6")
pxVer2_8, _ = version.NewVersion("2.8")
pxVer2_9_1, _ = version.NewVersion("2.9.1")
pxVer3_0, _ = version.NewVersion("3.0")
pxVer3_0_1, _ = version.NewVersion("3.0.1")
pxVer2_3_2, _ = version.NewVersion("2.3.2")
pxVer2_5_5, _ = version.NewVersion("2.5.5")
pxVer2_6, _ = version.NewVersion("2.6")
pxVer2_8, _ = version.NewVersion("2.8")
pxVer2_9_1, _ = version.NewVersion("2.9.1")
pxVer2_13_8, _ = version.NewVersion("2.13.8")
pxVer3_0_1, _ = version.NewVersion("3.0.1")
)

type volumeInfo struct {
Expand Down Expand Up @@ -1226,7 +1226,7 @@ func (t *template) getVolumeMounts() []v1.VolumeMount {
if t.cluster.Annotations != nil {
preFltCheck = strings.TrimSpace(strings.ToLower(t.cluster.Annotations[pxutil.AnnotationPreflightCheck]))
}
if t.pxVersion.GreaterThanOrEqual(pxVer3_0) && preFltCheck != "true" {
if t.pxVersion.GreaterThanOrEqual(pxVer2_13_8) && preFltCheck != "true" {
extensions = append(extensions, t.getTelemetryPhoneHomeVolumeInfoList)
}
for _, fn := range extensions {
Expand Down Expand Up @@ -1311,7 +1311,7 @@ func (t *template) getVolumes() []v1.Volume {
if t.cluster.Annotations != nil {
preFltCheck = strings.TrimSpace(strings.ToLower(t.cluster.Annotations[pxutil.AnnotationPreflightCheck]))
}
if t.pxVersion.GreaterThanOrEqual(pxVer3_0) && preFltCheck != "true" {
if t.pxVersion.GreaterThanOrEqual(pxVer2_13_8) && preFltCheck != "true" {
extensions = append(extensions, t.getTelemetryPhoneHomeVolumeInfoList)
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/storage/portworx/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2592,7 +2592,7 @@ func TestPodWithTelemetryCCMVolume(t *testing.T) {
Namespace: "kube-system",
},
Spec: corev1.StorageClusterSpec{
Image: "portworx/oci-monitor:2.8.0",
Image: "portworx/oci-monitor:2.13.7",
Monitoring: &corev1.MonitoringSpec{
Telemetry: &corev1.TelemetrySpec{
Enabled: true,
Expand Down Expand Up @@ -2633,7 +2633,7 @@ func TestPodWithTelemetryCCMVolume(t *testing.T) {
assert.False(t, hasCCMVol || hasCCMVolMount)

// Then upgrade the cluster to 3.0 and obtain the new pod spec
cluster.Spec.Image = "portworx/oci-monitor:3.0.0"
cluster.Spec.Image = "portworx/oci-monitor:2.13.8"
err = driver.SetDefaultsOnStorageCluster(cluster)
require.NoError(t, err)

Expand Down

0 comments on commit b694ed3

Please sign in to comment.