From 4edc46c057ec6d28f4acff566547fd74c53608ad Mon Sep 17 00:00:00 2001 From: Brady Pratt Date: Mon, 29 Jul 2024 04:23:49 -0500 Subject: [PATCH] SDCICD-1337: run as root 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 --- .../0.1/operator-sdk-generate-bundle.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/task/operator-sdk-generate-bundle/0.1/operator-sdk-generate-bundle.yaml b/task/operator-sdk-generate-bundle/0.1/operator-sdk-generate-bundle.yaml index 0e41cef79e..80edb7dcaa 100644 --- a/task/operator-sdk-generate-bundle/0.1/operator-sdk-generate-bundle.yaml +++ b/task/operator-sdk-generate-bundle/0.1/operator-sdk-generate-bundle.yaml @@ -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