Skip to content

Commit

Permalink
Merge branch 'master' into fix-vuln
Browse files Browse the repository at this point in the history
  • Loading branch information
ispeakc0de authored Sep 13, 2024
2 parents 4d954af + 0b10874 commit 9319f42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
8 changes: 5 additions & 3 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ RUN go env
RUN CGO_ENABLED=0 go build -buildvcs=false -o /output/chaos-operator -v ./main.go

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

LABEL maintainer="LitmusChaos"

ENV OPERATOR=/usr/local/bin/chaos-operator

COPY --from=builder /output/chaos-operator ${OPERATOR}
RUN chown 65534:0 ${OPERATOR} && chmod 755 ${OPERATOR}

USER 65534

ENTRYPOINT ["/usr/local/bin/chaos-operator"]
2 changes: 1 addition & 1 deletion controllers/chaosengine_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,7 @@ func TestReconcileForCreationAndRunning(t *testing.T) {

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

fakeClient := litmusFakeClientset.NewFakeClient()
fakeClient := litmusFakeClientset.NewClientBuilder().WithRuntimeObjects().Build()
if fakeClient == nil {
fmt.Println("litmusClient is not created")
}
Expand Down
5 changes: 0 additions & 5 deletions pkg/utils/volumeUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ import (
corev1 "k8s.io/api/core/v1"
)

var (
// hostpathTypeFile represents the hostpath type
hostpathTypeFile = corev1.HostPathFile
)

// CreateVolumeBuilders build Volume needed in execution of experiments
func CreateVolumeBuilders(configMaps []v1alpha1.ConfigMap, secrets []v1alpha1.Secret) []*volume.Builder {
volumeBuilderList := []*volume.Builder{}
Expand Down

0 comments on commit 9319f42

Please sign in to comment.