Skip to content

Commit

Permalink
SDCICD-1337: run as root
Browse files Browse the repository at this point in the history
getting permission denied when trying to write a file otherwise

before

```
[generate-olm-bundle : operator-sdk-generate-bundle] Generating bundle version 4.16.307-c2daaad
[generate-olm-bundle : operator-sdk-generate-bundle] Generating bundle manifests
[generate-olm-bundle : operator-sdk-generate-bundle] Building a ClusterServiceVersion without an existing base
[generate-olm-bundle : operator-sdk-generate-bundle] time="2024-07-30T08:37:06Z" level=warning msg="ClusterServiceVersion validation: [OperationFailed] provided API should have an example annotation"
[generate-olm-bundle : operator-sdk-generate-bundle] time="2024-07-30T08:37:06Z" level=fatal msg="Error generating bundle manifests: error generating ClusterServiceVersion: open bundle/manifests/osd-example-operator.clusterserviceversion.yaml: permission denied"
```

after

```
[generate-olm-bundle : operator-sdk-generate-bundle] Generating bundle version 4.16.307-c2daaad
[generate-olm-bundle : operator-sdk-generate-bundle] Generating bundle manifests
[generate-olm-bundle : operator-sdk-generate-bundle] Building a ClusterServiceVersion without an existing base
[generate-olm-bundle : operator-sdk-generate-bundle] time="2024-07-30T08:37:52Z" level=warning msg="ClusterServiceVersion validation: [OperationFailed] provided API should have an example annotation"
[generate-olm-bundle : operator-sdk-generate-bundle] Bundle manifests generated successfully in bundle
[generate-olm-bundle : operator-sdk-generate-bundle] Generating bundle metadata
[generate-olm-bundle : operator-sdk-generate-bundle] time="2024-07-30T08:37:52Z" level=info msg="Creating bundle.Dockerfile"
[generate-olm-bundle : operator-sdk-generate-bundle] time="2024-07-30T08:37:52Z" level=info msg="Creating bundle/metadata/annotations.yaml"
[generate-olm-bundle : operator-sdk-generate-bundle] time="2024-07-30T08:37:52Z" level=info msg="Bundle metadata generated successfully"
```

Signed-off-by: Brady Pratt <[email protected]>
  • Loading branch information
jbpratt authored and chmeliik committed Jul 30, 2024
1 parent db5c10d commit 4edc46c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ spec:
- name: operator-sdk-generate-bundle
image: "registry.redhat.io/openshift4/ose-operator-sdk-rhel9:v4.16"
workingDir: $(workspaces.source.path)/source
securityContext:
runAsUser: 0
args:
- generate
- bundle
Expand Down

0 comments on commit 4edc46c

Please sign in to comment.