Skip to content

Commit

Permalink
Merge pull request #940 from cliveseldon/volMount_issue
Browse files Browse the repository at this point in the history
Vol mount issue fix
  • Loading branch information
seldondev authored Oct 10, 2019
2 parents dc2e933 + c7778bb commit 52752f0
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions operator/api/v1alpha2/seldondeployment_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,19 @@ func (r *SeldonDeployment) DefaultSeldonDeployment() {
portNum = existingPort.ContainerPort
}

con.VolumeMounts = append(con.VolumeMounts, corev1.VolumeMount{
Name: PODINFO_VOLUME_NAME,
MountPath: PODINFO_VOLUME_PATH,
})
//downward api used to make pod info available to container
volMount := false
for _, vol := range con.VolumeMounts {
if vol.Name == PODINFO_VOLUME_NAME {
volMount = true
}
}
if !volMount {
con.VolumeMounts = append(con.VolumeMounts, corev1.VolumeMount{
Name: PODINFO_VOLUME_NAME,
MountPath: PODINFO_VOLUME_PATH,
})
}
}
// Set ports and hostname in predictive unit so engine can read it from SDep
// if this is the firstPuPortNum then we've not added engine yet so put the engine in here
Expand Down

0 comments on commit 52752f0

Please sign in to comment.