Keep PersistentVolumeClaim to "varlibrancherk3s" (#1090)

* Keep PersistentVolumeClaim to "varlibrancherk3s"

* Rename volume name to "varlibrancherk3s" in pod specification
This commit is contained in:
Enrico Candino
2026-07-29 11:17:56 +02:00
committed by GitHub
parent eb0955f666
commit bf0c8f0c32
+3 -3
View File
@@ -192,7 +192,7 @@ func (s *Server) podSpec(ctx context.Context, image, name string, persistent boo
ReadOnly: false,
},
{
Name: "var-lib-rancher-k3s",
Name: "varlibrancherk3s",
MountPath: k3sDataDir,
ReadOnly: false,
},
@@ -215,7 +215,7 @@ func (s *Server) podSpec(ctx context.Context, image, name string, persistent boo
podSpec.Containers[0].Command = cmd
if !persistent {
podSpec.Volumes = append(podSpec.Volumes, corev1.Volume{
Name: "var-lib-rancher-k3s",
Name: "varlibrancherk3s",
VolumeSource: corev1.VolumeSource{
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
@@ -433,7 +433,7 @@ func (s *Server) setupDynamicPersistence() corev1.PersistentVolumeClaim {
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "var-lib-rancher-k3s",
Name: "varlibrancherk3s",
Namespace: s.cluster.Namespace,
},
Spec: corev1.PersistentVolumeClaimSpec{