Skip to content
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

kpt fn render should should preserve sub-package path hiearchy #4170

Open
jashandeep-sohi opened this issue Aug 14, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@jashandeep-sohi
Copy link
Contributor

Expected behavior

Given there's a sub-package in the current/root package, I would expect a kpt fn render done in the root package to pass all resources in the sub-package with a internal.config.kubernetes.io/path annotation that includes/prefixes a relative path to the sub-package.

Actual behavior

internal.config.kubernetes.io/path does not contain the path to the sub-package itself. It's relative to the sub-package, i.e. as if kpt fn render was called from that directory.

Information

Using the latest build from main.

Steps to reproduce the behavior

mkdir -p my-pkg my-pkg/sub-pkg

cat <<EOF > my-pkg/Kptfile
apiVersion: kpt.dev/v1
kind: Kptfile
metadata:
  name: my-pkg
  annotations:
    config.kubernetes.io/local-config: "true"
pipeline:
  mutators:
    - exec: tee /dev/fd/2
EOF

cat <<EOF > my-pkg/sub-pkg/Kptfile
apiVersion: kpt.dev/v1
kind: Kptfile
metadata:
  name: sub-pkg
  annotations:
    config.kubernetes.io/local-config: "true"
EOF

pushd my-pkg

kpt fn render --allow-exec --truncate-output=false

Notice that internal.config.kubernetes.io/path for sub-pkg/Kptfile is incorrect.

@jashandeep-sohi jashandeep-sohi added the bug Something isn't working label Aug 14, 2024
@github-project-automation github-project-automation bot moved this to Backlog in kpt Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant