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

defaults: Move Version and HelmRepository from const to var #2441

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ STRIP_DEBUG=-w -s
ifdef DEBUG
STRIP_DEBUG=
endif
GO_BUILD_LDFLAGS ?= $(STRIP_DEBUG) -X 'github.com/cilium/cilium-cli/defaults.CLIVersion=$(VERSION)'

TEST_TIMEOUT ?= 5s
RELEASE_UID ?= $(shell id -u)
Expand All @@ -28,8 +29,7 @@ GOLANGCILINT_VERSION = $(shell golangci-lint version --format short 2>/dev/null)

$(TARGET):
$(GO_BUILD) $(if $(GO_TAGS),-tags $(GO_TAGS)) \
-ldflags "$(STRIP_DEBUG) \
-X 'github.com/cilium/cilium-cli/defaults.CLIVersion=${VERSION}'" \
-ldflags "$(GO_BUILD_LDFLAGS)" \
-o $(TARGET) \
./cmd/cilium

Expand Down Expand Up @@ -62,7 +62,7 @@ local-release: clean
echo Building release binary for $$OS/$$ARCH...; \
test -d release/$$OS/$$ARCH|| mkdir -p release/$$OS/$$ARCH; \
env GOOS=$$OS GOARCH=$$ARCH $(GO_BUILD) $(if $(GO_TAGS),-tags $(GO_TAGS)) \
-ldflags "-w -s -X 'github.com/cilium/cilium-cli/defaults.CLIVersion=${VERSION}'" \
-ldflags "$(GO_BUILD_LDFLAGS)" \
-o release/$$OS/$$ARCH/$(TARGET)$$EXT ./cmd/cilium; \
tar -czf release/$(TARGET)-$$OS-$$ARCH.tar.gz -C release/$$OS/$$ARCH $(TARGET)$$EXT; \
(cd release && sha256sum $(TARGET)-$$OS-$$ARCH.tar.gz > $(TARGET)-$$OS-$$ARCH.tar.gz.sha256sum); \
Expand Down Expand Up @@ -100,3 +100,5 @@ check:
endif

.PHONY: $(TARGET) release local-release install clean test bench check clean-tags tags

-include Makefile.override
12 changes: 6 additions & 6 deletions defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import (
)

const (
// renovate: datasource=github-releases depName=cilium/cilium
Version = "v1.15.2"

CiliumPodSelector = "app.kubernetes.io/part-of=cilium"

AgentContainerName = "cilium-agent"
Expand Down Expand Up @@ -99,9 +96,6 @@ const (

CiliumNoScheduleLabel = "cilium.io/no-schedule"

// HelmRepository specifies Helm repository to download Cilium charts from.
HelmRepository = "https://helm.cilium.io"

// ClustermeshMaxConnectedClusters is the default number of the maximum
// number of clusters that should be allowed to connect to the Clustermesh.
ClustermeshMaxConnectedClusters = 255
Expand All @@ -111,6 +105,12 @@ const (
)

var (
// renovate: datasource=github-releases depName=cilium/cilium
Version = "v1.15.2"

// HelmRepository specifies Helm repository to download Cilium charts from.
HelmRepository = "https://helm.cilium.io"

// CiliumScheduleAffinity is the node affinity to prevent Cilium from being schedule on
// nodes labeled with CiliumNoScheduleLabel.
CiliumScheduleAffinity = []string{
Expand Down
Loading