kubesearch

module
v0.1.8-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2021 License: Apache-2.0

README

CI Workflow CodeQL Analysis Go Reference Go Report Card GitHub go.mod Go version of a Go module codecov License

kubesearch


Fulltext search for Kubernetes API objects

The Kubernetes API supports exact matches in order to lookup API objects. For example, the user can fetch a Pod by name or list Pods using labels. In both scenarios, the user must know exactly the name of the Pod or labels of the Pod.

Kubesearch and the client kubectl-search let the user search for relevant API objects without having to know the exact name, namespace, or labels.

Getting started

Include steps to pull a container or install a release.

Usage

Run kubesearch as a stand-alone service
kubesearch
Search for Kubernetes objects using kubectl
kubectl create ns flargle
kubectl run blargle -n flargle --image=nginx:alpine
kubectl run boggle -n flargle --image=nginx:latest
kubectl search blargle
kubectl search flargle
kubectl search nginx
kubectl search \"nginx:alpine\"

API

/v1/search?query=<fulltext query string> # Search using a phrase query by surrounding the query in " (quotes)

To do

  1. Develop a better tokenizer using ANTLR4
  2. Normalize terms to lowercase
  3. Support basic ranked retrieval using term frequency
  4. Support phrase-search (searching for exact phrases which may include token separators)
  5. Index annotations, container names, images names, labels, and volume names
  6. Index arbitrary object fields
  7. Make indexable fields configurable
  8. Use a treap

Directories

Path Synopsis
cmd
kubectl-search
Package main provides the CLI entrypoint for the kubectl plugin kubectl-search; nothing else.
Package main provides the CLI entrypoint for the kubectl plugin kubectl-search; nothing else.
kubesearch
Package main provides the CLI entrypoint for kubesearch; nothing else.
Package main provides the CLI entrypoint for kubesearch; nothing else.
search
api
Package api provides the API for searching for Kubernetes objects.
Package api provides the API for searching for Kubernetes objects.
app
controller
Package controller provides a Kubernetes controller that watches for changes to Kubernetes objects and updates the an inverted index with those changes.
Package controller provides a Kubernetes controller that watches for changes to Kubernetes objects and updates the an inverted index with those changes.
index
Package index provides an inverted index that supports fulltext search.
Package index provides an inverted index that supports fulltext search.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL