Skip to content

Commit

Permalink
Merge pull request #13881 from openshift-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-13828-to-release-4.16

[release-4.16] OCPBUGS-34112: Fix Admission webhook warning for Route and BuildConfig creation via import flow
  • Loading branch information
openshift-merge-bot[bot] authored May 24, 2024
2 parents 3a7b184 + 7d56492 commit f8c0696
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ export const createOrUpdateBuildConfig = (
git: {
uri: repository,
ref,
type: 'Git',
},
...(secretName ? { sourceSecret: { name: secretName } } : {}),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Object {
"apiVersion": "route.openshift.io/v1",
"kind": "Route",
"metadata": Object {
"defaultAnnotations": Object {
"annotations": Object {
"openshift.io/generated-by": "OpenShiftWebConsole",
},
"labels": Object {
Expand Down Expand Up @@ -40,7 +40,7 @@ Object {
"apiVersion": "route.openshift.io/v1",
"kind": "Route",
"metadata": Object {
"defaultAnnotations": Object {
"annotations": Object {
"app.openshift.io/vcs-ref": "",
"app.openshift.io/vcs-uri": "https://github.com/test/repo",
"openshift.io/generated-by": "OpenShiftWebConsole",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const createRoute = (
name,
namespace,
labels: { ...defaultLabels, ...userLabels, ...routeLabels },
defaultAnnotations,
annotations: defaultAnnotations,
},
spec: {
to: {
Expand Down
10 changes: 10 additions & 0 deletions frontend/packages/knative-plugin/src/utils/create-knative-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@ export const getKnativeServiceDepResource = (
],
}),
imagePullPolicy: imgPullPolicy,
securityContext: {
allowPrivilegeEscalation: false,
capabilities: {
drop: ['ALL'],
},
runAsNonRoot: true,
seccompProfile: {
type: 'RuntimeDefault',
},
},
env,
resources: {
...((cpuLimit || memoryLimit) && {
Expand Down

0 comments on commit f8c0696

Please sign in to comment.