Skip to content
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Pin Liqo and liqoctl to `v0.0.0-50a39cf9` (`oci://harbor.noderings.com/nrings/liqo:0.0.0-50a39cf9`). This is upstream Liqo `50a39cf`. Custom-resource reflection uses server-side apply, so provider Kopf annotations and finalizers stay in place.
- Pin Liqo and liqoctl to `v0.0.0-6870864e` (`oci://harbor.noderings.com/nrings/liqo:0.0.0-6870864e`). This is the build running on neo. A provider that does not serve one custom resource no longer blocks reflection of the others.

## [1.0.20] - 2026-11-24

Expand Down
6 changes: 3 additions & 3 deletions configs/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ calico:
min_version: "v3.26.0"

liqo:
version: "v0.0.0-50a39cf9"
version: "v0.0.0-6870864e"
timeout: "10m"
gw_service_type: "NodePort"
gw_server_service_location: "Provider"
pod_offloading_strategy: "Local"
pod_cidr: "10.200.0.0/16"
service_cidr: "10.201.0.0/16"
min_version: "v0.0.0-50a39cf9"
min_version: "v0.0.0-6870864e"
chart_oci: "oci://harbor.noderings.com/nrings/liqo"
chart_version: "0.0.0-50a39cf9"
chart_version: "0.0.0-6870864e"
proxy_url: "" # Optional proxy URL for liqo peer command
api_server_url: "" # Optional; defaults to https://<agent-ip>:6443 during registration
gw_server_service_nodeport: "" # Optional UDP NodePort for liqoctl peer
Expand Down
26 changes: 15 additions & 11 deletions internal/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ func (c *Client) DoWithAutoRefresh(ctx context.Context, maxRetries uint, fn func

// Execute with retry logic
err = c.WithRetry(ctx, maxRetries, func() error {
// Make the API call
// Snapshot the token this attempt will send. Reading it after a 401
// returns can already observe another goroutine's refresh.
sentToken := c.GetToken()
var callErr error
resp, callErr = fn()
if callErr != nil {
Expand All @@ -266,17 +268,19 @@ func (c *Client) DoWithAutoRefresh(ctx context.Context, maxRetries uint, fn func
// Close the response body before refreshing
_ = resp.Body.Close()

// Refresh token
newToken, refreshErr := c.refreshFunc(ctx)
if refreshErr != nil {
// If refresh fails, mark as unrecoverable (don't retry)
// This typically means refresh token is invalid/expired
// The error message from refreshFunc already includes re-authentication instructions
return retry.Unrecoverable(fmt.Errorf("token refresh failed: %w", refreshErr))
if c.GetToken() == sentToken {
// Refresh token
newToken, refreshErr := c.refreshFunc(ctx)
if refreshErr != nil {
// If refresh fails, mark as unrecoverable (don't retry)
// This typically means refresh token is invalid/expired
// The error message from refreshFunc already includes re-authentication instructions
return retry.Unrecoverable(fmt.Errorf("token refresh failed: %w", refreshErr))
}

// Update token in client
c.SetToken(newToken)
}

// Update token in client
c.SetToken(newToken)
refreshed = true

// Retry the original request with new token
Expand Down
4 changes: 2 additions & 2 deletions internal/config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ const (
DefaultHarborPublicProject = "nrings"

// DefaultLiqoVersion is the default Liqo / liqoctl version pin.
DefaultLiqoVersion = "v0.0.0-50a39cf9"
DefaultLiqoVersion = "v0.0.0-6870864e"
// DefaultLiqoChartVersion is the Helm chart version (no leading v).
DefaultLiqoChartVersion = "0.0.0-50a39cf9"
DefaultLiqoChartVersion = "0.0.0-6870864e"
// DefaultLiqoChartOCI is the OCI chart reference (without version tag).
DefaultLiqoChartOCI = "oci://" + DefaultHarborRegistry + "/" + DefaultHarborPublicProject + "/liqo"
// DefaultLiqoctlOCIRepo is the OCI project/repo prefix for liqoctl artifacts.
Expand Down
10 changes: 5 additions & 5 deletions internal/install/prerequisites_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ func TestNewToolValidatorUsesPlatformPins(t *testing.T) {
Components: map[string]api.ComponentPin{
api.ComponentLiqoctl: {
Name: api.ComponentLiqoctl,
Version: "v0.0.0-50a39cf9",
MinVersion: "v0.0.0-50a39cf9",
Version: "v0.0.0-6870864e",
MinVersion: "v0.0.0-6870864e",
},
api.ComponentHelm: {
Name: api.ComponentHelm,
Expand All @@ -24,8 +24,8 @@ func TestNewToolValidatorUsesPlatformPins(t *testing.T) {
}

v := NewToolValidator(pins, nil)
if got := v.requirements["liqoctl"].MinVersion; got != "0.0.0-50a39cf9" {
t.Fatalf("liqoctl min = %q, want 0.0.0-50a39cf9", got)
if got := v.requirements["liqoctl"].MinVersion; got != "0.0.0-6870864e" {
t.Fatalf("liqoctl min = %q, want 0.0.0-6870864e", got)
}
if got := v.requirements["helm"].MinVersion; got != "3.12.0" {
t.Fatalf("helm min = %q, want 3.12.0", got)
Expand All @@ -45,7 +45,7 @@ func TestNewToolValidatorFallsBackToConfigLiqoPin(t *testing.T) {

func TestValidateVersionForkPin(t *testing.T) {
v := NewValidator()
ok, err := v.validateVersion("Client version: v0.0.0-50a39cf9", "0.0.0-50a39cf9")
ok, err := v.validateVersion("Client version: v0.0.0-6870864e", "0.0.0-6870864e")
if err != nil {
t.Fatalf("validateVersion: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/install/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ func parseOCIChartRef(ref string) (repo, version string) {
return "", ""
}
withoutScheme := strings.TrimPrefix(ref, "oci://")
// harbor.noderings.com/nrings/liqo:0.0.0-50a39cf9
// harbor.noderings.com/nrings/liqo:0.0.0-6870864e
if i := strings.LastIndex(withoutScheme, ":"); i > 0 {
hostPath := withoutScheme[:i]
ver := withoutScheme[i+1:]
Expand Down
14 changes: 7 additions & 7 deletions internal/install/tools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ func TestDeriveToolDownloadURL(t *testing.T) {
{
name: "liqoctl",
tool: "liqoctl",
version: "v0.0.0-50a39cf9",
version: "v0.0.0-6870864e",
goos: "linux",
goarch: "amd64",
want: "oci://harbor.noderings.com/nrings/liqoctl-linux-amd64:v0.0.0-50a39cf9",
want: "oci://harbor.noderings.com/nrings/liqoctl-linux-amd64:v0.0.0-6870864e",
},
{
name: "arch normalization",
tool: "liqoctl",
version: "v0.0.0-50a39cf9",
version: "v0.0.0-6870864e",
goos: "linux",
goarch: "aarch64",
want: "oci://harbor.noderings.com/nrings/liqoctl-linux-arm64:v0.0.0-50a39cf9",
want: "oci://harbor.noderings.com/nrings/liqoctl-linux-arm64:v0.0.0-6870864e",
},
{
name: "override wins",
Expand Down Expand Up @@ -321,9 +321,9 @@ func TestVersionSatisfiesTable(t *testing.T) {
{"v1.0.0", "", "v1.0.0", true},
{"v0.9.0", "v1.1.1", "v1.0.0", false},
{"", "v1.0.0", "", false},
{"Client version: v0.0.0-50a39cf9", "v0.0.0-50a39cf9", "", true},
{"Client version: v1.1.1", "v0.0.0-50a39cf9", "", false},
{"v1.1.1", "v0.0.0-50a39cf9", "", false},
{"Client version: v0.0.0-6870864e", "v0.0.0-6870864e", "", true},
{"Client version: v1.1.1", "v0.0.0-6870864e", "", false},
{"v1.1.1", "v0.0.0-6870864e", "", false},
}
for _, tc := range cases {
if got := VersionSatisfies(tc.current, tc.required, tc.min); got != tc.want {
Expand Down
Loading