Skip to content

Commit

Permalink
Issue1316 Pod creation with secret volumemount (#1318)
Browse files Browse the repository at this point in the history
* CheckandEstimate implementation

* fixed variable rename

* fixed gofmt

* fixed feedbacks

* Fixed the duplicate mountpath issue
  • Loading branch information
sarabala1979 authored Apr 12, 2019
1 parent a5a2bcf commit 6607dca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions workflow/controller/workflowpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ func createSecretVolumes(tmpl *wfv1.Template) ([]apiv1.Volume, []apiv1.VolumeMou
secretVolumes = append(secretVolumes, val)
secretVolMounts = append(secretVolMounts, apiv1.VolumeMount{
Name: volMountName,
MountPath: common.SecretVolMountPath,
MountPath: common.SecretVolMountPath + "/" + val.Name,
ReadOnly: true,
})
}
Expand Down Expand Up @@ -900,7 +900,7 @@ func createSecretVal(volMap map[string]apiv1.Volume, secret *apiv1.SecretKeySele
if vol, ok := volMap[secret.Name]; ok {
key := apiv1.KeyToPath{
Key: secret.Key,
Path: secret.Name + "/" + secret.Key,
Path: secret.Key,
}
if val, _ := keyMap[secret.Name+"-"+secret.Key]; !val {
keyMap[secret.Name+"-"+secret.Key] = true
Expand All @@ -915,7 +915,7 @@ func createSecretVal(volMap map[string]apiv1.Volume, secret *apiv1.SecretKeySele
Items: []apiv1.KeyToPath{
{
Key: secret.Key,
Path: secret.Name + "/" + secret.Key,
Path: secret.Key,
},
},
},
Expand Down

0 comments on commit 6607dca

Please sign in to comment.