Sign inSign up

centeredge/shawarma-webhook

By centeredge

•Updated about 1 year ago

Mutating webhook to automatically add Shawarma to pods based on annotations

Image
0

10K+

centeredge/shawarma-webhook repository overview

A Kubernetes Mutating Admision Webhook which will automatically apply the Shawarma sidecar when requested via annotations.

⁠Deploying

The webhook is typically deployed to the kube-system namespace. An example deployment can be found in the main Shawarma repository⁠.

Note that the sample uses predefined, publicly available certificates to secure communication between the Kubernetes API Server and the webhook. For production, these certificates should be replaced with secure, locally generated certificates.

⁠Environment Variables

The following environment variables may be used to customize behaviors of the webhook.

NameDefaultDescription
LOG_LEVELwarnLog level for the admission webhook
WEBHOOK_PORT443Port used by the admission webhook
CERT_FILE/etc/shawarma-webhook/certs/cert.pemCertificate file used for TLS by the admission webhook
KEY_FILE/etc/shawarma-webhook/certs/key.pemKey file used for TLS by the admission webhook
SWAWARMA_IMAGEcenteredge/shawarma:0.1.2Default Shawarma image
SHAWARMA_SECRET_TOKEN_NAMEshawarma-tokenName of the K8S Secret containing the Shwarma token

⁠Annotations

The following annotations may be applied to alter behaviors on a specific pod.

NameRequiredDescription
shawarma.centeredge.io/service-nameYName of the K8S service to be monitored, the sidecar is not injected if this annotation is not present
shawarma.centeredge.io/imageNOverride the image used for Shawarma
shawarma.centeredge.io/log-levelNOverride the log level used by Shawarma
shawarma.centeredge.io/state-urlNOverride the URL which receives Shawarma application state (default http://localhost/applicationstate)

Tag summary

Content type

Image

Digest

sha256:842e2f39d…

Size

9.6 MB

Last updated

about 4 years ago

docker pull centeredge/shawarma-webhook