chore: add scale-to-zero overlay
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app: keda-add-ons-http-interceptor-proxy
|
||||
name: keda-add-ons-http-interceptor-proxy
|
||||
spec:
|
||||
externalName: keda-add-ons-http-interceptor-proxy.keda
|
||||
selector:
|
||||
app: keda-add-ons-http-interceptor-proxy
|
||||
type: ExternalName
|
||||
status:
|
||||
loadBalancer: {}
|
||||
@@ -0,0 +1,24 @@
|
||||
kind: HTTPScaledObject
|
||||
apiVersion: http.keda.sh/v1alpha1
|
||||
metadata:
|
||||
name: math-exercises
|
||||
spec:
|
||||
hosts:
|
||||
- "math-tables.cl1.parano.ch"
|
||||
pathPrefixes:
|
||||
- /
|
||||
scaleTargetRef:
|
||||
name: math-exercises-app
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
service: math-exercises-service
|
||||
portName: http
|
||||
replicas:
|
||||
min: 0
|
||||
max: 3
|
||||
scaledownPeriod: 60
|
||||
scalingMetric:
|
||||
requestRate:
|
||||
granularity: 1s
|
||||
targetValue: 100
|
||||
window: 1m
|
||||
@@ -0,0 +1,39 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: math-tables
|
||||
resources:
|
||||
- ../production
|
||||
- external-service.yaml
|
||||
- http-scaled-object.yaml
|
||||
patches:
|
||||
- patch: |
|
||||
[
|
||||
{
|
||||
"op": "remove",
|
||||
"path": "/spec/replicas"
|
||||
}
|
||||
]
|
||||
target:
|
||||
group: apps
|
||||
version: v1
|
||||
kind: Deployment
|
||||
name: math-exercises-app
|
||||
- path: remove-pdb.yaml
|
||||
- patch: |
|
||||
[
|
||||
{
|
||||
"op": "replace",
|
||||
"path": "/spec/rules/0/http/paths/0/backend/service/port/number",
|
||||
"value": 8080
|
||||
},
|
||||
{
|
||||
"op": "replace",
|
||||
"path": "/spec/rules/0/http/paths/0/backend/service/name",
|
||||
"value": "keda-add-ons-http-interceptor-proxy"
|
||||
}
|
||||
]
|
||||
target:
|
||||
group: networking.k8s.io
|
||||
version: v1
|
||||
kind: Ingress
|
||||
name: math-exercises-ingress
|
||||
@@ -0,0 +1,5 @@
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: math-exercises-pdb
|
||||
$patch: delete
|
||||
Reference in New Issue
Block a user