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: Configurable "MountPath" for playbook cmd in "Pod Template" of ClusterOperation job #1462

Open
geneliu opened this issue Feb 3, 2025 · 1 comment
Assignees

Comments

@geneliu
Copy link

geneliu commented Feb 3, 2025

1 Code requirement

Kubean uses hard-coded -i /conf/hosts.yml so there is no way to consume kubespray existing group_vars under inventory

2 observe opensource license

announce license at the beginning of file

3 sign-off your commit

your commit must be signed off

4 Is your feature request related to a problem? Please describe.

The customization under /kubespray/inventory/my-inventory/group_vars can not be used by clusteroperation job (pod)

5 Describe the solution you'd like
Our existing use case is like:

  1. container image is based on kubespray with extra inventory (/kubespray/inventory/my-inventory) contents (group_vars ...)
  2. playbook launch: ansible-playbook -i /kubespray/inventory/my-inventory/hosts.yml cluster.yml -e ...

An ideal solution/feature would be supporting configurable "MountPath":

playbookCmd := "ansible-playbook -i /conf/hosts.yml -b --become-user root -e \"@/conf/group_vars.yml\""

MountPath: "/conf/hosts.yml",

6 Describe alternatives you've considered

multiple vars config to be configured. So the varsConfRef is a list instead.

varsConfRef:
-   namespace: kubean-system
     name: cluster1-all-vars-conf
-   namespace: kubean-system
     name: cluster1-k8s-cluster-vars-conf
-   namespace: kubean-system
     name: cluster1-etcd-vars-conf

7 Additional context

Add any other context or screenshots about the feature request here.

@geneliu geneliu changed the title feature: multiple (e.g. group_vars) varsConfRef support feature: Configurable "MountPath" for playbook cmd in "Pod Template" of ClusterOperation job Feb 3, 2025
@0ekk
Copy link
Member

0ekk commented Feb 8, 2025

It sounds like a good idea, could you like to post a PR to complete this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants