-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nameref does not work with nested bases #662
Comments
The reference to the secret appears in a base that does not define the secret. If you create the secret in |
@sethpollack It should work. Can you try version 1.0.11? |
@Liujingfang1 Ok you are correct. The issue is not the nested bases, it breaks when you add a namePrefix.
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
@sethpollack, @jcassee is right - adding a generator to the base, using the same name and merging from higher-level layers works, even if
|
@sethpollack @Liujingfang1 PR 1378 is solving the issue Reproduce the environment here When issuing 3.0.3 $HOME/bin/kustomize.3.0.3 build . apiVersion: v1
data:
HELLO: d29ybGQ=
kind: Secret
metadata:
name: example-5cm72hhtk8
type: Opaque
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: foo-example
spec:
template:
spec:
containers:
- envFrom:
- secretRef:
name: example
image: example
name: example When using 3.0.3 + PR1378 $HOME/bin/kustomize.PR1378 build . apiVersion: v1
data:
HELLO: d29ybGQ=
kind: Secret
metadata:
name: example-5cm72hhtk8
type: Opaque
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: foo-example
spec:
template:
spec:
containers:
- envFrom:
- secretRef:
name: example-5cm72hhtk8
image: example
name: example |
@valer-cara I think that PR. If we use your example, without the PR the configMapRef is wrong and does not contain the hash. With the PR the configMapRef is correct. $HOME/bin/kustomize.3.0.3 build . apiVersion: v1
data:
password: "123456"
kind: ConfigMap
metadata:
name: yyy-bkfmbb8t66
---
apiVersion: v1
data:
password: MTIzNDU2OTk5OTk=
kind: Secret
metadata:
annotations: {}
labels: {}
name: lalala-xxx-ctd2ckb7h7
type: Opaque
---
kind: Deployment
metadata:
name: lalala-foobar
spec:
template:
spec:
containers:
- envFrom:
- secretRef:
name: lalala-xxx-ctd2ckb7h7
- configMapRef:
name: yyy
image: busybox
name: foobar $HOME/bin/kustomize.PR1378 build . apiVersion: v1
data:
password: "123456"
kind: ConfigMap
metadata:
name: yyy-bkfmbb8t66
---
apiVersion: v1
data:
password: MTIzNDU2OTk5OTk=
kind: Secret
metadata:
annotations: {}
labels: {}
name: lalala-xxx-ctd2ckb7h7
type: Opaque
---
kind: Deployment
metadata:
name: lalala-foobar
spec:
template:
spec:
containers:
- envFrom:
- secretRef:
name: lalala-xxx-ctd2ckb7h7
- configMapRef:
name: yyy-bkfmbb8t66
image: busybox
name: foobar |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Got bitten by this, anyone got a workaround? |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The output looks like this
It should look like this
The text was updated successfully, but these errors were encountered: