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

[FEATURE] Allow per-component output inside target #809

Open
Moep90 opened this issue Jan 3, 2022 · 3 comments
Open

[FEATURE] Allow per-component output inside target #809

Moep90 opened this issue Jan 3, 2022 · 3 comments
Assignees

Comments

@Moep90
Copy link
Contributor

Moep90 commented Jan 3, 2022

FEATURE

Whle wng with kapitan, I noticed that having many components inside a target can be tricky to overwatch.
Therfore I would suggest to have some sort of per-component output flag.

Expected behavior

Current Situation

.
├── vault-agent-injector-bundle.yml
├── vault-agent-injector-rbac.yml
├── vault-agent-injector-service.yml
├── vault-bundle.yml
├── vault-config.yml
├── vault-csi-provider-bundle.yml
├── vault-csi-provider-rbac.yml
├── vault-namespace.yml
├── vault-rbac.yml
└── vault-service.yml

Future Idea

.
├── namespace.yml
├── vault
│   ├── vault-bundle.yml
│   ├── vault-config.yml
│   ├── vault-rbac.yml
│   └── vault-service.yml
├── vault-agent-injector
│   ├── vault-agent-injector-bundle.yml
│   ├── vault-agent-injector-rbac.yml
│   └── vault-agent-injector-service.yml
└── vault-csi-provider
    ├── vault-csi-provider-bundle.yml
    └── vault-csi-provider-rbac.yml
parameters:
  kapitan:
    dependencies:
    - type: git
      source: https://github.com/kapicorp/kapitan-reference.git
      ref: master
      subdir: components/generators/kubernetes
      output_path: components/generators/kubernetes
    compile:
    - output_path: manifests/${component_name} <---- PSEUDO
      input_type: kadet
      output_type: yml
      input_paths:
        - components/generators/kubernetes
@ademariag
Copy link
Contributor

ademariag commented Jan 3, 2022

@ramaro by looking at

file_path = os.path.join(compile_path, "%s.%s" % (item_key, output))
, if item_key container a directory path, this should work?

So if I created an object with key "vault/vault-bundle" it should kind of work. Only thing needed would be to create the directory (and validate that we don't do anything nasty like ../../../etc/passwd and shit

@ramaro
Copy link
Member

ramaro commented Jan 4, 2022

This should work but isn't great. We need to look better into better path traversal security before going forward with an official feature. Let me get back to you on that.

@MatteoVoges MatteoVoges self-assigned this Apr 4, 2023
Copy link

This issue is stale because it has been open for 1 year with no activity.
Remove the stale label or comment if this issue is still relevant for you.
If not, please close it yourself.

@github-actions github-actions bot added the Stale label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants