File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ ARG TARGETOS
2020ARG TARGETARCH
2121ENV GOOS=$TARGETOS
2222ENV GOARCH=$TARGETARCH
23+
24+ # FIPS
25+ ARG FIPS_MODE=off
26+ ENV GOFIPS140=$FIPS_MODE
27+
2328RUN CGO_ENABLED=0 GO111MODULE=on go build -a -tags timetzdata -o manager main.go
2429
2530# ---------------------------------------
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ $(KUBEBUILDER_ASSETS):
4949
5050.PHONY : kubebuilder-assets
5151kubebuilder-assets : $(KUBEBUILDER_ASSETS )
52+ @echo " export KUBEBUILDER_ASSETS=$( KUBEBUILDER_ASSETS) "
5253
5354.PHONY : kubebuilder-assets-rm
5455kubebuilder-assets-rm :
Original file line number Diff line number Diff line change 99package main
1010
1111import (
12+ "crypto/fips140"
1213 "flag"
1314 "fmt"
1415 "os"
@@ -192,7 +193,7 @@ func main() {
192193
193194 clusterConfig := config .GetConfigOrDie ()
194195
195- err = (& controllers.RabbitmqClusterReconciler {
196+ if err = (& controllers.RabbitmqClusterReconciler {
196197 Client : mgr .GetClient (),
197198 APIReader : mgr .GetAPIReader (),
198199 Scheme : mgr .GetScheme (),
@@ -205,14 +206,16 @@ func main() {
205206 DefaultUserUpdaterImage : defaultUserUpdaterImage ,
206207 DefaultImagePullSecrets : defaultImagePullSecrets ,
207208 ControlRabbitmqImage : controlRabbitmqImage ,
208- }).SetupWithManager (mgr )
209- if err != nil {
209+ }).SetupWithManager (mgr ); err != nil {
210210 log .Error (err , "unable to create controller" , controllerName )
211211 os .Exit (1 )
212212 }
213- log .Info ("started controller" )
214213 // +kubebuilder:scaffold:builder
215214
215+ if fips140 .Enabled () {
216+ log .Info ("FIPS 140-3 mode enabled" )
217+ }
218+
216219 log .Info ("starting manager" )
217220 if err := mgr .Start (ctrl .SetupSignalHandler ()); err != nil {
218221 log .Error (err , "problem running manager" )
You can’t perform that action at this time.
0 commit comments