K8s ConfigMap Navigator: Jump From a ConfigMap Key to the Code That Reads It

I published my first JetBrains plugin, K8s ConfigMap Navigator. It does one job: it connects a key in a Kubernetes ConfigMap to the lines of application code that read that key, and it lets you go back the other way too.
This post covers the problem it solves, what it supports, and how the matching works under the hood.
The problem: a ConfigMap key and its reader live far apart
A ConfigMap is a Kubernetes object that holds plain configuration values for your app. A typical one looks like this:
apiVersion: v1 kind: ConfigMap metadata: name: orders-config namespace: prod data: MY_APP_CONNECT_TIMEOUT: "3000" MY_APP_BASE_URL: "https://api.example.com" Kubernetes injects these values into the container as environment variables. Your application then reads them somewhere in the code.
Now imagine you need to change MY_APP_CONNECT_TIMEOUT, or you want to know if it is safe to delete it. You have to find who reads it. In a small repo you search for the key and you are done. In a real codebase, plain text search starts to miss things.
The reason is name conversion. Spring Boot, for example, uses something called relaxed binding. It means one setting can be written in several shapes and Spring treats them as the same thing. All of these point to the same value:
MY_APP_CONNECT_TIMEOUT (environment variable, in the ConfigMap) my.app.connect-timeout (application.yml, kebab case) my.app.connectTimeout (camel case) my.app.connect_timeout (snake case) So the code that actually consumes the ConfigMap key may look like this:
@Value("${my.app.connect-timeout:3000}") private int connectTimeout; Searching for MY_APP_CONNECT_TIMEOUT will not find that line. Searching for connect-timeout will not find a @ConfigurationProperties class that has a connectTimeout field. And if the service is written in Go, Python or Node.js, the lookup looks different again.
What the plugin does
K8s ConfigMap Navigator adds navigation in both directions.
From a ConfigMap key to its usages. Open the ConfigMap YAML and you get a gutter icon next to each data: key. Click it, or Ctrl+Click (Cmd+Click on macOS), and you jump to the code and config files that read that key. You can also put the cursor on the key and run the IDE's own Find Usages (Alt+F7), so the results show up in the normal Find tool window.
From code back to the ConfigMap. In the application code or in application.yml, a gutter icon takes you to the matching ConfigMap entries. If the same key exists in more than one ConfigMap, for example a prod and a staging one, the popup lists each match with its namespace and a preview of the value.
What it understands
The plugin is not tied to one framework. Here is what it detects today:
- Java and Kotlin (Spring Boot, Quarkus, Micronaut):
@Value("${...}")including multiple placeholders and SpEL,@ConfigurationProperties(prefix = ...)on classes, records, Kotlin data classes and nested classes,@ConfigProperty(name = ...)from Quarkus and MicroProfile,Environment.getProperty(...),System.getenv(...)andSystem.getProperty(...). - Spring config files:
application*.yml,application*.propertiesandbootstrap*files, both${...}placeholders and direct property overrides. - Node.js, TypeScript, JavaScript:
process.env.KEY,process.env["KEY"],import.meta.env.KEY. - Python:
os.getenv("KEY"),os.environ["KEY"],os.environ.get("KEY"). - Go:
os.Getenv("KEY"),os.LookupEnv("KEY"), and Viper calls such asviper.GetString("my.key"). - C# and .NET:
Environment.GetEnvironmentVariable("KEY"). - Rust:
env::var("KEY"),env::var_os("KEY"). - PHP:
getenv("KEY"),$_ENV["KEY"],$_SERVER["KEY"]. - Ruby:
ENV["KEY"],ENV.fetch("KEY"). - Config files:
.envand.env.*, YAML,.properties, TOML, and${KEY}placeholders inside JSON.
It runs in IntelliJ IDEA (Community and Ultimate), PyCharm, GoLand, WebStorm, Rider, PhpStorm and RustRover, version 2024.3 and newer.
How the matching works
The core of the plugin is a small Kotlin object called PropertyKeyNormalizer. It answers one question: do these two key names refer to the same setting?
It works in two steps.
Step 1: a canonical form for fast lookup. Every key is reduced to lowercase letters and digits only. Separators like ., _ and - are dropped, and array brackets keep only the index number.
fun canonicalize(rawKey: String): String { val trimmed = rawKey.trim() if (trimmed.isEmpty()) return "" val withIndices = ARRAY_INDEX_REGEX.replace(trimmed, "$1") val sb = StringBuilder(withIndices.length) for (ch in withIndices) { if (ch.isLetterOrDigit()) { sb.append(ch.lowercaseChar()) } } return sb.toString() } With that, MY_APP_CONNECT_TIMEOUT, my.app.connect-timeout and my.app.connectTimeout all become myappconnecttimeout. MY_LIST_0_NAME and my.list[0].name both become mylist0name. The plugin builds an index of ConfigMap entries keyed by this canonical string, so a lookup is a single map access instead of a scan of every YAML file.
Step 2: a stricter check on the candidates. A canonical match alone is too loose. Two unrelated keys can collapse to the same letters. So the plugin also splits each key into tokens, on separators and on camelCase boundaries, and compares them. my.app.connectTimeout becomes [my, app, connect, timeout], which lines up with the tokens of MY_APP_CONNECT_TIMEOUT.
fun matches(configMapKey: String, springKey: String): Boolean { val c1 = canonicalize(configMapKey) val c2 = canonicalize(springKey) if (c1.isEmpty() || c1 != c2) return false val t1 = tokenize(configMapKey) val t2 = tokenize(springKey) if (t1 == t2) return true return isEnvStyle(configMapKey) || isEnvStyle(springKey) || t1.size == t2.size } The last line is a deliberate allowance. Environment-variable style keys (all uppercase) are accepted when the canonical forms match, because an env name like MY_APP_URL can legally map to my.appUrl, where the token counts differ.
Relaxed binding can be turned off in the settings if you want exact key matches only.
Finding the usages in non-JVM code
For Java and Kotlin, the plugin reads the code through the IDE's UAST layer, which gives it real annotations and method calls instead of raw text. For the other languages it uses a set of focused regular expressions, one rule per lookup style. For example, the Go rule:
// Go: os.Getenv("MY_KEY") / os.LookupEnv("MY_KEY") PatternRule( Regex("""\bos\.(?:Getenv|LookupEnv)\s*\(\s*["`]([^"`]+)["`]"""), UsageKind.ENV_VAR_CALL ) This is what lets one plugin work in PyCharm or GoLand, where the Java support is not available. The Java and properties parts are loaded as optional modules, so the plugin still installs cleanly in IDEs that do not have them.
Where your ConfigMaps live
ConfigMaps are often not in the same repository as the service. Many teams keep them in a separate GitOps repo or a k8s/ folder in a monorepo. The plugin scans all .yaml and .yml files in the open project by default and only indexes documents whose kind is ConfigMap. For a separate repo, you can add extra folders under Settings > Tools > K8s ConfigMap Navigator, both for external ConfigMap directories and for external application directories.
The index is cached and rebuilt when files change, so the gutter icons stay current while you edit.
Privacy
Everything runs locally inside the IDE. The plugin makes no network calls and collects no telemetry.
Try it
- Install from the IDE: Settings > Plugins > Marketplace, search for "K8s ConfigMap Navigator".
- Marketplace page: https://plugins.jetbrains.com/plugin/36296-k8s-configmap-navigator
- Source code (MIT license): https://github.com/jamilxt/k8s-configmap-navigator
It is version 1.0.1, so there are surely lookup styles it does not catch yet. If your stack reads configuration in a way the plugin misses, open an issue on GitHub with a short code sample, and it can be added as a new rule.
Which ConfigMap lookup pattern in your codebase would you want supported next?

