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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ARCH ?= $(shell go env GOARCH)
OS ?= $(shell uname -s | tr A-Z a-z)
K8S_LATEST_VER ?= $(shell curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
export CONTROLLER_IMG ?= $(REGISTRY)/$(IMAGE_NAME)
TAG ?= v1.1.0
TAG ?= main

## Tool Binaries
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/controller-gen
Expand All @@ -61,7 +61,7 @@ CLUSTERCTL := $(TOOLS_BIN_DIR)/clusterctl
GOLANGCI_LINT_VERSION := "v2.4.0"
CLUSTERCTL_VERSION := "v1.11.1"

KUSTOMIZE_VER := v5.3.0
KUSTOMIZE_VER := v5.7.0
KUSTOMIZE_BIN := kustomize
KUSTOMIZE := $(abspath $(TOOLS_BIN_DIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER))
KUSTOMIZE_PKG := sigs.k8s.io/kustomize/kustomize/v5
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ spec:
- "--shard-key="
- --capi-onboard-annotation=
- "--v=5"
- "--version=v1.1.0"
- "--version=main"
- "--registry="
- "--agent-in-mgmt-cluster=false"
2 changes: 1 addition & 1 deletion config/default/manager_image_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ spec:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: docker.io/projectsveltos/classifier:v1.1.0
- image: docker.io/projectsveltos/classifier:main
name: manager
2 changes: 1 addition & 1 deletion controllers/classifier_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/builder"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion controllers/classifier_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog/v2/textlogger"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
Expand Down
2 changes: 1 addition & 1 deletion controllers/classifier_deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/cluster-api/util"
"sigs.k8s.io/cluster-api/util/annotations"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
6 changes: 4 additions & 2 deletions controllers/classifier_deployer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog/v2/textlogger"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

Expand Down Expand Up @@ -701,7 +701,9 @@ func prepareCluster() *clusterv1.Cluster {

initialized := true
cluster.Status = clusterv1.ClusterStatus{
ControlPlaneReady: initialized,
Initialization: clusterv1.ClusterInitializationStatus{
ControlPlaneInitialized: &initialized,
},
}
Expect(testEnv.Status().Update(context.TODO(), cluster)).To(Succeed())

Expand Down
2 changes: 1 addition & 1 deletion controllers/classifier_report_collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog/v2/textlogger"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

Expand Down
2 changes: 1 addition & 1 deletion controllers/classifier_transformations.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

corev1 "k8s.io/api/core/v1"
"k8s.io/klog/v2/textlogger"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
Expand Down
2 changes: 1 addition & 1 deletion controllers/classifier_transformations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
Expand Down
2 changes: 1 addition & 1 deletion controllers/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/pkg/errors"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
Expand Down
2 changes: 1 addition & 1 deletion controllers/controllers_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
"k8s.io/klog/v2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/cluster-api/util"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion controllers/keymanager/keymanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

Expand Down
2 changes: 1 addition & 1 deletion controllers/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/go-logr/logr"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/onsi/ginkgo/v2 v2.25.3
github.com/onsi/gomega v1.38.2
github.com/pkg/errors v0.9.1
github.com/projectsveltos/libsveltos v1.1.0
github.com/projectsveltos/libsveltos v1.1.1-0.20250913103127-453f2050df67
github.com/prometheus/client_golang v1.23.2
github.com/spf13/pflag v1.0.10
golang.org/x/text v0.29.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
github.com/projectsveltos/libsveltos v1.1.0 h1:QcBq3emJgUskCtwaX3mNFBg91mrga04zzvWpqTDU10w=
github.com/projectsveltos/libsveltos v1.1.0/go.mod h1:pjM/s2wIcArFEk8uPRroCPNnV4cL/tlNozwb5ehoxhE=
github.com/projectsveltos/libsveltos v1.1.1-0.20250913103127-453f2050df67 h1:NCxWU1p+W0DnXFfgS2FlMhopAOdl83LIvZLmIcN3Vpo=
github.com/projectsveltos/libsveltos v1.1.1-0.20250913103127-453f2050df67/go.mod h1:pjM/s2wIcArFEk8uPRroCPNnV4cL/tlNozwb5ehoxhE=
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
Expand Down
2 changes: 1 addition & 1 deletion internal/test/helpers/external/cluster-api-const.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ package external

const (
clusterAPIGroup = "cluster.x-k8s.io"
clusterAPITestVersion = "v1beta1"
clusterAPITestVersion = "v1beta2"
)
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth"
cliflag "k8s.io/component-base/cli/flag"
"k8s.io/klog/v2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
4 changes: 2 additions & 2 deletions manifest/deployment-agentless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ spec:
- --shard-key=
- --capi-onboard-annotation=
- --v=5
- --version=v1.1.0
- --version=main
- --registry=
- --agent-in-mgmt-cluster=true
command:
- /manager
image: docker.io/projectsveltos/classifier:v1.1.0
image: docker.io/projectsveltos/classifier:main
livenessProbe:
failureThreshold: 3
httpGet:
Expand Down
4 changes: 2 additions & 2 deletions manifest/deployment-shard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ spec:
- --shard-key={{.SHARD}}
- --capi-onboard-annotation=
- --v=5
- --version=v1.1.0
- --version=main
- --registry=
- --agent-in-mgmt-cluster=false
command:
- /manager
image: docker.io/projectsveltos/classifier:v1.1.0
image: docker.io/projectsveltos/classifier:main
livenessProbe:
failureThreshold: 3
httpGet:
Expand Down
4 changes: 2 additions & 2 deletions manifest/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ spec:
- --shard-key=
- --capi-onboard-annotation=
- --v=5
- --version=v1.1.0
- --version=main
- --registry=
- --agent-in-mgmt-cluster=false
command:
- /manager
image: docker.io/projectsveltos/classifier:v1.1.0
image: docker.io/projectsveltos/classifier:main
livenessProbe:
failureThreshold: 3
httpGet:
Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/sveltos-agent-in-mgmt-cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ spec:
- --cluster-namespace=
- --cluster-name=
- --cluster-type=
- --version=v1.1.0
- --version=main
- --current-cluster=management-cluster
- --run-mode=do-not-send-reports
command:
- /manager
image: docker.io/projectsveltos/sveltos-agent@sha256:0653a04650de7be38e3d301d9b252c941b2b179a4b346b6ac0b6753c29256c3d
image: docker.io/projectsveltos/sveltos-agent@sha256:044d2e8f85184c35dabf47e964fbc3b66461cabbb7bf58b1b8bebaee95ab47b4
livenessProbe:
failureThreshold: 3
httpGet:
Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/sveltos-agent-in-mgmt-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ spec:
- --cluster-namespace=
- --cluster-name=
- --cluster-type=
- --version=v1.1.0
- --version=main
- --current-cluster=management-cluster
- --run-mode=do-not-send-reports
command:
- /manager
image: docker.io/projectsveltos/sveltos-agent@sha256:0653a04650de7be38e3d301d9b252c941b2b179a4b346b6ac0b6753c29256c3d
image: docker.io/projectsveltos/sveltos-agent@sha256:044d2e8f85184c35dabf47e964fbc3b66461cabbb7bf58b1b8bebaee95ab47b4
livenessProbe:
failureThreshold: 3
httpGet:
Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/sveltos-agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ spec:
- --cluster-namespace=
- --cluster-name=
- --cluster-type=
- --version=v1.1.0
- --version=main
- --current-cluster=managed-cluster
- --run-mode=do-not-send-reports
command:
- /manager
image: docker.io/projectsveltos/sveltos-agent@sha256:0653a04650de7be38e3d301d9b252c941b2b179a4b346b6ac0b6753c29256c3d
image: docker.io/projectsveltos/sveltos-agent@sha256:044d2e8f85184c35dabf47e964fbc3b66461cabbb7bf58b1b8bebaee95ab47b4
livenessProbe:
failureThreshold: 3
httpGet:
Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/sveltos-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,12 @@ spec:
- --cluster-namespace=
- --cluster-name=
- --cluster-type=
- --version=v1.1.0
- --version=main
- --current-cluster=managed-cluster
- --run-mode=do-not-send-reports
command:
- /manager
image: docker.io/projectsveltos/sveltos-agent@sha256:0653a04650de7be38e3d301d9b252c941b2b179a4b346b6ac0b6753c29256c3d
image: docker.io/projectsveltos/sveltos-agent@sha256:044d2e8f85184c35dabf47e964fbc3b66461cabbb7bf58b1b8bebaee95ab47b4
livenessProbe:
failureThreshold: 3
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/sveltos-applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ spec:
- --cluster-type=
- --secret-with-kubeconfig=
- --v=5
- --version=v1.1.0
- --version=main
command:
- /manager
env:
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/sveltos-applier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ spec:
- --cluster-type=
- --secret-with-kubeconfig=
- --v=5
- --version=v1.1.0
- --version=main
command:
- /manager
env:
Expand Down
4 changes: 2 additions & 2 deletions test/fv/fv_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/util/retry"
"k8s.io/klog/v2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

Expand Down Expand Up @@ -252,7 +252,7 @@ func verifyCAPICluster() {
currentLabels[key] = value
currentCluster.Labels = currentLabels
paused := false
currentCluster.Spec.Paused = paused
currentCluster.Spec.Paused = &paused

return k8sClient.Update(context.TODO(), currentCluster)
})
Expand Down
2 changes: 1 addition & 1 deletion test/fv/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/client-go/util/retry"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/cluster-api/util"
"sigs.k8s.io/controller-runtime/pkg/client"

Expand Down