diff options
Diffstat (limited to 'Bombs/cpu')
-rw-r--r-- | Bombs/cpu/openshift-template.yml | 205 | ||||
-rw-r--r-- | Bombs/cpu/sx.sh | 2 |
2 files changed, 206 insertions, 1 deletions
diff --git a/Bombs/cpu/openshift-template.yml b/Bombs/cpu/openshift-template.yml new file mode 100644 index 0000000..168e2cc --- /dev/null +++ b/Bombs/cpu/openshift-template.yml @@ -0,0 +1,205 @@ +apiVersion: v1 +kind: Template +metadata: + creationTimestamp: null + name: startx-bomb-cpu +objects: +- apiVersion: v1 + kind: ImageStream + metadata: + creationTimestamp: null + generation: 2 + labels: + app: openshift-bomb-cpu + name: openshift-bomb-cpu + spec: + tags: + - annotations: + openshift.io/generated-by: STARTX + openshift.io/imported-from: startx/openshift-bomb-cpu + from: + kind: DockerImage + name: 172.30.213.210:5000/demo/openshift-bomb-cpu:latest + generation: 2 + importPolicy: {} + name: latest + referencePolicy: + type: Source + status: + dockerImageRepository: "" +- apiVersion: v1 + kind: DeploymentConfig + metadata: + annotations: + openshift.io/generated-by: STARTX + creationTimestamp: null + generation: 1 + labels: + app: openshift-bomb-cpu + name: openshift-bomb-cpu + spec: + replicas: 0 + selector: + app: openshift-bomb-cpu + deploymentconfig: openshift-bomb-cpu + strategy: + activeDeadlineSeconds: 21600 + recreateParams: + timeoutSeconds: 60 + resources: {} + type: Recreate + template: + metadata: + annotations: + openshift.io/generated-by: STARTX + creationTimestamp: null + labels: + app: openshift-bomb-cpu + deploymentconfig: openshift-bomb-cpu + spec: + containers: + - image: startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05 + imagePullPolicy: Always + livenessProbe: + exec: + command: + - /bin/bash + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + name: openshift-bomb-cpu + readinessProbe: + exec: + command: + - /bin/bash + - echo 'ok' + failureThreshold: 3 + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + resources: {} + terminationMessagePath: /dev/termination-log + dnsPolicy: ClusterFirst + restartPolicy: Always + securityContext: {} + terminationGracePeriodSeconds: 30 + test: false + triggers: + - imageChangeParams: + automatic: true + containerNames: + - openshift-bomb-cpu + from: + kind: ImageStreamTag + name: openshift-bomb-cpu:latest + namespace: demo + type: ImageChange + status: + availableReplicas: 0 + latestVersion: 0 + observedGeneration: 0 + replicas: 0 + unavailableReplicas: 0 + updatedReplicas: 0 +- apiVersion: v1 + kind: ReplicationController + metadata: + annotations: + kubectl.kubernetes.io/original-replicas: "1" + openshift.io/deployer-pod.name: openshift-bomb-cpu-1-deploy + openshift.io/deployment-config.latest-version: "1" + openshift.io/deployment-config.name: openshift-bomb-cpu + openshift.io/deployment.phase: Complete + openshift.io/deployment.replicas: "1" + openshift.io/deployment.status-reason: image change + openshift.io/encoded-deployment-config: | + {"kind":"DeploymentConfig","apiVersion":"v1","metadata":{"name":"openshift-bomb-cpu","namespace":"demo","selfLink":"/oapi/v1/namespaces/demo/deploymentconfigs/openshift-bomb-cpu","uid":"b1f1d05d-6fa3-11e7-8fae-061a17d00c5c","resourceVersion":"96725","generation":2,"creationTimestamp":"2017-07-23T12:37:31Z","labels":{"app":"openshift-bomb-cpu"},"annotations":{"openshift.io/generated-by":"STARTX"}},"spec":{"strategy":{"type":"Rolling","rollingParams":{"updatePeriodSeconds":1,"intervalSeconds":1,"timeoutSeconds":600,"maxUnavailable":"25%","maxSurge":"25%"},"resources":{},"activeDeadlineSeconds":21600},"triggers":[{"type":"ConfigChange"},{"type":"ImageChange","imageChangeParams":{"automatic":true,"containerNames":["openshift-bomb-cpu"],"from":{"kind":"ImageStreamTag","namespace":"demo","name":"openshift-bomb-cpu:latest"},"lastTriggeredImage":"startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05"}}],"replicas":1,"test":false,"selector":{"app":"openshift-bomb-cpu","deploymentconfig":"openshift-bomb-cpu"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"openshift-bomb-cpu","deploymentconfig":"openshift-bomb-cpu"},"annotations":{"openshift.io/generated-by":"STARTX"}},"spec":{"containers":[{"name":"openshift-bomb-cpu","image":"startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05","resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","securityContext":{}}}},"status":{"latestVersion":1,"observedGeneration":1,"replicas":0,"updatedReplicas":0,"availableReplicas":0,"unavailableReplicas":0,"details":{"message":"image change","causes":[{"type":"ImageChange","imageTrigger":{"from":{"kind":"ImageStreamTag","namespace":"demo","name":"openshift-bomb-cpu:latest"}}}]},"conditions":[{"type":"Available","status":"False","lastUpdateTime":"2017-07-23T12:37:31Z","lastTransitionTime":"2017-07-23T12:37:31Z","message":"Deployment config does not have minimum availability."}]}} + creationTimestamp: null + generation: 1 + labels: + app: openshift-bomb-cpu + openshift.io/deployment-config.name: openshift-bomb-cpu + name: openshift-bomb-cpu-1 + spec: + replicas: 0 + selector: + app: openshift-bomb-cpu + deployment: openshift-bomb-cpu-1 + deploymentconfig: openshift-bomb-cpu + template: + metadata: + annotations: + openshift.io/deployment-config.latest-version: "1" + openshift.io/deployment-config.name: openshift-bomb-cpu + openshift.io/deployment.name: openshift-bomb-cpu-1 + openshift.io/generated-by: STARTX + creationTimestamp: null + labels: + app: openshift-bomb-cpu + deployment: openshift-bomb-cpu-1 + deploymentconfig: openshift-bomb-cpu + spec: + containers: + - image: startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05 + imagePullPolicy: Always + name: openshift-bomb-cpu + resources: {} + terminationMessagePath: /dev/termination-log + dnsPolicy: ClusterFirst + restartPolicy: Always + securityContext: {} + terminationGracePeriodSeconds: 30 + status: + replicas: 0 +- apiVersion: v1 + kind: ReplicationController + metadata: + annotations: + openshift.io/deployer-pod.name: openshift-bomb-cpu-2-deploy + openshift.io/deployment-config.latest-version: "2" + openshift.io/deployment-config.name: openshift-bomb-cpu + openshift.io/deployment.phase: Complete + openshift.io/deployment.replicas: "" + openshift.io/deployment.status-reason: image change + openshift.io/encoded-deployment-config: | + {"kind":"DeploymentConfig","apiVersion":"v1","metadata":{"name":"openshift-bomb-cpu","namespace":"demo","selfLink":"/oapi/v1/namespaces/demo/deploymentconfigs/openshift-bomb-cpu","uid":"b1f1d05d-6fa3-11e7-8fae-061a17d00c5c","resourceVersion":"96856","generation":3,"creationTimestamp":"2017-07-23T12:37:31Z","labels":{"app":"openshift-bomb-cpu"},"annotations":{"openshift.io/generated-by":"STARTX"}},"spec":{"strategy":{"type":"Rolling","rollingParams":{"updatePeriodSeconds":1,"intervalSeconds":1,"timeoutSeconds":600,"maxUnavailable":"25%","maxSurge":"25%"},"resources":{},"activeDeadlineSeconds":21600},"triggers":[{"type":"ConfigChange"},{"type":"ImageChange","imageChangeParams":{"automatic":true,"containerNames":["openshift-bomb-cpu"],"from":{"kind":"ImageStreamTag","namespace":"demo","name":"openshift-bomb-cpu:latest"},"lastTriggeredImage":"startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05"}}],"replicas":1,"test":false,"selector":{"app":"openshift-bomb-cpu","deploymentconfig":"openshift-bomb-cpu"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"openshift-bomb-cpu","deploymentconfig":"openshift-bomb-cpu"},"annotations":{"openshift.io/generated-by":"STARTX"}},"spec":{"containers":[{"name":"openshift-bomb-cpu","image":"startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05","resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","securityContext":{}}}},"status":{"latestVersion":2,"observedGeneration":2,"replicas":1,"updatedReplicas":1,"availableReplicas":1,"unavailableReplicas":0,"details":{"message":"image change","causes":[{"type":"ImageChange","imageTrigger":{"from":{"kind":"ImageStreamTag","namespace":"demo","name":"openshift-bomb-cpu:latest"}}}]},"conditions":[{"type":"Progressing","status":"True","lastUpdateTime":"2017-07-23T12:37:43Z","lastTransitionTime":"2017-07-23T12:37:34Z","reason":"NewReplicationControllerAvailable","message":"replication controller \"openshift-bomb-cpu-1\" successfully rolled out"},{"type":"Available","status":"True","lastUpdateTime":"2017-07-23T12:39:08Z","lastTransitionTime":"2017-07-23T12:39:08Z","message":"Deployment config has minimum availability."}],"readyReplicas":1}} + creationTimestamp: null + generation: 1 + labels: + app: openshift-bomb-cpu + openshift.io/deployment-config.name: openshift-bomb-cpu + name: openshift-bomb-cpu-2 + spec: + replicas: 0 + selector: + app: openshift-bomb-cpu + deployment: openshift-bomb-cpu-2 + deploymentconfig: openshift-bomb-cpu + template: + metadata: + annotations: + openshift.io/deployment-config.latest-version: "2" + openshift.io/deployment-config.name: openshift-bomb-cpu + openshift.io/deployment.name: openshift-bomb-cpu-2 + openshift.io/generated-by: STARTX + creationTimestamp: null + labels: + app: openshift-bomb-cpu + deployment: openshift-bomb-cpu-2 + deploymentconfig: openshift-bomb-cpu + spec: + containers: + - image: startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05 + imagePullPolicy: Always + name: openshift-bomb-cpu + resources: {} + terminationMessagePath: /dev/termination-log + dnsPolicy: ClusterFirst + restartPolicy: Always + securityContext: {} + terminationGracePeriodSeconds: 30 + status: + replicas: 0 diff --git a/Bombs/cpu/sx.sh b/Bombs/cpu/sx.sh index e028787..6e43335 100644 --- a/Bombs/cpu/sx.sh +++ b/Bombs/cpu/sx.sh @@ -7,7 +7,7 @@ function display_container_header { echo "| Container : $HOSTNAME" echo "| OS : $(</etc/redhat-release)" echo "| kubernetes : $KUBERNETES_SERVICE_HOST" - echo "| user : $(</etc/whoami)" + echo "| user : $(whoami)" echo "+=====================================================" } |