Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dag-andersen/kubernetes-reference-highlighter


https://github.com/dag-andersen/kubernetes-reference-highlighter

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

# Kubernetes Reference Highlighter

## Overview
The extension detects and highlights references in manifests based on local manifests, resources in an existing cluster, and resources generated by Kustomize and Helm. The extension continuously validates references in manifests while the developer is typing, and it updates the highlighting in real-time.

The extension only focuses on references between resources and validating if they are correct or not. The extension does not validate if the manifests' syntax is correct or has all the required fields.

## Features

- [ Kubernetes Reference Highlighter](#-kubernetes-reference-highlighter)
- [Overview](#overview)
- [Features](#features)
- [Reference Highlighting](#reference-highlighting)
- [Cluster Scanning](#cluster-scanning)
- [Workspace Scanning](#workspace-scanning)
- [Kustomize Scanning](#kustomize-scanning)
- [Helm Scanning](#helm-scanning)
- [Suggestions](#suggestions)
- [Code Navigation](#code-navigation)
- [Kustomize Build](#kustomize-build)
- [Helm Template](#helm-template)
- [Commands](#commands)
- [Settings](#settings)
- [Issues and feature requests](#issues-and-feature-requests)

### Reference Highlighting

Currently, the extension supports scanning of `Services`, `Pods`, `Deployments`, `StatefulSet`, `Jobs`, `CronJobs`, `Secrets`, and `ConfigMaps`. More resources will be added at a later point.

All resources are namespace-sensitive. A resource will not be highlighted if the resource exists in another namespace.

#### Cluster Scanning

The extension calls the Kubernetes API of the user's current context and collects the names of all the objects the user has access to.



#### Workspace Scanning

The extension will collect the names of all the objects in the manifest files found in the open VSCode workspace.



#### Kustomize Scanning

The extension will run `kustomize build` on all `kustomization`-files in the open workspace and collect the names of all the objects found in the generated kustomize-output.



#### Helm Scanning

The extension will run `helm template` on all helm charts in the open workspace and collect the names of all the objects found in the generated helm-output.



### Suggestions

If a reference is not found, but a reference with a similar name exists, the extension will suggest using that instead.






### Code Navigation

Clicking any filename in one of the hovering boxes will send the user to that file/folder.



### Kustomize Build

The extension will inform the user if the kustomize-file builds or not.




_Note_: If you have [kustomize](https://kustomize.io/) installed as a stand-alone binary in your PATH, the extension will use `kustomize build` instead of `kubectl kustomize`.

### Helm Template

The extension will inform the user if the helm chart builds or not.




## Commands

| VS Code Command | Effect |
| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `Kubernetes Reference Highlighter: Toggle WorkSpace Scanning` | Toggles Workspace Scanning |
| `Kubernetes Reference Highlighter: Toggle Cluster Scanning` | Toggles Cluster Scanning |
| `Kubernetes Reference Highlighter: Toggle Kustomize Scanning` | Toggles Kustomize Scanning |
| `Kubernetes Reference Highlighter: Toggle Helm Scanning` | Toggles Helm Scanning |
| `Kubernetes Reference Highlighter: Toggle Reference Correction Hints` | Toggles Suggestions |
| `Kubernetes Reference Highlighter: Toggle Bi-directional Reference Highlighting` | Toggles Bi-directional Reference Highlighting (Disabling it may increase performance) |

## Settings

| Setting | Default | Effect |
| --------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------- |
| `kubernetesReferenceHighlighter.enableWorkSpaceScanning` | `true` | Toggles Workspace Scanning |
| `kubernetesReferenceHighlighter.enableKustomizeScanning` | `true` | Toggles Kustomize Scanning |
| `kubernetesReferenceHighlighter.enableHelmScanning` | `true` | Toggles Helm Scanning |
| `kubernetesReferenceHighlighter.enableClusterScanning` | `true` | Toggles Cluster Scanning |
| `kubernetesReferenceHighlighter.enableCorrectionHints` | `true` | Toggles Suggestions |
| `kubernetesReferenceHighlighter.enabledBiDirectionalReferences` | `true` | Toggles Bi-directional Reference Highlighting (Disabling it may increase performance) |

## Issues and feature requests

Please open an issue on GitHub if you experience any issues or have ideas for features.