Merge pull request #565 from zoncoen/name-suffix-3

Update docs, examples, comments, and test data for nameSuffix
This commit is contained in:
k8s-ci-robot
2018-11-29 08:13:42 -08:00
committed by GitHub
14 changed files with 43 additions and 22 deletions

View File

@@ -2,3 +2,4 @@ resources:
- serviceaccount.yaml
- rolebinding.yaml
namePrefix: base-
nameSuffix: -suffix

View File

@@ -2,6 +2,7 @@ bases:
- ../../base/
namePrefix: a-
nameSuffix: -suffixA
resources:
- serviceaccount.yaml

View File

@@ -2,3 +2,4 @@ bases:
- ../../base/
namePrefix: b-
nameSuffix: -suffixB

View File

@@ -2,3 +2,4 @@ resources:
- serviceaccount.yaml
- rolebinding.yaml
namePrefix: base-
nameSuffix: -suffix

View File

@@ -1,33 +1,33 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: a-base-serviceaccount
name: a-base-serviceaccount-suffix-suffixA
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: b-base-serviceaccount
name: b-base-serviceaccount-suffix-suffixB
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: a-base-rolebinding
name: a-base-rolebinding-suffix-suffixA
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: role
subjects:
- kind: ServiceAccount
name: a-base-serviceaccount
name: a-base-serviceaccount-suffix-suffixA
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: b-base-rolebinding
name: b-base-rolebinding-suffix-suffixB
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: role
subjects:
- kind: ServiceAccount
name: b-base-serviceaccount
name: b-base-serviceaccount-suffix-suffixB

View File

@@ -2,3 +2,4 @@ bases:
- ../../base/
namePrefix: a-
nameSuffix: -suffixA

View File

@@ -2,3 +2,4 @@ bases:
- ../../base/
namePrefix: b-
nameSuffix: -suffixB

View File

@@ -25,7 +25,7 @@ type Json6902 struct {
// applied to. It must refer to a Kubernetes resource under the
// purview of this kustomization. Target should use the
// raw name of the object (the name specified in its YAML,
// before addition of a namePrefix).
// before addition of a namePrefix and a nameSuffix).
Target *Target `json:"target" yaml:"target"`
// relative file path for a json patch file inside a kustomization

View File

@@ -17,8 +17,9 @@ limitations under the License.
package types
import (
"sigs.k8s.io/kustomize/pkg/gvk"
"strings"
"sigs.k8s.io/kustomize/pkg/gvk"
)
// Var represents a variable whose value will be sourced
@@ -31,7 +32,7 @@ type Var struct {
// ObjRef must refer to a Kubernetes resource under the
// purview of this kustomization. ObjRef should use the
// raw name of the object (the name specified in its YAML,
// before addition of a namePrefix).
// before addition of a namePrefix and a nameSuffix).
ObjRef Target `json:"objref" yaml:"objref"`
// FieldRef refers to the field of the object referred to by