Skip to content

Commit 1dc8ed9

Browse files
authored
Merge pull request #3483 from kubernetes-sigs/master
🐛 Sync with master to address 2 bug fixes
2 parents 3a3d1d9 + 4f7751a commit 1dc8ed9

File tree

20 files changed

+59
-44
lines changed

20 files changed

+59
-44
lines changed

docs/book/src/component-config-tutorial/testdata/project/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Dockerfile.cross
2020

2121
# editor and IDE paraphernalia
2222
.idea
23+
.vscode
2324
*.swp
2425
*.swo
2526
*~

docs/book/src/component-config-tutorial/testdata/project/config/crd/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ resources:
88
patches:
99
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
1010
# patches here are for enabling the conversion webhook for each CRD
11-
#- patches/webhook_in_projectconfigs.yaml
11+
#- path: patches/webhook_in_projectconfigs.yaml
1212
#+kubebuilder:scaffold:crdkustomizewebhookpatch
1313

1414
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
1515
# patches here are for enabling the CA injection for each CRD
16-
#- patches/cainjection_in_projectconfigs.yaml
16+
#- path: patches/cainjection_in_projectconfigs.yaml
1717
#+kubebuilder:scaffold:crdkustomizecainjectionpatch
1818

1919
# the following config is for teaching kustomize how to do kustomization for CRDs.

docs/book/src/cronjob-tutorial/testdata/project/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Dockerfile.cross
2020

2121
# editor and IDE paraphernalia
2222
.idea
23+
.vscode
2324
*.swp
2425
*.swo
2526
*~

docs/book/src/cronjob-tutorial/testdata/project/config/crd/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ resources:
88
patches:
99
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
1010
# patches here are for enabling the conversion webhook for each CRD
11-
- patches/webhook_in_cronjobs.yaml
11+
- path: patches/webhook_in_cronjobs.yaml
1212
#+kubebuilder:scaffold:crdkustomizewebhookpatch
1313

1414
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
1515
# patches here are for enabling the CA injection for each CRD
16-
- patches/cainjection_in_cronjobs.yaml
16+
- path: patches/cainjection_in_cronjobs.yaml
1717
#+kubebuilder:scaffold:crdkustomizecainjectionpatch
1818

1919
# the following config is for teaching kustomize how to do kustomization for CRDs.

hack/docs/internal/cronjob-tutorial/generate_cronjob.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,12 +581,12 @@ func updateKustomization(sp *Sample) {
581581
// uncomment crd/kustomization
582582
err = pluginutil.UncommentCode(
583583
filepath.Join(sp.ctx.Dir, "config/crd/kustomization.yaml"),
584-
`#- patches/webhook_in_cronjobs.yaml`, `#`)
584+
`#- path: patches/webhook_in_cronjobs.yaml`, `#`)
585585
CheckError("fixing crd/kustomization", err)
586586

587587
err = pluginutil.UncommentCode(
588588
filepath.Join(sp.ctx.Dir, "config/crd/kustomization.yaml"),
589-
`#- patches/cainjection_in_cronjobs.yaml`, `#`)
589+
`#- path: patches/cainjection_in_cronjobs.yaml`, `#`)
590590
CheckError("fixing crd/kustomization", err)
591591
}
592592

pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/kustomization.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ func (f *Kustomization) GetMarkers() []machinery.Marker {
6868
const (
6969
resourceCodeFragment = `- bases/%s_%s.yaml
7070
`
71-
webhookPatchCodeFragment = `#- patches/webhook_in_%s.yaml
71+
webhookPatchCodeFragment = `#- path: patches/webhook_in_%s.yaml
7272
`
73-
caInjectionPatchCodeFragment = `#- patches/cainjection_in_%s.yaml
73+
caInjectionPatchCodeFragment = `#- path: patches/cainjection_in_%s.yaml
7474
`
7575
)
7676

pkg/plugins/golang/declarative/v1/api.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ import (
2020
"errors"
2121
"fmt"
2222

23-
goPluginV3 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3"
24-
2523
"sigs.k8s.io/kubebuilder/v3/pkg/config"
2624
"sigs.k8s.io/kubebuilder/v3/pkg/machinery"
2725
"sigs.k8s.io/kubebuilder/v3/pkg/model/resource"
2826
"sigs.k8s.io/kubebuilder/v3/pkg/plugin"
2927
"sigs.k8s.io/kubebuilder/v3/pkg/plugin/util"
3028
"sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/declarative/v1/scaffolds"
3129
goPluginV2 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v2"
30+
goPluginV3 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3"
3231
)
3332

3433
const (

pkg/plugins/golang/v2/scaffolds/internal/templates/gitignore.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ bin
5959
6060
# editor and IDE paraphernalia
6161
.idea
62+
.vscode
6263
*.swp
6364
*.swo
6465
*~

pkg/plugins/golang/v3/scaffolds/internal/templates/gitignore.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Dockerfile.cross
6161
6262
# editor and IDE paraphernalia
6363
.idea
64+
.vscode
6465
*.swp
6566
*.swo
6667
*~

pkg/plugins/golang/v4/scaffolds/internal/templates/gitignore.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Dockerfile.cross
6060
6161
# editor and IDE paraphernalia
6262
.idea
63+
.vscode
6364
*.swp
6465
*.swo
6566
*~

0 commit comments

Comments
 (0)