Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove metrics support #599

Merged

Conversation

deepakkinni
Copy link
Collaborator

What this PR does / why we need it:
The default metrics port is causing issue during velero installation. This change removes metrics support. This is safe since metrics are not being reported in the repo.

Which issue(s) this PR fixes:
Fixes # PR 3471190

Special notes for your reviewer:
None

Testing:

make all
❯ make all
making: datamgr
/Library/Developer/CommandLineTools/usr/bin/make build BIN=data-manager-for-plugin VERSION=topic/deepakkinni/remove_met_add_v1-80def43-13.Jan.2025.11.28.48
skip copying astrolabe as it is not available at /Users/dkinni/go/src/github.com/vmware-tanzu/astrolabe
building: _output/bin/linux/amd64/data-manager-for-plugin
/Library/Developer/CommandLineTools/usr/bin/make shell CMD="-c '\
                GOOS=linux \
                GOARCH=amd64 \
                REGISTRY=dpcpinternal \
                VERSION=topic/deepakkinni/remove_met_add_v1-80def43-13.Jan.2025.11.28.48 \
                PKG=github.com/vmware-tanzu/velero-plugin-for-vsphere \
                BIN=data-manager-for-plugin \
                GIT_SHA=80def4348cd892dd2444753ead789f2b4b40b0a4 \
                GIT_DIRTY=\" M pkg/cmd/backupdriver/cli/server/server.go  M pkg/cmd/constants.go  M pkg/cmd/datamgr/cli/server/server.go\" \
                OUTPUT_DIR=/output/linux/amd64 \
                GO111MODULE=on \
                GOFLAGS=-mod=readonly \
                ./hack/build.sh'"
running docker: shell
docker run \
                --platform linux/amd64 \
                -e GOFLAGS \
                -i -t \
                --rm \
                -u $(id -u):$(id -g) \
                -v $(pwd)/.libs/vmware-vix-disklib-distrib:/usr/local/vmware-vix-disklib-distrib:delegated \
                -v $(pwd)/.go/pkg:/go/pkg:delegated \
                -v $(pwd)/.go/src:/go/src:delegated \
                -v $(pwd)/.go/std:/go/std:delegated \
                -v $(pwd):/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere:delegated \
                -v "$(pwd)/_output/bin:/output:delegated" \
                -v $(pwd)/.go/std/linux/amd64:/usr/local/go/pkg/linux/amd64_static:delegated \
                -v "$(pwd)/.go/go-build:/.cache/go-build:delegated" \
                -e CGO_ENABLED=1 \
                -e GOPATH=/go \
                -w /go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere \
                golang:1.18 \
                /bin/sh -c '    GOOS=linux      GOARCH=amd64    REGISTRY=dpcpinternal   VERSION=topic/deepakkinni/remove_met_add_v1-80def43-13.Jan.2025.11.28.48        PKG=github.com/vmware-tanzu/velero-plugin-for-vsphere   BIN=data-manager-for-plugin     GIT_SHA=80def4348cd892dd2444753ead789f2b4b40b0a4       GIT_DIRTY=" M pkg/cmd/backupdriver/cli/server/server.go  M pkg/cmd/constants.go  M pkg/cmd/datamgr/cli/server/server.go"         OUTPUT_DIR=/output/linux/amd64  GO111MODULE=on  GOFLAGS=-mod=readonly   ./hack/build.sh'
making: backup-driver
/Library/Developer/CommandLineTools/usr/bin/make build BIN=backup-driver VERSION=topic/deepakkinni/remove_met_add_v1-80def43-13.Jan.2025.11.28.48
skip copying astrolabe as it is not available at /Users/dkinni/go/src/github.com/vmware-tanzu/astrolabe
building: _output/bin/linux/amd64/backup-driver
/Library/Developer/CommandLineTools/usr/bin/make shell CMD="-c '\
                GOOS=linux \
                GOARCH=amd64 \
                REGISTRY=dpcpinternal \
                VERSION=topic/deepakkinni/remove_met_add_v1-80def43-13.Jan.2025.11.28.48 \
                PKG=github.com/vmware-tanzu/velero-plugin-for-vsphere \
                BIN=backup-driver \
                GIT_SHA=80def4348cd892dd2444753ead789f2b4b40b0a4 \
                GIT_DIRTY=\" M pkg/cmd/backupdriver/cli/server/server.go  M pkg/cmd/constants.go  M pkg/cmd/datamgr/cli/server/server.go\" \
                OUTPUT_DIR=/output/linux/amd64 \
                GO111MODULE=on \
                GOFLAGS=-mod=readonly \
                ./hack/build.sh'"
running docker: shell
docker run \
                --platform linux/amd64 \
                -e GOFLAGS \
                -i -t \
                --rm \
                -u $(id -u):$(id -g) \
                -v $(pwd)/.libs/vmware-vix-disklib-distrib:/usr/local/vmware-vix-disklib-distrib:delegated \
                -v $(pwd)/.go/pkg:/go/pkg:delegated \
                -v $(pwd)/.go/src:/go/src:delegated \
                -v $(pwd)/.go/std:/go/std:delegated \
                -v $(pwd):/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere:delegated \
                -v "$(pwd)/_output/bin:/output:delegated" \
                -v $(pwd)/.go/std/linux/amd64:/usr/local/go/pkg/linux/amd64_static:delegated \
                -v "$(pwd)/.go/go-build:/.cache/go-build:delegated" \
                -e CGO_ENABLED=1 \
                -e GOPATH=/go \
                -w /go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere \
                golang:1.18 \
                /bin/sh -c '    GOOS=linux      GOARCH=amd64    REGISTRY=dpcpinternal   VERSION=topic/deepakkinni/remove_met_add_v1-80def43-13.Jan.2025.11.28.48        PKG=github.com/vmware-tanzu/velero-plugin-for-vsphere   BIN=backup-driver       GIT_SHA=80def4348cd892dd2444753ead789f2b4b40b0a4        GIT_DIRTY=" M pkg/cmd/backupdriver/cli/server/server.go  M pkg/cmd/constants.go  M pkg/cmd/datamgr/cli/server/server.go"        OUTPUT_DIR=/output/linux/amd64  GO111MODULE=on  GOFLAGS=-mod=readonly   ./hack/build.sh'
making: plugin
/Library/Developer/CommandLineTools/usr/bin/make build BIN=velero-plugin-for-vsphere VERSION=topic/deepakkinni/remove_met_add_v1-80def43-13.Jan.2025.11.28.48
skip copying astrolabe as it is not available at /Users/dkinni/go/src/github.com/vmware-tanzu/astrolabe
building: _output/bin/linux/amd64/velero-plugin-for-vsphere
/Library/Developer/CommandLineTools/usr/bin/make shell CMD="-c '\
                GOOS=linux \
                GOARCH=amd64 \
                REGISTRY=dpcpinternal \
                VERSION=topic/deepakkinni/remove_met_add_v1-80def43-13.Jan.2025.11.28.48 \
                PKG=github.com/vmware-tanzu/velero-plugin-for-vsphere \
                BIN=velero-plugin-for-vsphere \
                GIT_SHA=80def4348cd892dd2444753ead789f2b4b40b0a4 \
                GIT_DIRTY=\" M pkg/cmd/backupdriver/cli/server/server.go  M pkg/cmd/constants.go  M pkg/cmd/datamgr/cli/server/server.go\" \
                OUTPUT_DIR=/output/linux/amd64 \
                GO111MODULE=on \
                GOFLAGS=-mod=readonly \
                ./hack/build.sh'"
running docker: shell
docker run \
                --platform linux/amd64 \
                -e GOFLAGS \
                -i -t \
                --rm \
                -u $(id -u):$(id -g) \
                -v $(pwd)/.libs/vmware-vix-disklib-distrib:/usr/local/vmware-vix-disklib-distrib:delegated \
                -v $(pwd)/.go/pkg:/go/pkg:delegated \
                -v $(pwd)/.go/src:/go/src:delegated \
                -v $(pwd)/.go/std:/go/std:delegated \
                -v $(pwd):/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere:delegated \
                -v "$(pwd)/_output/bin:/output:delegated" \
                -v $(pwd)/.go/std/linux/amd64:/usr/local/go/pkg/linux/amd64_static:delegated \
                -v "$(pwd)/.go/go-build:/.cache/go-build:delegated" \
                -e CGO_ENABLED=1 \
                -e GOPATH=/go \
                -w /go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere \
                golang:1.18 \
                /bin/sh -c '    GOOS=linux      GOARCH=amd64    REGISTRY=dpcpinternal   VERSION=topic/deepakkinni/remove_met_add_v1-80def43-13.Jan.2025.11.28.48        PKG=github.com/vmware-tanzu/velero-plugin-for-vsphere   BIN=velero-plugin-for-vsphere   GIT_SHA=80def4348cd892dd2444753ead789f2b4b40b0a4       GIT_DIRTY=" M pkg/cmd/backupdriver/cli/server/server.go  M pkg/cmd/constants.go  M pkg/cmd/datamgr/cli/server/server.go"         OUTPUT_DIR=/output/linux/amd64  GO111MODULE=on  GOFLAGS=-mod=readonly   ./hack/build.sh'
making: vsphere-astrolabe
/Library/Developer/CommandLineTools/usr/bin/make build BIN=vsphere-astrolabe VERSION=topic/deepakkinni/remove_met_add_v1-80def43-13.Jan.2025.11.28.48
skip copying astrolabe as it is not available at /Users/dkinni/go/src/github.com/vmware-tanzu/astrolabe
building: _output/bin/linux/amd64/vsphere-astrolabe
/Library/Developer/CommandLineTools/usr/bin/make shell CMD="-c '\
                GOOS=linux \
                GOARCH=amd64 \
                REGISTRY=dpcpinternal \
                VERSION=topic/deepakkinni/remove_met_add_v1-80def43-13.Jan.2025.11.28.48 \
                PKG=github.com/vmware-tanzu/velero-plugin-for-vsphere \
                BIN=vsphere-astrolabe \
                GIT_SHA=80def4348cd892dd2444753ead789f2b4b40b0a4 \
                GIT_DIRTY=\" M pkg/cmd/backupdriver/cli/server/server.go  M pkg/cmd/constants.go  M pkg/cmd/datamgr/cli/server/server.go\" \
                OUTPUT_DIR=/output/linux/amd64 \
                GO111MODULE=on \
                GOFLAGS=-mod=readonly \
                ./hack/build.sh'"
running docker: shell
docker run \
                --platform linux/amd64 \
                -e GOFLAGS \
                -i -t \
                --rm \
                -u $(id -u):$(id -g) \
                -v $(pwd)/.libs/vmware-vix-disklib-distrib:/usr/local/vmware-vix-disklib-distrib:delegated \
                -v $(pwd)/.go/pkg:/go/pkg:delegated \
                -v $(pwd)/.go/src:/go/src:delegated \
                -v $(pwd)/.go/std:/go/std:delegated \
                -v $(pwd):/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere:delegated \
                -v "$(pwd)/_output/bin:/output:delegated" \
                -v $(pwd)/.go/std/linux/amd64:/usr/local/go/pkg/linux/amd64_static:delegated \
                -v "$(pwd)/.go/go-build:/.cache/go-build:delegated" \
                -e CGO_ENABLED=1 \
                -e GOPATH=/go \
                -w /go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere \
                golang:1.18 \
                /bin/sh -c '    GOOS=linux      GOARCH=amd64    REGISTRY=dpcpinternal   VERSION=topic/deepakkinni/remove_met_add_v1-80def43-13.Jan.2025.11.28.48        PKG=github.com/vmware-tanzu/velero-plugin-for-vsphere   BIN=vsphere-astrolabe   GIT_SHA=80def4348cd892dd2444753ead789f2b4b40b0a4        GIT_DIRTY=" M pkg/cmd/backupdriver/cli/server/server.go  M pkg/cmd/constants.go  M pkg/cmd/datamgr/cli/server/server.go"        OUTPUT_DIR=/output/linux/amd64  GO111MODULE=on  GOFLAGS=-mod=readonly   ./hack/build.sh'

Unit Test

❯ make test
running docker: shell
docker run \
                --platform linux/amd64 \
                -e GOFLAGS \
                -i -t \
                --rm \
                -u $(id -u):$(id -g) \
                -v $(pwd)/.libs/vmware-vix-disklib-distrib:/usr/local/vmware-vix-disklib-distrib:delegated \
                -v $(pwd)/.go/pkg:/go/pkg:delegated \
                -v $(pwd)/.go/src:/go/src:delegated \
                -v $(pwd)/.go/std:/go/std:delegated \
                -v $(pwd):/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere:delegated \
                -v "$(pwd)/_output/bin:/output:delegated" \
                -v $(pwd)/.go/std/linux/amd64:/usr/local/go/pkg/linux/amd64_static:delegated \
                -v "$(pwd)/.go/go-build:/.cache/go-build:delegated" \
                -e CGO_ENABLED=1 \
                -e GOPATH=/go \
                -w /go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere \
                golang:1.18 \
                /bin/sh -c '     VDDK_LIBS=github.com/vmware-tanzu/velero-plugin-for-vsphere/.libs/vmware-vix-disklib-distrib/lib64      TARGETS=./pkg/...      TIMEOUT=300s      VERBOSE=      DISABLE_CACHE=      RUN_SINGLE_CASE=      hack/test.sh'
Running tests: ./pkg/...
go test ./pkg/... -timeout=300s
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/apis/backupdriver/v1alpha1        [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/apis/datamover/v1alpha1   [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/backupdriver      [no test files]
ok      github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/backuprepository  0.178s
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/builder   [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/buildinfo [no test files]
ok      github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd       0.154s
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/backupdriver  [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/backupdriver/cli/install      [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/backupdriver/cli/server       [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/datamgr       [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/datamgr/cli/install   [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/datamgr/cli/server    [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/common/config     [no test files]
ok      github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/common/vsphere    0.052s
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/constants [no test files]
ok      github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/controller        0.205s
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/dataMover [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/clientset/versioned     [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/clientset/versioned/fake        [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/clientset/versioned/scheme      [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/clientset/versioned/typed/backupdriver/v1alpha1 [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/clientset/versioned/typed/backupdriver/v1alpha1/fake    [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/clientset/versioned/typed/datamover/v1alpha1    [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/clientset/versioned/typed/datamover/v1alpha1/fake       [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/crds    [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/informers/externalversions      [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/informers/externalversions/backupdriver [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/informers/externalversions/backupdriver/v1alpha1        [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/informers/externalversions/datamover    [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/informers/externalversions/datamover/v1alpha1   [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/informers/externalversions/internalinterfaces   [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/listers/backupdriver/v1alpha1   [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/generated/listers/datamover/v1alpha1      [no test files]
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/install   [no test files]
ok      github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/ivd       0.145s
ok      github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/paravirt  0.128s
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/plugin    [no test files]
ok      github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/plugin/util       0.067s
ok      github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/snapshotUtils     0.078s
ok      github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/snapshotmgr       0.068s
?       github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/test      [no test files]
ok      github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/utils     0.063s
Success!


Does this PR introduce a user-facing change?:
NONE


Signed-off-by: Deepak Kinni <[email protected]>
Copy link
Contributor

@xing-yang xing-yang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@xing-yang xing-yang merged commit 33e0a40 into vmware-tanzu:main Jan 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants