Skip to content

Commit 88aec95

Browse files
committed
remove commented code
update multibases/README.md
1 parent e304014 commit 88aec95

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

examples/multibases/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Demo: multibases with a common base
22

3-
When managing application in different environment, many Kustomize users have seen this scenario. There is a base _Kustomization_ for this application. On top of this base, there are several variants such as dev, staging and production variants. In each of those variants, a different _namePrefix_ is applied. Users sometimes need to create another _kustomization_ compsing all three variants, applying the same _namePrefix_, _commonLables_ or _commonAnnotations_ and deploying them together with one `kubectl` command.
3+
`kustomize` encourages defining multiple variants - e.g. dev, staging and prod, as overlays on a common base.
44

5-
Kustomize supports composing multiple variants like that in the same `kustomization.yaml`. This demo shows how this works with a pod object.
5+
It's possible to create an additional overlay to compose these variants together - just declare the overlays as the bases of a new kustomization.
6+
7+
This is also a means to apply a common label or annotation across the variants, if for some reason the base isn't under your control. It also allows one to define a left-most namePrefix across the variants - something that cannot be done by modifying the common base.
8+
9+
The following demonstrates this using a base that's just one pod.
610

711
Define a place to work:
812

pkg/resource/resid.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@ func NewResId(g schema.GroupVersionKind, n string) ResId {
4646

4747
// String of ResId based on GVK, name and prefix
4848
func (n ResId) String() string {
49-
//var fields []string
50-
//for _, s := range []string{n.gvk.Group, n.gvk.Version, n.gvk.Kind, n.prefix, n.name} {
51-
// if s != "" {
52-
// fields = append(fields, s)
53-
// }
54-
//}
55-
//return strings.Join(fields, "_") + ".yaml"
5649
fields := []string{n.gvk.Group, n.gvk.Version, n.gvk.Kind, n.prefix, n.name}
5750
return strings.Join(fields, "_") + ".yaml"
5851
}

0 commit comments

Comments
 (0)