Skip to content

Commit

Permalink
fips compliance update
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilbarge committed Dec 11, 2024
1 parent 80def43 commit 07ec51b
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ platform_temp = $(subst -, ,$(ARCH))
GOOS = $(word 1, $(platform_temp))
GOARCH = $(word 2, $(platform_temp))

BUILDER_IMAGE := golang:1.18
BUILDER_IMAGE := golang:1.23
PLUGIN_DOCKERFILE ?= Dockerfile-plugin
DATAMGR_DOCKERFILE ?= Dockerfile-datamgr
BACKUPDRIVER_DOCKERFILE ?= Dockerfile-backup-driver
Expand Down
3 changes: 3 additions & 0 deletions cmd/backup-driver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import (

"github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd"
"github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/backupdriver"

// enable fips only mode
_ "crypto/tls/fipsonly"
)

func main() {
Expand Down
3 changes: 3 additions & 0 deletions cmd/data-manager-for-plugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import (
"github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/datamgr"

"k8s.io/klog"

// enable fips only mode
_ "crypto/tls/fipsonly"
)

func main() {
Expand Down
3 changes: 3 additions & 0 deletions cmd/velero-plugin-for-vsphere/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ import (
plugins_pkg "github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/plugin"
"github.com/vmware-tanzu/velero/pkg/features"
veleroplugin "github.com/vmware-tanzu/velero/pkg/plugin/framework"

// enable fips only mode
_ "crypto/tls/fipsonly"
)

func main() {
Expand Down
22 changes: 11 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/vmware-tanzu/velero-plugin-for-vsphere

go 1.18
go 1.23

require (
github.com/agiledragon/gomonkey v2.0.1+incompatible
Expand All @@ -18,12 +18,12 @@ require (
github.com/vmware/govmomi v0.22.2-0.20200329013745-f2eef8fc745f
github.com/vmware/virtual-disks v0.0.4
gopkg.in/gcfg.v1 v1.2.3
k8s.io/api v0.24.2
k8s.io/api v0.25.2
k8s.io/apiextensions-apiserver v0.24.2
k8s.io/apimachinery v0.24.2
k8s.io/client-go v0.24.2
k8s.io/apimachinery v0.25.2
k8s.io/client-go v0.25.2
k8s.io/klog v1.0.0
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed
)

require (
Expand All @@ -37,8 +37,8 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.21 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.16 // indirect
github.com/Azure/go-autorest/autorest v0.11.27 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.5.8 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
Expand Down Expand Up @@ -158,10 +158,10 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/cli-runtime v0.24.0 // indirect
k8s.io/component-base v0.24.2 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/kube-openapi v0.0.0-20220614142933-1062c7ade5f8 // indirect
k8s.io/klog/v2 v2.70.1 // indirect
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
sigs.k8s.io/controller-runtime v0.12.2 // indirect
sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
58 changes: 41 additions & 17 deletions go.sum

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ if [ -z "${GIT_SHA}" ]; then
exit 1
fi


export CGO_ENABLED=1
export GOEXPERIMENT=boringcrypto

if [[ -z "${GIT_DIRTY}" ]]; then
GIT_TREE_STATE=clean
Expand All @@ -64,12 +64,14 @@ LDFLAGS="${LDFLAGS} -X ${PKG}/pkg/buildinfo.GitTreeState=${GIT_TREE_STATE}"
if [[ -z "${OUTPUT_DIR:-}" ]]; then
OUTPUT_DIR=.
fi

OUTPUT=${OUTPUT_DIR}/${BIN}
if [[ "${GOOS}" = "windows" ]]; then
OUTPUT="${OUTPUT}.exe"
fi

GO111MODULES=on go build \
GO111MODULES=on \
go build -buildmode=pie \
-o ${OUTPUT} \
-installsuffix "static" \
-ldflags "${LDFLAGS}" \
Expand Down

0 comments on commit 07ec51b

Please sign in to comment.