Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 5a8fc7f

Browse files
committed
Remove separate ldflags for capp-e2e
We're going to add an env override for useragent tracking for things like this in the future. The ldflags method was causing problems. Also moving the built in client and ua formatting back to constants. Signed-off-by: Chris Privitere <[email protected]>
1 parent 0e32271 commit 5a8fc7f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ E2E_DIR ?= $(REPO_ROOT)/test/e2e
148148
KUBETEST_CONF_PATH ?= $(abspath $(E2E_DIR)/data/kubetest/conformance.yaml)
149149
E2E_CONF_FILE_SOURCE ?= $(E2E_DIR)/config/packet-ci.yaml
150150
E2E_CONF_FILE ?= $(E2E_DIR)/config/packet-ci-envsubst.yaml
151-
E2E_LD_FLAGS ?= "-X 'sigs.k8s.io/cluster-api-provider-packet/pkg/cloud/packet.clientName=capp-e2e' -X 'sigs.k8s.io/cluster-api-provider-packet/pkg/cloud/packet.clientUAFormat=capp-e2e/%s %s'"
152151

153152
.PHONY: $(E2E_CONF_FILE)
154153
$(E2E_CONF_FILE): $(ENVSUBST) $(E2E_CONF_FILE_SOURCE)
@@ -160,7 +159,6 @@ run-e2e-tests: $(KUBECTL) $(KUSTOMIZE) $(KIND) $(GINKGO) $(E2E_CONF_FILE) e2e-te
160159
$(MAKE) set-manifest-image MANIFEST_IMG=$(REGISTRY)/$(IMAGE_NAME) MANIFEST_TAG=$(TAG)
161160
$(MAKE) set-manifest-pull-policy PULL_POLICY=IfNotPresent
162161
cd test/e2e; time $(GINKGO) -v -trace -progress -v -tags=e2e \
163-
-ldflags $(E2E_LD_FLAGS) \
164162
--randomizeAllSpecs -race $(GINKGO_ADDITIONAL_ARGS) \
165163
-focus=$(GINKGO_FOCUS) -skip=$(GINKGO_SKIP) \
166164
-nodes=$(GINKGO_NODES) --noColor=$(GINKGO_NOCOLOR) \

pkg/cloud/packet/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ import (
3737
)
3838

3939
const (
40+
clientName = "CAPP-v1beta1"
41+
clientUAFormat = "cluster-api-provider-packet/%s %s"
4042
apiTokenVarName = "PACKET_API_KEY" //nolint:gosec
4143
ipxeOS = "custom_ipxe"
4244
envVarLocalASN = "METAL_LOCAL_ASN"
@@ -45,8 +47,6 @@ const (
4547
)
4648

4749
var (
48-
clientName = "CAPP-v1beta1"
49-
clientUAFormat = "cluster-api-provider-packet/%s %s"
5050
ErrControlPlanEndpointNotFound = errors.New("control plane not found")
5151
ErrElasticIPQuotaExceeded = errors.New("could not create an Elastic IP due to quota limits on the account, please contact Equinix Metal support")
5252
ErrInvalidIP = errors.New("invalid IP")

0 commit comments

Comments
 (0)