Skip to content

Kubernetes Annotations Reference

The Shoehorn K8s Agent reads annotations and labels from Kubernetes workloads to enrich entity metadata in the service catalog. This document covers all supported annotations.

Point to a manifest file in your repo for full entity enrichment (relations, links, runbooks, licenses, interfaces). The API fetches it server-side - no structured data stored in K8s.

annotations:
# Relative path (resolved against known repo URL from ArgoCD/Flux/crawler)
shoehorn.dev/entityFile: ".shoehorn/catalog.yaml"
# Full URL (for files in a different repo)
shoehorn.dev/entityFile: "https://github.com/acme/shared-configs/blob/main/.shoehorn/checkout.yaml"
# Multi-service file with fragment selector
shoehorn.dev/entityFile: ".shoehorn/platform.yaml#checkout-api"

For details on manifest file format and enrichment modes, see Entity Enrichment Modes.


These annotations determine which team owns a workload. They are checked in priority order (first match wins):

KeyTypePriorityExample
shoehorn.dev/ownerLabel or Annotation1platform-engineering
shoehorn.dev/teamLabel or Annotation2infrastructure-team
ownerLabel or Annotation3payments-team
app.kubernetes.io/ownerLabel only4data-team

If no annotation matches, the agent attempts namespace pattern matching (e.g., platform-team-production extracts platform). The final fallback is unassigned.

# Recommended approach
labels:
shoehorn.dev/owner: "payments-team"

Provides a human-readable description for the entity.

KeyPriority
shoehorn.dev/description1
description2
app.kubernetes.io/description3
annotations:
shoehorn.dev/description: "Handles payment processing and card transactions"

Comma-separated tags for categorizing entities.

KeyFormat
shoehorn.dev/tagsComma-separated values
annotations:
shoehorn.dev/tags: "critical, financial, pci-compliant"

The agent also automatically adds tags from:

  • Cluster metadata: cluster:<name>, env:<environment>, provider:<provider>, region:<region>
  • Kubernetes labels: app, app.kubernetes.io/name, app.kubernetes.io/component, app.kubernetes.io/part-of

Link entities to external tools and dashboards. All link annotations use the link.shoehorn.dev/ prefix.

annotations:
link.shoehorn.dev/argocd-url: "https://argocd.example.com/applications/my-app"
link.shoehorn.dev/argocd-name: "ArgoCD Application" # Optional, default: "ArgoCD"
link.shoehorn.dev/argocd-icon: "argocd" # Optional, default: "argocd"
annotations:
link.shoehorn.dev/grafana-url: "https://grafana.example.com/d/abc123"
link.shoehorn.dev/grafana-name: "Service Metrics" # Optional, default: "Grafana Dashboard"
link.shoehorn.dev/grafana-icon: "grafana" # Optional, default: "grafana"
annotations:
link.shoehorn.dev/prometheus-url: "https://prometheus.example.com"
link.shoehorn.dev/prometheus-name: "Metrics Query" # Optional, default: "Prometheus Metrics"
link.shoehorn.dev/prometheus-icon: "prometheus" # Optional, default: "prometheus"
annotations:
link.shoehorn.dev/url: "https://docs.example.com/my-service"
link.shoehorn.dev/name: "Documentation" # Optional, default: "Custom Link"
link.shoehorn.dev/icon: "docs" # Optional, default: "link"

Add numbered suffixes for additional links:

annotations:
# First link (no suffix)
link.shoehorn.dev/url: "https://docs.example.com"
link.shoehorn.dev/name: "Documentation"
link.shoehorn.dev/icon: "docs"
# Second link
link.shoehorn.dev/url.2: "https://status.example.com"
link.shoehorn.dev/name.2: "Status Page"
link.shoehorn.dev/icon.2: "dashboard"
# Third link
link.shoehorn.dev/url.3: "https://runbook.example.com"
link.shoehorn.dev/name.3: "Runbook"
link.shoehorn.dev/icon.3: "docs"

Icons are case-insensitive. Supported values:

CategoryIcons
Source Controlgithub, gitlab
Monitoringgrafana, datadog, prometheus, sentry, jaeger
CI/CDargocd, jenkins
Cloudaws, azure, gcp, kubernetes, k8s, docker, dockerhub, terraform
Communicationslack, discord, teams, zoom
Project Managementjira, linear, pagerduty
Documentationconfluence, notion, docs, wiki
Genericapi, database, dashboard, monitor, source, repository, repo, url, link, external, code, http

Define APIs and contracts for the entity.

annotations:
shoehorn.dev/interface.http.openapi: "https://api.example.com/openapi.json"
shoehorn.dev/interface.http.base-url: "https://api.example.com/v1" # Optional
shoehorn.dev/interface.http.version: "2.0.0" # Optional
annotations:
shoehorn.dev/interface.grpc.protos: "https://example.com/user.proto, https://example.com/auth.proto"
shoehorn.dev/interface.grpc.package: "com.example.api" # Optional
shoehorn.dev/interface.grpc.services: "UserService, AuthService" # Optional
annotations:
shoehorn.dev/interface.graphql.schema: "https://example.com/schema.graphql"
annotations:
shoehorn.dev/interface.events.asyncapi: "https://example.com/asyncapi.yaml"

The legacy shoehorn.dev/definition-url annotation is supported for backward compatibility and maps to interface.http.openapi. New annotations take precedence.

annotations:
shoehorn.dev/definition-url: "https://api.example.com/openapi.json"

A production deployment with all annotation categories:

apiVersion: apps/v1
kind: Deployment
metadata:
name: payment-service
namespace: production
labels:
app: payment-service
shoehorn.dev/owner: "payments-team"
annotations:
# Description
shoehorn.dev/description: "Handles payment processing and card transactions"
# Tags
shoehorn.dev/tags: "critical, financial, pci-compliant"
# External links
link.shoehorn.dev/argocd-url: "https://argocd.example.com/applications/payment-service"
link.shoehorn.dev/grafana-url: "https://grafana.example.com/d/payment-metrics"
link.shoehorn.dev/url: "https://wiki.example.com/payment-service"
link.shoehorn.dev/name: "Wiki"
link.shoehorn.dev/icon: "wiki"
# Interfaces
shoehorn.dev/interface.http.openapi: "https://api.example.com/payment/openapi.json"
shoehorn.dev/interface.http.base-url: "https://api.example.com/payment/v1"
shoehorn.dev/interface.grpc.protos: "https://repo.example.com/protos/payment.proto"
shoehorn.dev/interface.grpc.services: "PaymentService, RefundService"
spec:
replicas: 3
selector:
matchLabels:
app: payment-service
template:
metadata:
labels:
app: payment-service
spec:
containers:
- name: payment-service
image: ghcr.io/example/payment-service:v1.2.0
AnnotationPurposeUI Location
shoehorn.dev/entityFileManifest file for full enrichmentAll entity fields
shoehorn.dev/ownerTeam ownershipEntity owner field
shoehorn.dev/descriptionService descriptionEntity description
shoehorn.dev/tagsCategorization tagsEntity tags
link.shoehorn.dev/argocd-urlArgoCD linkExternal links
link.shoehorn.dev/grafana-urlGrafana linkExternal links
link.shoehorn.dev/prometheus-urlPrometheus linkExternal links
link.shoehorn.dev/urlCustom linkExternal links
link.shoehorn.dev/url.NAdditional custom linksExternal links
shoehorn.dev/interface.http.openapiOpenAPI spec URLInterfaces tab
shoehorn.dev/interface.http.base-urlHTTP base URLInterfaces tab
shoehorn.dev/interface.http.versionAPI versionInterfaces tab
shoehorn.dev/interface.grpc.protosgRPC proto URLsInterfaces tab
shoehorn.dev/interface.grpc.packagegRPC packageInterfaces tab
shoehorn.dev/interface.grpc.servicesgRPC service namesInterfaces tab
shoehorn.dev/interface.graphql.schemaGraphQL schema URLInterfaces tab
shoehorn.dev/interface.events.asyncapiAsyncAPI spec URLInterfaces tab
shoehorn.dev/definition-urlLegacy OpenAPI URLInterfaces tab