Skip to content

Commit

Permalink
add autostopping tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rssnyder committed Oct 11, 2024
1 parent 53d0ea9 commit d9cd121
Showing 1 changed file with 263 additions and 0 deletions.
263 changes: 263 additions & 0 deletions k8s/autostoppingtest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
apiVersion: v1
kind: Namespace
metadata:
name: autostoppingexample

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx0
namespace: autostoppingexample
spec:
selector:
matchLabels:
app: nginx0
replicas: 1
template:
metadata:
labels:
app: nginx0
spec:
containers:
- name: nginx
image: rssnyder/nginx:0
imagePullPolicy: Always
ports:
- name: http
containerPort: 80

---
apiVersion: v1
kind: Service
metadata:
name: nginx0
namespace: autostoppingexample
spec:
type: ClusterIP
selector:
app: nginx0
ports:
- name: http
port: 80
targetPort: http

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx1
namespace: autostoppingexample
spec:
selector:
matchLabels:
app: nginx1
replicas: 1
template:
metadata:
labels:
app: nginx1
spec:
containers:
- name: nginx
image: rssnyder/nginx:1
ports:
- name: http
containerPort: 80

---
apiVersion: v1
kind: Service
metadata:
name: nginx1
namespace: autostoppingexample
spec:
type: ClusterIP
selector:
app: nginx1
ports:
- name: http
port: 80
targetPort: http

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx2
namespace: autostoppingexample
spec:
selector:
matchLabels:
app: nginx2
replicas: 1
template:
metadata:
labels:
app: nginx2
spec:
containers:
- name: nginx
image: rssnyder/nginx:2
ports:
- name: http
containerPort: 80

---
apiVersion: v1
kind: Service
metadata:
name: nginx2
namespace: autostoppingexample
spec:
type: ClusterIP
selector:
app: nginx2
ports:
- name: http
port: 80
targetPort: http

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx3
namespace: autostoppingexample
spec:
selector:
matchLabels:
app: nginx3
replicas: 1
template:
metadata:
labels:
app: nginx3
spec:
containers:
- name: nginx
image: rssnyder/nginx:3
ports:
- name: http
containerPort: 80

---
apiVersion: v1
kind: Service
metadata:
name: nginx3
namespace: autostoppingexample
spec:
type: ClusterIP
selector:
app: nginx3
ports:
- name: http
port: 80
targetPort: http

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: autostoppingexample
namespace: autostoppingexample
spec:
ingressClassName: nginx
rules:
- host: autostoppingexample.k8s.rileysnyder.dev
http:
paths:
- path: /APP9
pathType: Prefix
backend:
service:
name: nginx0
port:
number: 80
- path: /APP0
pathType: Prefix
backend:
service:
name: nginx0
port:
number: 80
- path: /APP1
pathType: Prefix
backend:
service:
name: nginx1
port:
number: 80
- path: /APP2
pathType: Prefix
backend:
service:
name: nginx2
port:
number: 80
- path: /APP3
pathType: Prefix
backend:
service:
name: nginx3
port:
number: 80

---
apiVersion: ccm.harness.io/v1
kind: AutoStoppingRule
metadata:
name: app0
namespace: autostoppingexample
annotations:
harness.io/cloud-connector-id: rileyharnessccm
spec:
ingress:
name: autostoppingexample
controllerName: nginx
service:
name: nginx0
port: 80
idleTimeMins: 5
hideProgressPage: false
dependencies: []

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: autostoppingexampleagain
namespace: autostoppingexample
spec:
ingressClassName: nginx
rules:
- host: autostoppingexampleagain.k8s.rileysnyder.dev
http:
paths:
- path: /APP9
pathType: Prefix
backend:
service:
name: nginx0
port:
number: 80

---
apiVersion: ccm.harness.io/v1
kind: AutoStoppingRule
metadata:
name: app0again
namespace: autostoppingexample
annotations:
harness.io/cloud-connector-id: rileyharnessccm
spec:
ingress:
name: autostoppingexampleagain
controllerName: nginx
service:
name: nginx0
port: 80
idleTimeMins: 5
hideProgressPage: false
dependencies: []

0 comments on commit d9cd121

Please sign in to comment.