mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-09-15 12:18:57 +00:00
Add variable reference to container env
This commit is contained in:
@@ -89,7 +89,7 @@ The patch has following content
|
|||||||
> - name: wordpress
|
> - name: wordpress
|
||||||
> env:
|
> env:
|
||||||
> - name: WORDPRESS_DB_HOST
|
> - name: WORDPRESS_DB_HOST
|
||||||
> value: mysql
|
> value: $(MYSQL_SERVICE)
|
||||||
> - name: WORDPRESS_DB_PASSWORD
|
> - name: WORDPRESS_DB_PASSWORD
|
||||||
> valueFrom:
|
> valueFrom:
|
||||||
> secretKeyRef:
|
> secretKeyRef:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
- name: wordpress
|
- name: wordpress
|
||||||
env:
|
env:
|
||||||
- name: WORDPRESS_DB_HOST
|
- name: WORDPRESS_DB_HOST
|
||||||
value: mysql
|
value: $(MYSQL_SERVICE)
|
||||||
- name: WORDPRESS_DB_PASSWORD
|
- name: WORDPRESS_DB_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
|||||||
@@ -58,6 +58,26 @@ func NewRefVarTransformer(vars map[string]string) (Transformer, error) {
|
|||||||
GroupVersionKind: &schema.GroupVersionKind{Kind: "Job"},
|
GroupVersionKind: &schema.GroupVersionKind{Kind: "Job"},
|
||||||
Path: []string{"spec", "template", "spec", "containers", "args"},
|
Path: []string{"spec", "template", "spec", "containers", "args"},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
GroupVersionKind: &schema.GroupVersionKind{Kind: "StatefulSet"},
|
||||||
|
Path: []string{"spec", "template", "spec", "initContainers", "env", "value"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
GroupVersionKind: &schema.GroupVersionKind{Kind: "StatefulSet"},
|
||||||
|
Path: []string{"spec", "template", "spec", "containers", "env", "value"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
GroupVersionKind: &schema.GroupVersionKind{Kind: "Deployment"},
|
||||||
|
Path: []string{"spec", "template", "spec", "initContainers", "env", "value"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
GroupVersionKind: &schema.GroupVersionKind{Kind: "Deployment"},
|
||||||
|
Path: []string{"spec", "template", "spec", "containers", "env", "value"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
GroupVersionKind: &schema.GroupVersionKind{Kind: "Job"},
|
||||||
|
Path: []string{"spec", "template", "spec", "containers", "env", "value"},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user