Implement namespace overriding
This commit is contained in:
parent
a0f705ff6e
commit
e5e2cd7dcb
|
@ -165,7 +165,8 @@ spec:
|
|||
Defaults to false.
|
||||
type: boolean
|
||||
targetNamespace:
|
||||
description: TargetNamespace sets or overrides the kustomization namespace.
|
||||
description: TargetNamespace sets or overrides the namespace in the
|
||||
kustomization.yaml file.
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
type: string
|
||||
|
|
|
@ -76,6 +76,10 @@ func (kg *KustomizeGenerator) WriteFile(dirPath string) (string, error) {
|
|||
}
|
||||
}
|
||||
|
||||
if kg.kustomization.Spec.TargetNamespace != "" {
|
||||
kus.Namespace = kg.kustomization.Spec.TargetNamespace
|
||||
}
|
||||
|
||||
kd, err := yaml.Marshal(kus)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
|
|
@ -196,7 +196,8 @@ string
|
|||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>TargetNamespace sets or overrides the kustomization namespace.</p>
|
||||
<p>TargetNamespace sets or overrides the namespace in the
|
||||
kustomization.yaml file.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -657,7 +658,8 @@ string
|
|||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>TargetNamespace sets or overrides the kustomization namespace.</p>
|
||||
<p>TargetNamespace sets or overrides the namespace in the
|
||||
kustomization.yaml file.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue