Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ ARG TARGETARCH
ENV GOOS=$TARGETOS
ENV GOARCH=$TARGETARCH

ARG FIPS_MODE=off
ENV GOFIPS140=$FIPS_MODE

# Build
RUN CGO_ENABLED=0 GO111MODULE=on go build -a -tags timetzdata -o manager main.go

Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,11 @@ generate-client-set:

GIT_COMMIT=$(shell git rev-parse --short HEAD)-dev
OPERATOR_IMAGE ?= rabbitmqoperator/messaging-topology-operator
GOFIPS140 ?= off
.PHONY: docker-build-dev
docker-build-dev:
$(call check_defined, DOCKER_REGISTRY_SERVER, URL of docker registry containing the Operator image (e.g. registry.my-company.com))
$(BUILD_KIT) buildx build --build-arg=GIT_COMMIT=$(GIT_COMMIT) -t $(DOCKER_REGISTRY_SERVER)/$(OPERATOR_IMAGE):$(GIT_COMMIT) .
$(BUILD_KIT) buildx build --build-arg=FIPS_MODE=$(GOFIPS140) --build-arg=GIT_COMMIT=$(GIT_COMMIT) -t $(DOCKER_REGISTRY_SERVER)/$(OPERATOR_IMAGE):$(GIT_COMMIT) .
$(BUILD_KIT) push $(DOCKER_REGISTRY_SERVER)/$(OPERATOR_IMAGE):$(GIT_COMMIT)

# docker-build-local and deploy-local work in local Kubernetes installations where the Kubernetes API
Expand Down
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This product may include a number of subcomponents with separate copyright notic
package main

import (
"crypto/fips140"
"flag"
"fmt"
"os"
Expand Down Expand Up @@ -387,6 +388,7 @@ func main() {
log.Error(err, "unable to create controller", "controller", controllers.SuperStreamControllerName)
os.Exit(1)
}
// +kubebuilder:scaffold:builder

if os.Getenv(controllers.EnableWebhooksEnvVar) != "false" {
if err = (&topology.Binding{}).SetupWebhookWithManager(mgr); err != nil {
Expand Down Expand Up @@ -443,7 +445,9 @@ func main() {
}
}

// +kubebuilder:scaffold:builder
if fips140.Enabled() {
log.Info("FIPS 140-3 mode enabled")
}

log.Info("starting manager")
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
Expand Down
Loading