Skip to content

Commit

Permalink
Make postgres container access more obvious
Browse files Browse the repository at this point in the history
  • Loading branch information
erthalion committed Dec 21, 2018
1 parent 9207c87 commit 93e1977
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cluster/k8sres.go
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,8 @@ func addShmVolume(podSpec *v1.PodSpec) {
},
})

mounts := append(podSpec.Containers[0].VolumeMounts,
pgIdx := constants.PostgresContainerIdx
mounts := append(podSpec.Containers[pgIdx].VolumeMounts,
v1.VolumeMount{
Name: constants.ShmVolumeName,
MountPath: constants.ShmVolumePath,
Expand Down
1 change: 1 addition & 0 deletions pkg/util/constants/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import "time"
// General kubernetes-related constants
const (
PostgresContainerName = "postgres"
PostgresContainerIdx = 0
K8sAPIPath = "/apis"
StatefulsetDeletionInterval = 1 * time.Second
StatefulsetDeletionTimeout = 30 * time.Second
Expand Down

0 comments on commit 93e1977

Please sign in to comment.