Skip to content

Commit

Permalink
fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
cjimti committed Jan 29, 2021
1 parent bd5ac48 commit f95c314
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions amp.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
type AdmissionReview string

const (
AdmisionReviewValidate AdmissionReview = "validate"
AdmisionReviewMutate AdmissionReview = "mutate"
AdmissionReviewValidate AdmissionReview = "validate"
AdmissionReviewMutate AdmissionReview = "mutate"
)

// Config configures the API
Expand Down Expand Up @@ -125,12 +125,12 @@ func (a *Api) AdmissionReviewHandler(admissionReview AdmissionReview) gin.Handle
responseAdmissionReview.Response = toAdmissionResponse(err)
} else {
// mutate
if admissionReview == AdmisionReviewMutate {
if admissionReview == AdmissionReviewMutate {
responseAdmissionReview.Response = a.mutatePod(requestedAdmissionReview)
}

// validate
if admissionReview == AdmisionReviewValidate {
if admissionReview == AdmissionReviewValidate {
responseAdmissionReview.Response = a.validatePod(requestedAdmissionReview)
}
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/amp.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ func main() {
r.GET("/", api.OkHandler(Version, *mode, Service))

// validate proxy
r.POST("/validate", api.AdmissionReviewHandler(amp.AdmisionReviewValidate))
r.POST("/validate", api.AdmissionReviewHandler(amp.AdmissionReviewValidate))

// mutate proxy
r.POST("/mutate", api.AdmissionReviewHandler(amp.AdmisionReviewMutate))
r.POST("/mutate", api.AdmissionReviewHandler(amp.AdmissionReviewMutate))

// metrics server (run in go routine)
go func() {
Expand Down

0 comments on commit f95c314

Please sign in to comment.