Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.

Add broker ingress readiness prober #1322

Merged
merged 1 commit into from
Jun 24, 2020
Merged
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
13 changes: 13 additions & 0 deletions pkg/reconciler/brokercell/resources/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ func MakeIngressDeployment(args IngressArgs) *appsv1.Deployment {
// Decorate the container template with ingress port.
container.Env = append(container.Env, corev1.EnvVar{Name: "PORT", Value: strconv.Itoa(args.Port)})
container.Ports = append(container.Ports, corev1.ContainerPort{Name: "http", ContainerPort: int32(args.Port)})
container.ReadinessProbe = &corev1.Probe{
Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/healthz",
Port: intstr.FromInt(args.Port),
Scheme: corev1.URISchemeHTTP,
},
},
FailureThreshold: 3,
PeriodSeconds: 2,
SuccessThreshold: 1,
TimeoutSeconds: 5,
}
container.LivenessProbe = &corev1.Probe{
Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{
Expand Down
9 changes: 9 additions & 0 deletions pkg/reconciler/brokercell/testingdata/ingress_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ spec:
periodSeconds: 2
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 8080
scheme: HTTP
periodSeconds: 2
successThreshold: 1
timeoutSeconds: 5
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ spec:
periodSeconds: 2
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 8080
scheme: HTTP
periodSeconds: 2
successThreshold: 1
timeoutSeconds: 5
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
Expand Down