Skip to content

Commit 7da4041

Browse files
akhilermKiran Mova
authored andcommitted
fix(cleanup, provisioner): add image pull secrets to cleanup pod
- add image pull secrets to hostpath provisioner cleanup pod Signed-off-by: Akhil Mohan <[email protected]>
1 parent ff95934 commit 7da4041

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/provisioner-localpv/app/provisioner_hostpath.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ func (p *Provisioner) DeleteHostPath(pv *v1.PersistentVolume) (err error) {
188188
return err
189189
}
190190
taints := GetTaints(nodeObject)
191+
192+
imagePullSecrets := GetImagePullSecrets(getOpenEBSImagePullSecrets())
193+
191194
//Initiate clean up only when reclaim policy is not retain.
192195
klog.Infof("Deleting volume %v at %v:%v", pv.Name, GetNodeHostname(nodeObject), path)
193196
cleanupCmdsForPath := []string{"rm", "-rf"}
@@ -199,6 +202,7 @@ func (p *Provisioner) DeleteHostPath(pv *v1.PersistentVolume) (err error) {
199202
nodeAffinityLabelValue: nodeAffinityValue,
200203
serviceAccountName: saName,
201204
selectedNodeTaints: taints,
205+
imagePullSecrets: imagePullSecrets,
202206
}
203207

204208
if err := p.createCleanupPod(podOpts); err != nil {

0 commit comments

Comments
 (0)