Commit 83eac97c authored by Marcones Silva's avatar Marcones Silva

Execicrio cap 7 schedule-scale, arquivo deployment

parent 3b9e9dde
- apiVersion: v1
kind: ResourceQuota
metadata:
name: ${PROJECT_NAME}-quota
spec:
hard:
cpu: 3
memory: 10G
- apiVersion: v1
kind: LimitRange
metadata:
name: ${PROJECT_NAME}-limits
spec:
limits:
- type: Container
defaultRequest:
cpu: 30m
memory: 30M
#!/usr/bin/bash
if $(oc get route/scaling -n schedule-scale -o jsonpath='{.spec.host}' &> /dev/null); then
ROUTE=$(oc get route/scaling -n schedule-scale -o jsonpath='{.spec.host}')
(for x in {1..100}; do curl -s http://${ROUTE}; done) | sort | uniq -c
else
echo
echo "Error: Ensure that the 'scaling' route exists in the 'schedule-scale'"
echo " namespace and then try running this script again."
echo
fi
......@@ -22,13 +22,7 @@ items:
containers:
- image: quay.io/redhattraining/loadtest:v1.0
name: loadtest
resources:
requests:
cpu: "100m"
memory: 20M
limits:
cpu: "500m"
memory: 200M
resources: {}
status: {}
- apiVersion: v1
kind: Service
......@@ -56,7 +50,7 @@ items:
app: loadtest
name: loadtest
spec:
host: "loadtest.apps.ocp4.example.com"
host: ""
port:
targetPort: 8080
subdomain: ""
......
apiVersion: v1
items:
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
annotations:
openshift.io/generated-by: OpenShiftNewApp
creationTimestamp: null
labels:
app: scaling
name: scaling
spec:
replicas: 1
selector:
app: scaling
deploymentconfig: scaling
strategy:
resources: {}
template:
metadata:
annotations:
openshift.io/generated-by: OpenShiftNewApp
creationTimestamp: null
labels:
app: scaling
deploymentconfig: scaling
spec:
containers:
- image: quay.io/redhattraining/scaling:v1.0
name: scaling
ports:
- containerPort: 8443
protocol: TCP
- containerPort: 8080
protocol: TCP
resources: {}
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- scaling
from:
kind: ImageStreamTag
name: scaling:latest
type: ImageChange
status:
availableReplicas: 0
latestVersion: 0
observedGeneration: 0
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0
- apiVersion: v1
kind: Service
metadata:
annotations:
openshift.io/generated-by: OpenShiftNewApp
creationTimestamp: null
labels:
app: scaling
name: scaling
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
- name: 8443-tcp
port: 8443
protocol: TCP
targetPort: 8443
selector:
app: scaling
deploymentconfig: scaling
status:
loadBalancer: {}
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
annotations:
openshift.io/host.generated: "true"
labels:
app: scaling
name: scaling
namespace: schedule-scale
spec:
host: ""
port:
targetPort: 8080-tcp
subdomain: ""
to:
kind: Service
name: scaling
weight: 100
wildcardPolicy: None
status:
ingress: null
kind: List
metadata: {}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment