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

Search for multiple class & secret paths #50

Closed
arnisoph opened this issue Mar 30, 2018 · 3 comments
Closed

Search for multiple class & secret paths #50

arnisoph opened this issue Mar 30, 2018 · 3 comments
Labels
enhancement enhancement to an existing feature medium difficulty: medium

Comments

@arnisoph
Copy link

arnisoph commented Mar 30, 2018

Feature request as discussed in #kapitan.

Use Case

We have multiple teams (dev/ops/devops) and one infrastructure team. All of them have dedicated/own Git repositories and CI/CD pipelines to rollout applications on Kubernetes with manifests compile by kapitan. To prevent redundant data in classes we (infrastructure team) want to provide a central CMDB repository that contains shared (reclass) (inventory) classes and secrets.
Git-subtree is used to maintain a local copy of the global/shared CMDB Git repository.

This leads to classes/secrets that are distributed in multiple directories:

$ tree
.
`-- deploy/
    |-- cmdb/
    |   |-- classes/
    |   |   `-- kubernetes/
    |   |       |-- clusters.yml
    |   |       `-- namespaces.yml
    |   `-- secrets/
    |       |-- deploy-key
    |       `-- registry-readonly-key
    `-- kapitan/
        |-- inventory/
        |   |-- classes/
        |   |   `-- abc.yml
        |   `-- targets/
        |       `-- mytarget.yml
        `-- secrets/
            `-- eu-central-1/
                `-- monitoring/
                    `-- oidc_key

Feature Request

We need to tell kapitan to search for multiple classes directories and secrets directories.

Example:

$ cd deploy/kapitan/
$ kapitan compile \
  --class-search-path "classes/:../cmdb/classes/" \
  --secrets-search-path "secrets/:../cmdb/secrets/"

This might obsoletes/collides --search-path (?) and --secrets-path.

@adrianchifor adrianchifor self-assigned this Mar 30, 2018
@adrianchifor
Copy link
Member

Thanks for the request. I'll discuss with @ramaro next week and I'll link a PR once we get the ball rolling.

@adrianchifor adrianchifor added the enhancement enhancement to an existing feature label May 9, 2018
@adrianchifor adrianchifor added this to the 0.17 milestone May 9, 2018
@adrianchifor adrianchifor modified the milestones: 0.17, 0.18 Jun 20, 2018
@adrianchifor adrianchifor removed this from the 0.18 milestone Jul 31, 2018
@uberspot uberspot added the medium difficulty: medium label Jan 24, 2019
@uberspot uberspot added this to To do in Kapitan_Auto_KanBan Jan 24, 2019
@vnzongzna
Copy link
Contributor

Wouldn't making --secret-search search more than one directory be a solution to this? or do we need a separate command for that?

@adrianchifor adrianchifor removed their assignment Feb 24, 2020
@MatteoVoges
Copy link
Contributor

If you still want this feature the external inventory (input_type: external) is the right choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement to an existing feature medium difficulty: medium
Projects
No open projects
Development

No branches or pull requests

5 participants