Skip to content

Commit

Permalink
Adds readiness probe core-interceptors deployment
Browse files Browse the repository at this point in the history
Signed-off-by: Shivam Mukhade [email protected]
  • Loading branch information
SM43 authored and tekton-robot committed May 21, 2021
1 parent 7c165fc commit 7c72387
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/interceptors/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func main() {
}
mux := http.NewServeMux()
mux.Handle("/", service)
mux.HandleFunc("/ready", handler)

srv := &http.Server{
Addr: fmt.Sprintf(":%d", Port),
Expand All @@ -90,3 +91,7 @@ func main() {
logger.Fatalf("failed to start interceptors service: %v", err)
}
}

func handler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}
8 changes: 8 additions & 0 deletions config/interceptors/core-interceptors-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ spec:
value: config-observability-triggers
- name: METRICS_DOMAIN
value: tekton.dev/triggers
readinessProbe:
httpGet:
path: /ready
port: 8082
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
securityContext:
allowPrivilegeEscalation: false
# User 65532 is the distroless nonroot user ID
Expand Down

0 comments on commit 7c72387

Please sign in to comment.