Skip to content

Commit 72b42d4

Browse files
committed
CC: Merge from main to CCv0, Aug 7th, 2023
The usual weekly merge. Fixes: kata-containers#5741 Signed-off-by: Fabiano Fidêncio <[email protected]>
2 parents 4fec2b5 + 0f2c2d8 commit 72b42d4

File tree

5 files changed

+36
-9
lines changed

5 files changed

+36
-9
lines changed

.ci/lib.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
# SPDX-License-Identifier: Apache-2.0
77
#
88

9+
# Ensure GOPATH set
10+
if command -v go > /dev/null; then
11+
export GOPATH=${GOPATH:-$(go env GOPATH)}
12+
else
13+
# if go isn't installed, set default location for GOPATH
14+
export GOPATH="${GOPATH:-$HOME/go}"
15+
fi
16+
917
export KATA_KSM_THROTTLER=${KATA_KSM_THROTTLER:-no}
1018
export KATA_QEMU_DESTDIR=${KATA_QEMU_DESTDIR:-"/usr"}
1119
export KATA_ETC_CONFIG_PATH="/etc/kata-containers/configuration.toml"
@@ -36,14 +44,6 @@ export KATA_NET_TIMEOUT=30
3644

3745
source /etc/os-release || source /usr/lib/os-release
3846

39-
# Ensure GOPATH set
40-
if command -v go > /dev/null; then
41-
export GOPATH=${GOPATH:-$(go env GOPATH)}
42-
else
43-
# if go isn't installed, set default location for GOPATH
44-
export GOPATH="${GOPATH:-$HOME/go}"
45-
fi
46-
4747
# Support Golang 1.16.x.
4848
# By default in Golang >= 1.16 GO111MODULE is set to "on",
4949
# some subprojects in this repo may not support "go modules",

.ci/openshift-ci/smoke/http-server.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,13 @@ spec:
1818
- containerPort: 8080
1919
command: ["python3"]
2020
args: [ "-m", "http.server", "8080"]
21+
securityContext:
22+
allowPrivilegeEscalation: false
23+
capabilities:
24+
drop:
25+
- ALL
26+
runAsNonRoot: true
27+
runAsUser: 1000
28+
seccompProfile:
29+
type: RuntimeDefault
2130
runtimeClassName: kata-qemu

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.0-alpha3
1+
3.2.0-rc0

kata-webhook/deploy/webhook.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ spec:
4141
requests:
4242
cpu: "100m"
4343
memory: "250Mi"
44+
securityContext:
45+
allowPrivilegeEscalation: false
46+
capabilities:
47+
drop:
48+
- ALL
49+
runAsNonRoot: true
50+
runAsUser: 1000
51+
seccompProfile:
52+
type: RuntimeDefault
4453
volumes:
4554
- name: webhook-certs
4655
secret:

kata-webhook/webhook-check.sh

+9
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ check_working() {
5757
image: quay.io/prometheus/busybox:latest
5858
command: ["echo", "Hello Webhook"]
5959
imagePullPolicy: IfNotPresent
60+
securityContext:
61+
allowPrivilegeEscalation: false
62+
capabilities:
63+
drop:
64+
- ALL
65+
runAsNonRoot: true
66+
runAsUser: 1000
67+
seccompProfile:
68+
type: RuntimeDefault
6069
EOF
6170
local class_name=$(kubectl get -n ${WEBHOOK_NS} \
6271
-o jsonpath='{.spec.runtimeClassName}' pod/${hello_pod})

0 commit comments

Comments
 (0)