Skip to content

Commit

Permalink
Use emptydir for config location
Browse files Browse the repository at this point in the history
  • Loading branch information
Kidswiss committed Oct 31, 2024
1 parent 9dd4654 commit 830e2ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions pkg/comp-functions/functions/vshnmariadb/proxysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ func createProxySQLStatefulset(comp *vshnv1.VSHNMariaDB, svc *runtime.ServiceRun
MountPath: "/etc/proxysql.cnf",
SubPath: "proxysql.cnf",
},
{
Name: "proxysql-emptydir",
MountPath: "/var/lib/proxysql",
},
},
Ports: []corev1.ContainerPort{
{
Expand All @@ -342,6 +346,12 @@ func createProxySQLStatefulset(comp *vshnv1.VSHNMariaDB, svc *runtime.ServiceRun
},
},
},
{
Name: "proxysql-emptydir",
VolumeSource: corev1.VolumeSource{
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
},
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/comp-functions/functions/vshnmariadb/proxysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ func Test_createProxySQLStatefulset(t *testing.T) {
assert.NoError(t, svc.GetDesiredKubeObject(sts, comp.GetName()+"-proxysql-sts"))

// Then expect no cert mounts
assert.Len(t, sts.Spec.Template.Spec.Containers[0].VolumeMounts, 1)
assert.Len(t, sts.Spec.Template.Spec.Volumes, 1)
assert.Len(t, sts.Spec.Template.Spec.Containers[0].VolumeMounts, 2)
assert.Len(t, sts.Spec.Template.Spec.Volumes, 2)
}

func Test_createProxySQLPDB(t *testing.T) {
Expand Down

0 comments on commit 830e2ed

Please sign in to comment.