k8s-source

command module
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

Kubernetes Source

Installation

Create an API Key in Overmind under Account settings > API Keys

Install the source into your Kubernetes cluster using Helm:

helm repo add overmind https://overmindtech.github.io/k8s-source
helm install overmind-kube-source overmind/overmind-kube-source --set source.apiKey=ovm_api_YOURKEY_HERE

To upgrade:

helm upgrade overmind-kube-source overmind/overmind-kube-source

To uninstall:

helm uninstall overmind-kube-source

NOTE: Currently the source won't appear in your "Sources" list in Overmind since it's running on your infrastructure, not ours. We'll improve this soon.

Support

This source will support all Kubernetes versions that are currently maintained in the kubernetes project. The list can be found here: https://kubernetes.io/releases/

The backends in this package implement the Search() method. The query format that they are expecting is a JSON object with one or more of the following keys, with strings in the corresponding string format:

An example would be:

{
    "labelSelector": "app=wordpress"
}

or

{
    "labelSelector": "environment=production,tier!=frontend",
    "fieldSelector": "metadata.namespace!=default"
}

Other fields can also be set of advanced querying is required, these fields must match the JSON schema for ListOptions: https://pkg.go.dev/k8s.io/apimachinery@v0.19.2/pkg/apis/meta/v1#ListOptions

Development

Testing

The tests for this package rely on having a Kubernetes cluster to interact with. This is handled using kind when the tests are started. Please make sure that you have the required software installed:

IMPORTANT: If you already have kubectl configured and are connected to a cluster, that cluster is what will be used for testing. Resources will be cleaned up with the exception of the testing namespace. If a cluster is not configured, or not available, one will be created (and destroyed) using kind. This behavior may change in the future as I see it being a bit risky as it could accidentally run the tests against a production cluster, though that would be a good way to validate real-world use-cases.

Documentation

Overview

Copyright © 2021 Dylan Ratcliffe

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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