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

Recommend installing the Kubernetes extension if helm chart is detected #464

Open
fbricon opened this issue Mar 29, 2021 · 4 comments
Open

Comments

@fbricon
Copy link
Contributor

fbricon commented Mar 29, 2021

Is your enhancement related to a problem? Please describe.

Some users expect vscode-yaml to support Helm charts, which is actually supported by vscode-kubernetes-tools. See

Describe the solution you would like

Detect the Helm chart syntaxt in a Yaml document. If vscode-kubernetes-tools is not already installed, the display a message recommending to install it.

@ssbarnea
Copy link
Member

That is an interesting subject. I am not sure what is the recommendation mechanism on this as my impression was the vscode itself does recommend other extensions based on what they declare as supporting.

I am inside the same board as creator of vscode-ansible extension which extends vscode-yaml. Obviously I would not mind prompting user to install it when specific files are found inside the repository.

At this moment I am not aware of a programatic way an extension could conditionally recommend other extensions. The only option I seen is to configure recommended extensions at workspace level, meaning that each repository owner is expected to populate them in order to work.

I am curious if someone finds something else that can be used.

@fbricon
Copy link
Contributor Author

fbricon commented Mar 29, 2021

vscode-java recommends the installation of the dependency analytics extension, when opening a pom.xml: redhat-developer/vscode-java@bdacd43

@ssbarnea
Copy link
Member

Super, now we have the code that we can reuse there in a bit more generic form as we will need a list of patterns. For Ansible code, a safe list of patterns would be:

# Recommend zbr.vscode-ansible extension
**/{collections,requirements,molecule,galaxy}.yml
**/{.ansible-lint,.yamllint}
**/playbooks/*.{yml,yaml}
**/{host_vars,group_vars,vars,defaults}/**/*.{yaml,yml}
**/meta/main.{yaml,yml}

The list above is a subset of https://github.com/ansible-community/ansible-lint/blob/master/src/ansiblelint/config.py#L14 but it likely covers >99% of the files.

@jkryanchou
Copy link

Same issues. Is there any solution we could find it out?

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