Skip to content

Commit 48b7234

Browse files
authored
Deprecate addon InstallNamespace in v1alpha1 (#397)
Signed-off-by: Qing Hao <[email protected]>
1 parent 3b7c6be commit 48b7234

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ RUNTIME ?= podman
4141
RUNTIME_IMAGE_NAME ?= openshift-api-generator
4242

4343
verify-gocilint:
44-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.6
44+
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0
4545
go vet ./...
4646
${GOPATH}/bin/golangci-lint run --timeout=3m ./...
4747

addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ spec:
8686
installNamespace:
8787
default: open-cluster-management-agent-addon
8888
description: |-
89+
Deprecated: Use AddonDeploymentConfig instead.
8990
installNamespace is the namespace on the managed cluster to install the addon agent.
9091
If it is not set, open-cluster-management-agent-addon namespace is used to install the addon agent.
9192
maxLength: 63

addon/v1alpha1/types_managedclusteraddon.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ type ManagedClusterAddOn struct {
3434
// ManagedClusterAddOnSpec defines the install configuration of
3535
// an addon agent on managed cluster.
3636
type ManagedClusterAddOnSpec struct {
37+
// Deprecated: Use AddonDeploymentConfig instead.
3738
// installNamespace is the namespace on the managed cluster to install the addon agent.
3839
// If it is not set, open-cluster-management-agent-addon namespace is used to install the addon agent.
3940
// +optional

test/integration/api/managedclusteraddon_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ var _ = ginkgo.Describe("ManagedClusterAddOn API test", func() {
5757
metav1.GetOptions{},
5858
)
5959
gomega.Expect(err).ToNot(gomega.HaveOccurred())
60-
gomega.Expect(mca.Spec.InstallNamespace).To(gomega.BeEquivalentTo(testNamespace))
60+
gomega.Expect(mca.Spec.InstallNamespace).To(gomega.BeEquivalentTo(testNamespace)) //nolint:staticcheck
6161
})
6262

6363
ginkgo.It("Should create a ManagedClusterAddOn with empty spec", func() {
@@ -81,7 +81,7 @@ var _ = ginkgo.Describe("ManagedClusterAddOn API test", func() {
8181
metav1.GetOptions{},
8282
)
8383
gomega.Expect(err).ToNot(gomega.HaveOccurred())
84-
gomega.Expect(mca.Spec.InstallNamespace).To(gomega.BeEquivalentTo("open-cluster-management-agent-addon"))
84+
gomega.Expect(mca.Spec.InstallNamespace).To(gomega.BeEquivalentTo("open-cluster-management-agent-addon")) //nolint:staticcheck
8585
})
8686

8787
ginkgo.It("Should update the ManagedClusterAddOn status without config", func() {
@@ -191,7 +191,7 @@ var _ = ginkgo.Describe("ManagedClusterAddOn API test", func() {
191191
metav1.GetOptions{},
192192
)
193193
gomega.Expect(err).ToNot(gomega.HaveOccurred())
194-
gomega.Expect(mca.Spec.InstallNamespace).To(gomega.BeEquivalentTo(testNamespace))
194+
gomega.Expect(mca.Spec.InstallNamespace).To(gomega.BeEquivalentTo(testNamespace)) //nolint:staticcheck
195195

196196
mca.Status.ConfigReferences = []addonv1alpha1.ConfigReference{
197197
{

0 commit comments

Comments
 (0)