Skip to content

Commit 07ec51b

Browse files
committed
fips compliance update
1 parent 80def43 commit 07ec51b

File tree

7 files changed

+66
-31
lines changed

7 files changed

+66
-31
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ platform_temp = $(subst -, ,$(ARCH))
6161
GOOS = $(word 1, $(platform_temp))
6262
GOARCH = $(word 2, $(platform_temp))
6363

64-
BUILDER_IMAGE := golang:1.18
64+
BUILDER_IMAGE := golang:1.23
6565
PLUGIN_DOCKERFILE ?= Dockerfile-plugin
6666
DATAMGR_DOCKERFILE ?= Dockerfile-datamgr
6767
BACKUPDRIVER_DOCKERFILE ?= Dockerfile-backup-driver

cmd/backup-driver/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ import (
2222

2323
"github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd"
2424
"github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/backupdriver"
25+
26+
// enable fips only mode
27+
_ "crypto/tls/fipsonly"
2528
)
2629

2730
func main() {

cmd/data-manager-for-plugin/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ import (
2424
"github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/datamgr"
2525

2626
"k8s.io/klog"
27+
28+
// enable fips only mode
29+
_ "crypto/tls/fipsonly"
2730
)
2831

2932
func main() {

cmd/velero-plugin-for-vsphere/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ import (
2525
plugins_pkg "github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/plugin"
2626
"github.com/vmware-tanzu/velero/pkg/features"
2727
veleroplugin "github.com/vmware-tanzu/velero/pkg/plugin/framework"
28+
29+
// enable fips only mode
30+
_ "crypto/tls/fipsonly"
2831
)
2932

3033
func main() {

go.mod

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/vmware-tanzu/velero-plugin-for-vsphere
22

3-
go 1.18
3+
go 1.23
44

55
require (
66
github.com/agiledragon/gomonkey v2.0.1+incompatible
@@ -18,12 +18,12 @@ require (
1818
github.com/vmware/govmomi v0.22.2-0.20200329013745-f2eef8fc745f
1919
github.com/vmware/virtual-disks v0.0.4
2020
gopkg.in/gcfg.v1 v1.2.3
21-
k8s.io/api v0.24.2
21+
k8s.io/api v0.25.2
2222
k8s.io/apiextensions-apiserver v0.24.2
23-
k8s.io/apimachinery v0.24.2
24-
k8s.io/client-go v0.24.2
23+
k8s.io/apimachinery v0.25.2
24+
k8s.io/client-go v0.25.2
2525
k8s.io/klog v1.0.0
26-
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
26+
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed
2727
)
2828

2929
require (
@@ -37,8 +37,8 @@ require (
3737
github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 // indirect
3838
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 // indirect
3939
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
40-
github.com/Azure/go-autorest/autorest v0.11.21 // indirect
41-
github.com/Azure/go-autorest/autorest/adal v0.9.16 // indirect
40+
github.com/Azure/go-autorest/autorest v0.11.27 // indirect
41+
github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect
4242
github.com/Azure/go-autorest/autorest/azure/auth v0.5.8 // indirect
4343
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect
4444
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
@@ -158,10 +158,10 @@ require (
158158
gopkg.in/yaml.v3 v3.0.1 // indirect
159159
k8s.io/cli-runtime v0.24.0 // indirect
160160
k8s.io/component-base v0.24.2 // indirect
161-
k8s.io/klog/v2 v2.60.1 // indirect
162-
k8s.io/kube-openapi v0.0.0-20220614142933-1062c7ade5f8 // indirect
161+
k8s.io/klog/v2 v2.70.1 // indirect
162+
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
163163
sigs.k8s.io/controller-runtime v0.12.2 // indirect
164-
sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 // indirect
165-
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
164+
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
165+
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
166166
sigs.k8s.io/yaml v1.3.0 // indirect
167167
)

go.sum

Lines changed: 41 additions & 17 deletions
Large diffs are not rendered by default.

hack/build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ if [ -z "${GIT_SHA}" ]; then
4747
exit 1
4848
fi
4949

50-
5150
export CGO_ENABLED=1
51+
export GOEXPERIMENT=boringcrypto
5252

5353
if [[ -z "${GIT_DIRTY}" ]]; then
5454
GIT_TREE_STATE=clean
@@ -64,12 +64,14 @@ LDFLAGS="${LDFLAGS} -X ${PKG}/pkg/buildinfo.GitTreeState=${GIT_TREE_STATE}"
6464
if [[ -z "${OUTPUT_DIR:-}" ]]; then
6565
OUTPUT_DIR=.
6666
fi
67+
6768
OUTPUT=${OUTPUT_DIR}/${BIN}
6869
if [[ "${GOOS}" = "windows" ]]; then
6970
OUTPUT="${OUTPUT}.exe"
7071
fi
7172

72-
GO111MODULES=on go build \
73+
GO111MODULES=on \
74+
go build -buildmode=pie \
7375
-o ${OUTPUT} \
7476
-installsuffix "static" \
7577
-ldflags "${LDFLAGS}" \

0 commit comments

Comments
 (0)