Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is a simple [Kubernetes admission webhook](https://kubernetes.io/docs/refer

This project is aimed at illustrating how to build a fully functioning admission webhook in the simplest way possible. Most existing examples found on the web rely on heavy machinery using powerful frameworks, yet fail to illustrate how to implement a lightweight webhook that can do much needed actions such as rejecting a pod for compliance reasons, or inject helpful environment variables.

For readability, this project has been stripped of the usual production items such as: observability instrumentation, release scripts, redundant deployment configurations, etc. As such, it is not meant to use as-is in a production environment. This project is, in fact, a simplified fork of a system used accross all Kubernetes production environments at Slack.
For readability, this project has been stripped of the usual production items such as: observability instrumentation, release scripts, redundant deployment configurations, etc. As such, it is not meant to use as-is in a production environment. This project is, in fact, a simplified fork of a system used across all Kubernetes production environments at Slack.

## Installation
This project can fully run locally and includes automation to deploy a local Kubernetes cluster (using Kind).
Expand Down Expand Up @@ -110,7 +110,7 @@ OK
```

### Deploying pods
Deploy a valid test pod that gets succesfully created:
Deploy a valid test pod that gets successfully created:
```
❯ make pod

Expand Down
4 changes: 2 additions & 2 deletions pkg/admission/admission.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
admissionv1 "k8s.io/api/admission/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/types"
)

// Admitter is a container for admission business
Expand Down Expand Up @@ -42,7 +42,7 @@ func (a Admitter) MutatePodReview() (*admissionv1.AdmissionReview, error) {
return patchReviewResponse(a.Request.UID, patch)
}

// MutatePodReview takes an admission request and validates the pod within
// ValidatePodReview takes an admission request and validates the pod within
// it returns an admission review
func (a Admitter) ValidatePodReview() (*admissionv1.AdmissionReview, error) {
pod, err := a.Pod()
Expand Down
2 changes: 1 addition & 1 deletion pkg/mutation/minimum_lifespan.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
corev1 "k8s.io/api/core/v1"
)

// minLifespanTolerations is a container for mininum lifespan mutation
// minLifespanTolerations is a container for minimum lifespan mutation
type minLifespanTolerations struct {
Logger logrus.FieldLogger
}
Expand Down