diff --git a/resources/hello-ingress.yaml b/resources/hello-ingress.yaml index 89795c2..94f1fdd 100644 --- a/resources/hello-ingress.yaml +++ b/resources/hello-ingress.yaml @@ -11,6 +11,6 @@ spec: pathType: Prefix backend: service: - name: service-hello-dev + name: keda-add-ons-http-interceptor-proxy port: number: 8080 diff --git a/resources/hello-scaling.yaml b/resources/hello-scaling.yaml index e430253..15ae2a5 100644 --- a/resources/hello-scaling.yaml +++ b/resources/hello-scaling.yaml @@ -1,12 +1,12 @@ apiVersion: keda.sh/v1alpha1 kind: ScaledObject metadata: - name: scaling-hello-dev + name: cron-scaling-hello-dev spec: scaleTargetRef: name: deployment-hello-dev kind: Deployment - minReplicaCount: 1 + minReplicaCount: 0 maxReplicaCount: 2 pollingInterval: 30 cooldownPeriod: 30 @@ -18,3 +18,19 @@ spec: start: 00 08 * * 1-5 end: 00 18 * * 1-5 desiredReplicas: "1" +--- +kind: HTTPScaledObject +apiVersion: http.keda.sh/v1alpha1 +metadata: + name: http-scaling-hello-dev +spec: + host: "hello-dev.kcan.io" + targetPendingRequests: 5 + scaledownPeriod: 30 + scaleTargetRef: + deployment: deployment-hello-dev + service: service-hello-dev + port: 8080 + replicas: + min: 0 + max: 2 diff --git a/resources/hello-svc.yaml b/resources/hello-svc.yaml index 1e31c14..e017d4d 100644 --- a/resources/hello-svc.yaml +++ b/resources/hello-svc.yaml @@ -11,3 +11,11 @@ spec: port: 8080 targetPort: 80 nodePort: 31069 +--- +apiVersion: v1 +kind: Service +metadata: + name: keda-add-ons-http-interceptor-proxy +spec: + type: ExternalName + externalName: keda-add-ons-http-interceptor-proxy.keda.svc.cluster.local