Skip to content

Commit

Permalink
update yamls
Browse files Browse the repository at this point in the history
  • Loading branch information
moficodes committed May 29, 2020
1 parent d34cf52 commit 171f1d0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
8 changes: 4 additions & 4 deletions config/cron-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: admin
name: cron
labels:
run: admin
run: cron
version: v1
spec:
replicas: 1
selector:
matchLabels:
run: admin
run: cron
strategy:
rollingUpdate:
maxSurge: 25%
Expand All @@ -18,7 +18,7 @@ spec:
template:
metadata:
labels:
run: admin
run: cron
spec:
containers:
- image: moficodes/ibmcloud-kubernetes-cron:v0.2.1
Expand Down
4 changes: 3 additions & 1 deletion internals/cron/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ func checkCloudant() {
// basically means cloudant is not there or can not be connected to
// no way to recover
// only sane option is to contact admin
notification.EmailAdmin("Cloudant Not Available", "<strong>Check cloudant database</strong>")
if err := notification.EmailAdmin("Cloudant Not Available", "<strong>Check cloudant database</strong>"); err != nil {
log.Println(err)
}
log.Println("error getting accounts")
}

Expand Down
1 change: 1 addition & 0 deletions pkg/ibmcloud/cloudant.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ func getAllDbs() ([]string, error) {

err := fetch(url, header, nil, &result)
if err != nil {
log.Println("error getting all dbs")
return nil, err
}

Expand Down
5 changes: 5 additions & 0 deletions templates/email.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<body>
<h1>{{ .Schedule.Count }} clusters {{ .Schedule.Status }}</h1>
<p>Data Center : {{.Schedule.CreateRequest.ClusterRequest.DataCenter}} </p>
<p>Name : {{.Schedule.CreateRequest.ClusterRequest.Name}} </p>
<p>Public Vlan : {{.Schedule.CreateRequest.ClusterRequest.PublicVlan}} </p>
<p>Private Vlan : {{.Schedule.CreateRequest.ClusterRequest.PrivateVlan}} </p>
<p>Machine Type : {{.Schedule.CreateRequest.ClusterRequest.MachineType}}</p>
<p>Worker Count : {{.Schedule.CreateRequest.ClusterRequest.WorkerCount}}</p>
{{ if .Errors }}
<ol>
{{range .Errors}}
Expand Down

0 comments on commit 171f1d0

Please sign in to comment.