Skip to content

Commit 85c11ee

Browse files
committed
click to crash
1 parent 8cd0373 commit 85c11ee

File tree

6 files changed

+33
-10
lines changed

6 files changed

+33
-10
lines changed

codefresh/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ steps:
4848
# Install or upgrade tiller
4949
- "make helm/toolbox/upsert"
5050
# Deploy chart to cluster using helmfile
51-
- "helmfile --namespace ${{NAMESPACE}} --selector color=${{NAMESPACE}} sync"
51+
- "helmfile --namespace ${{NAMESPACE}} --selector color=blue sync"
5252

5353
set_github_deployment_status_to_success:
5454
title: Set GitHub deployment status to "success"

deploy/releases/blue.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ releases:
1515
# - https://github.com/cloudposse/charts/blob/master/incubator/monochart
1616
#
1717
- name: "blue-example"
18-
namespace: "example"
1918
labels:
2019
color: "blue"
2120
chart: "cloudposse-incubator/monochart"
@@ -92,8 +91,8 @@ releases:
9291

9392
resources:
9493
requests:
95-
memory: 1Gi
94+
memory: 10Mi
9695
cpu: 100m
9796
limits:
98-
memory: 1Gi
97+
memory: 10Mi
9998
cpu: 100m

main.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,22 @@ func main() {
2121
})
2222

2323
// Take one for the team
24-
http.HandleFunc("/die", func(w http.ResponseWriter, r *http.Request) {
24+
boom, _ := ioutil.ReadFile("public/boom.html")
25+
http.HandleFunc("/boom", func(w http.ResponseWriter, r *http.Request) {
26+
fmt.Fprintf(w, string(boom))
2527
fmt.Printf("Goodbye\n")
26-
die()
28+
//die()
2729
})
2830

2931
// Dashboard
30-
dashboard, _ := ioutil.ReadFile("dashboard.html")
32+
dashboard, _ := ioutil.ReadFile("public/dashboard.html")
3133
http.HandleFunc("/dashboard", func(w http.ResponseWriter, r *http.Request) {
3234
fmt.Fprintf(w, string(dashboard))
3335
fmt.Printf("GET %s\n", r.URL.Path)
3436
})
3537

3638
// Default
37-
index, _ := ioutil.ReadFile("index.html")
39+
index, _ := ioutil.ReadFile("public/index.html")
3840
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
3941
count += 1
4042
fmt.Fprintf(w, string(index), c, count)

public/boom.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<html onclick="window.location.href = '/'">
2+
<head>
3+
<meta http-equiv="refresh" content="2; URL=/">
4+
<style type="text/css">
5+
html {
6+
font-family: "Imapct", "Verdana";
7+
background-color: red;
8+
transition: all 0.5s ease-in;
9+
color: #fff;
10+
margin-top: 35px;
11+
text-align: center;
12+
font-size: 4em;
13+
overflow: hidden;
14+
}
15+
</style>
16+
</head>
17+
<body>BOOM!!!</body>
18+
</html>
File renamed without changes.
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
<html onclick="window.location.href = '/die'">
1+
<html onclick="window.location.href = '/boom'">
22
<head>
33
<meta http-equiv="refresh" content="2">
44
<style type="text/css">
55
html {
6+
font-family: "Imapct", "Verdana";
67
background-color: %s;
78
transition: all 0.5s ease-in;
89
color: #fff;
910
margin-top: 35px;
1011
text-align: center;
1112
font-size: 5em;
1213
}
14+
html:active {
15+
background-color: organge;
16+
}
1317
</style>
1418
</head>
1519
<body>%v</body>
16-
</html>
20+
</html>

0 commit comments

Comments
 (0)