Skip to content

Commit

Permalink
test zero
Browse files Browse the repository at this point in the history
  • Loading branch information
skonto committed Jul 19, 2024
1 parent 6120450 commit aebf5b5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .ko.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use :nonroot base image for all containers
defaultBaseImage: registry.access.redhat.com/ubi8/ubi-minimal:latest
#defaultBaseImage: registry.access.redhat.com/ubi8/ubi-minimal:latest
baseImageOverrides:
knative.dev/serving/test/test_images/runtime: gcr.io/distroless/static:nonroot
knative.dev/serving/vendor/github.com/tsenart/vegeta/v12: ubuntu:latest
16 changes: 13 additions & 3 deletions pkg/reconciler/serverlessservice/serverlessservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,23 @@ func (r *reconciler) reconcilePublicEndpoints(ctx context.Context, sks *netv1alp
if foundServingEndpoints {
sks.Status.MarkEndpointsReady()
} else {
dlogger.Info("No ready endpoints backing revision")
sks.Status.MarkEndpointsNotReady("NoHealthyBackends")
if v, ok := sks.Annotations["autoscaling.knative.dev/class"]; ok && v == "hpa.autoscaling.knative.dev" {
// fake that we have endpoints, so that the HPA can scale on some ingress metric.
// without a ready service no networking is being setup
sks.Status.MarkEndpointsReady()
} else {
dlogger.Info("No ready endpoints backing revision")
sks.Status.MarkEndpointsNotReady("NoHealthyBackends")
}
}
// If we have no backends or if we're in the proxy mode, then
// activator backs this revision.
if !foundServingEndpoints || sks.Spec.Mode == netv1alpha1.SKSOperationModeProxy {
sks.Status.MarkActivatorEndpointsPopulated()
if v, ok := sks.Annotations["autoscaling.knative.dev/class"]; ok && v == "hpa.autoscaling.knative.dev" {
sks.Status.MarkActivatorEndpointsRemoved()
} else {
sks.Status.MarkActivatorEndpointsPopulated()
}
} else {
sks.Status.MarkActivatorEndpointsRemoved()
}
Expand Down

0 comments on commit aebf5b5

Please sign in to comment.