- Kubernetes 1.16+
- Helm 3.x
- An Overmind API key with
request:receive
scope
Create an API Key with request:receive
scope 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.value=YOUR_API_KEY \
--set source.clusterName=my-cluster-name
helm uninstall overmind-kube-source
helm upgrade overmind-kube-source overmind/overmind-kube-source
The following table lists the configurable parameters and their default values.
Parameter | Description | Default |
---|---|---|
image.repository |
Image repository | ghcr.io/overmindtech/k8s-source |
image.pullPolicy |
Image pull policy | Always |
image.tag |
Image tag (defaults to appVersion) | "" |
imagePullSecrets |
Image pull secrets | [] |
Parameter | Description | Default |
---|---|---|
replicaCount |
Number of replicas | 1 |
nameOverride |
Override chart name | "" |
fullnameOverride |
Override full name | "" |
podAnnotations |
Pod annotations | {} |
podSecurityContext |
Pod security context | {} |
securityContext |
Container security context | {} |
nodeSelector |
Node selector | {} |
tolerations |
Pod tolerations | [] |
affinity |
Pod affinity rules | {} |
Parameter | Description | Default |
---|---|---|
source.log |
Log level (info, debug, trace) | info |
source.apiKey.value |
Direct API key value (not recommended for production) | "" |
source.apiKey.existingSecretName |
Name of existing secret containing API key | "" |
source.app |
Overmind instance URL | https://app.overmind.tech |
source.maxParallel |
Max parallel requests | 20 |
source.rateLimitQPS |
K8s API rate limit QPS | 10 |
source.rateLimitBurst |
K8s API rate limit burst | 30 |
source.clusterName |
Cluster name | "" |
source.honeycombApiKey |
Honeycomb API key | "" |
Parameter | Description | Default |
---|---|---|
autoscaling.enabled |
Enable autoscaling | false |
autoscaling.minReplicas |
Minimum replicas | 1 |
autoscaling.maxReplicas |
Maximum replicas | 3 |
autoscaling.targetCPUUtilizationPercentage |
Target CPU utilization | 80 |
autoscaling.targetMemoryUtilizationPercentage |
Target memory utilization | nil |
source:
apiKey: "your-api-key"
clusterName: "production-cluster"
log: "debug"
maxParallel: 30
rateLimitQPS: 20
rateLimitBurst: 40
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 5
targetCPUUtilizationPercentage: 70
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 100m
memory: 128Mi
The chart provides two methods for managing the required Overmind API key:
-
Create a Kubernetes secret containing your API key:
kubectl create secret generic overmind-api-key \ --from-literal=API_KEY=your-api-key-here
-
Install the chart:
helm install overmind-kube-source overmind/overmind-kube-source \ --set source.apiKey.existingSecretName=overmind-api-key
Important Notes:
- The secret MUST contain a key named
API_KEY
- The secret must exist in the same namespace as the chart
- Installation will fail if:
- The secret doesn't exist
- The secret exists but doesn't contain an
API_KEY
key - Neither
source.apiKey.existingSecretName
norsource.apiKey.value
is provided
helm install overmind-kube-source overmind/overmind-kube-source \
--set source.apiKey.value=YOUR_API_KEY
--set source.clusterName=my-cluster-name
Warning: This method stores the API key in clear text in your values file. Only use for development/testing.
This source will support all Kubernetes versions that are currently maintained in the kubernetes project. The list can be found here
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:
labelSelector
: documentationfieldSelector
: documentation
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`
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.