Skip to content

Commit

Permalink
fix: fixed version of sigs.k8s.io/kubebuilder-declarative-pattern whi…
Browse files Browse the repository at this point in the history
…ch should be used
  • Loading branch information
camilamacedo86 committed May 26, 2020
1 parent f07a014 commit 323a2d2
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 2 deletions.
8 changes: 8 additions & 0 deletions pkg/scaffold/internal/templates/gomod.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,20 @@ func (f *GoMod) SetTemplateDefaults() error {
return nil
}

//nolint:lll
const goModTemplate = `
module {{ .Repo }}
go 1.13
require (
sigs.k8s.io/controller-runtime {{ .ControllerRuntimeVersion }}
)
replace (
// The following module is required for projects which are using addons
// More info: https://github.com/kubernetes-sigs/kubebuilder/issues/1525
sigs.k8s.io/kubebuilder-declarative-pattern => sigs.k8s.io/kubebuilder-declarative-pattern v0.0.0-20200512162422-ce639cbf6d4c
)
`
6 changes: 5 additions & 1 deletion testdata/project-v2-addon/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ require (
k8s.io/apimachinery v0.18.2
k8s.io/client-go v0.18.2
sigs.k8s.io/controller-runtime v0.6.0
sigs.k8s.io/kubebuilder-declarative-pattern v0.0.0-20200512162422-ce639cbf6d4c
sigs.k8s.io/kubebuilder-declarative-pattern v0.0.0-00010101000000-000000000000
)

// The following module is required for projects which are using addons
// More info: https://github.com/kubernetes-sigs/kubebuilder/issues/1525
replace sigs.k8s.io/kubebuilder-declarative-pattern => sigs.k8s.io/kubebuilder-declarative-pattern v0.0.0-20200512162422-ce639cbf6d4c
4 changes: 4 additions & 0 deletions testdata/project-v2-multigroup/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ require (
k8s.io/client-go v0.18.2
sigs.k8s.io/controller-runtime v0.6.0
)

// The following module is required for projects which are using addons
// More info: https://github.com/kubernetes-sigs/kubebuilder/issues/1525
replace sigs.k8s.io/kubebuilder-declarative-pattern => sigs.k8s.io/kubebuilder-declarative-pattern v0.0.0-20200512162422-ce639cbf6d4c
4 changes: 4 additions & 0 deletions testdata/project-v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ require (
k8s.io/client-go v0.18.2
sigs.k8s.io/controller-runtime v0.6.0
)

// The following module is required for projects which are using addons
// More info: https://github.com/kubernetes-sigs/kubebuilder/issues/1525
replace sigs.k8s.io/kubebuilder-declarative-pattern => sigs.k8s.io/kubebuilder-declarative-pattern v0.0.0-20200512162422-ce639cbf6d4c
6 changes: 5 additions & 1 deletion testdata/project-v3-addon/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ require (
k8s.io/apimachinery v0.18.2
k8s.io/client-go v0.18.2
sigs.k8s.io/controller-runtime v0.6.0
sigs.k8s.io/kubebuilder-declarative-pattern v0.0.0-20200512162422-ce639cbf6d4c
sigs.k8s.io/kubebuilder-declarative-pattern v0.0.0-00010101000000-000000000000
)

// The following module is required for projects which are using addons
// More info: https://github.com/kubernetes-sigs/kubebuilder/issues/1525
replace sigs.k8s.io/kubebuilder-declarative-pattern => sigs.k8s.io/kubebuilder-declarative-pattern v0.0.0-20200512162422-ce639cbf6d4c
4 changes: 4 additions & 0 deletions testdata/project-v3-multigroup/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ require (
k8s.io/client-go v0.18.2
sigs.k8s.io/controller-runtime v0.6.0
)

// The following module is required for projects which are using addons
// More info: https://github.com/kubernetes-sigs/kubebuilder/issues/1525
replace sigs.k8s.io/kubebuilder-declarative-pattern => sigs.k8s.io/kubebuilder-declarative-pattern v0.0.0-20200512162422-ce639cbf6d4c
4 changes: 4 additions & 0 deletions testdata/project-v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ require (
k8s.io/client-go v0.18.2
sigs.k8s.io/controller-runtime v0.6.0
)

// The following module is required for projects which are using addons
// More info: https://github.com/kubernetes-sigs/kubebuilder/issues/1525
replace sigs.k8s.io/kubebuilder-declarative-pattern => sigs.k8s.io/kubebuilder-declarative-pattern v0.0.0-20200512162422-ce639cbf6d4c

0 comments on commit 323a2d2

Please sign in to comment.