Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bundle/manifests/oadp-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,8 @@ spec:
- mountPath: /var/run/secrets/openshift/serviceaccount
name: bound-sa-token
readOnly: true
- mountPath: /tmp
name: tmp-dir
securityContext:
runAsNonRoot: true
serviceAccountName: openshift-adp-controller-manager
Expand All @@ -1176,6 +1178,8 @@ spec:
audience: openshift
expirationSeconds: 3600
path: token
- emptyDir: {}
name: tmp-dir
permissions:
- rules:
- apiGroups:
Expand Down
4 changes: 4 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ spec:
- mountPath: /var/run/secrets/openshift/serviceaccount
name: bound-sa-token
readOnly: true
- mountPath: /tmp
name: tmp-dir
env:
- name: WATCH_NAMESPACE
valueFrom:
Expand Down Expand Up @@ -126,4 +128,6 @@ spec:
path: token
expirationSeconds: 3600
audience: openshift
- name: tmp-dir
emptyDir: {}
terminationGracePeriodSeconds: 10
3 changes: 1 addition & 2 deletions pkg/bucket/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"

Expand Down Expand Up @@ -91,7 +90,7 @@ func SharedCredentialsFileFromSecret(secret *corev1.Secret) (string, error) {
return "", errors.New("invalid secret for aws credentials")
}

f, err := ioutil.TempFile("", "aws-shared-credentials")
f, err := os.CreateTemp("", "aws-shared-credentials")
if err != nil {
return "", err
}
Expand Down