Skip to content

Commit

Permalink
fix(cleanup, provisioner): add image pull secrets to cleanup pod
Browse files Browse the repository at this point in the history
- add image pull secrets to hostpath provisioner cleanup pod

Signed-off-by: Akhil Mohan <[email protected]>
  • Loading branch information
akhilerm authored and kmova committed Jan 12, 2021
1 parent ff95934 commit 7da4041
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/provisioner-localpv/app/provisioner_hostpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ func (p *Provisioner) DeleteHostPath(pv *v1.PersistentVolume) (err error) {
return err
}
taints := GetTaints(nodeObject)

imagePullSecrets := GetImagePullSecrets(getOpenEBSImagePullSecrets())

//Initiate clean up only when reclaim policy is not retain.
klog.Infof("Deleting volume %v at %v:%v", pv.Name, GetNodeHostname(nodeObject), path)
cleanupCmdsForPath := []string{"rm", "-rf"}
Expand All @@ -199,6 +202,7 @@ func (p *Provisioner) DeleteHostPath(pv *v1.PersistentVolume) (err error) {
nodeAffinityLabelValue: nodeAffinityValue,
serviceAccountName: saName,
selectedNodeTaints: taints,
imagePullSecrets: imagePullSecrets,
}

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

0 comments on commit 7da4041

Please sign in to comment.