Skip to content

Commit 9319f42

Browse files
authored
Merge branch 'master' into fix-vuln
2 parents 4d954af + 0b10874 commit 9319f42

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

build/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ RUN go env
1717
RUN CGO_ENABLED=0 go build -buildvcs=false -o /output/chaos-operator -v ./main.go
1818

1919
# Packaging stage
20-
# Image source: https://github.com/litmuschaos/test-tools/blob/master/custom/hardened-alpine/infra/Dockerfile
21-
# The base image is non-root (have litmus user) with default litmus directory.
22-
FROM litmuschaos/infra-alpine
20+
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4
2321

2422
LABEL maintainer="LitmusChaos"
2523

2624
ENV OPERATOR=/usr/local/bin/chaos-operator
25+
2726
COPY --from=builder /output/chaos-operator ${OPERATOR}
27+
RUN chown 65534:0 ${OPERATOR} && chmod 755 ${OPERATOR}
28+
29+
USER 65534
2830

2931
ENTRYPOINT ["/usr/local/bin/chaos-operator"]

controllers/chaosengine_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ func TestReconcileForCreationAndRunning(t *testing.T) {
16211621

16221622
func CreateFakeClient(t *testing.T) *ChaosEngineReconciler {
16231623

1624-
fakeClient := litmusFakeClientset.NewFakeClient()
1624+
fakeClient := litmusFakeClientset.NewClientBuilder().WithRuntimeObjects().Build()
16251625
if fakeClient == nil {
16261626
fmt.Println("litmusClient is not created")
16271627
}

pkg/utils/volumeUtils.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ import (
66
corev1 "k8s.io/api/core/v1"
77
)
88

9-
var (
10-
// hostpathTypeFile represents the hostpath type
11-
hostpathTypeFile = corev1.HostPathFile
12-
)
13-
149
// CreateVolumeBuilders build Volume needed in execution of experiments
1510
func CreateVolumeBuilders(configMaps []v1alpha1.ConfigMap, secrets []v1alpha1.Secret) []*volume.Builder {
1611
volumeBuilderList := []*volume.Builder{}

0 commit comments

Comments
 (0)