Skip to content

Commit

Permalink
change out webhook servers from gcr.io to gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-usui committed Mar 10, 2022
1 parent 0758513 commit 6d0ef7a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 25 deletions.
2 changes: 1 addition & 1 deletion infra/k8s/default/bt-github-notify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ spec:
envFrom:
- secretRef:
name: general-secrets
image: gcr.io/berkeleytime-218606/github-notify:latest
image: berkeleytime.com:5000/berkeleytime/bt-github-notify
imagePullPolicy: Always
name: bt-github-notify
2 changes: 1 addition & 1 deletion infra/k8s/default/bt-gitlab-notify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ spec:
name: general-secrets
- secretRef:
name: slack-webhooks
image: gcr.io/berkeleytime-218606/gitlab-notify:latest
image: berkeleytime.com:5000/berkeleytime/bt-gitlab-notify
imagePullPolicy: Always
name: bt-gitlab-notify
2 changes: 1 addition & 1 deletion statuspage/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export const PORT_EXPRESS_HTTPS = 443;
export const STATUS_DEGRADED_PERFORMANCE = "degraded_performance";
export const STATUS_OPERATIONAL = "operational";
export const STATUS_MAJOR_OUTAGE = "major_outage";
export const URL_BERKELEYTIME = "http://berkeleytime.com";
export const URL_BERKELEYTIME = "https://berkeleytime.com";
27 changes: 13 additions & 14 deletions statuspage/config.statuspage.template.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"url": "https://berkeleytime.com",
"apiKey": "api key",
"pageId": "page id",
"statusInterval": 120,

"apiStatus": {
"metricId": "api metric id",
"componentId": "api component id"
},

"frontendStatus": {
"metricId": "frontend metric id",
"componentId": "frontend component id"
}
"apiKey": "32465954-9baf-4532-....",
"pageId": "0xf....",
"apiStatus": {
"metricId": "6kt04d...",
"componentId": "8gz..."
},
"frontendStatus": {
"metricId": "sdysw0....",
"componentId": "4yzhg..."
},
"gitlabStatus": {
"componentId": "z4m6slg..."
}
}
9 changes: 2 additions & 7 deletions statuspage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,8 @@ const updateStatuspage = async (ping, auth) => {
};

for await (const _ of setInterval(spConfig.statusInterval * 1000)) {
const {
apiStatus,
frontendStatus,
gitlabStatus,
elasticsearchStatus,
url,
} = spConfig;
const { apiStatus, frontendStatus, gitlabStatus, elasticsearchStatus, url } =
spConfig;
const niceTime = () =>
moment().tz("America/Los_Angeles").format(`YYYY-MM-DD HH:mm:ss dddd`);
await updateStatuspage(async () => {
Expand Down
2 changes: 1 addition & 1 deletion statuspage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"moment-timezone": "^0.5.33"
},
"devDependencies": {
"nodemon": "^2.0.7",
"nodemon": "^2.0.15",
"prettier-plugin-jsdoc": "^0.3.18"
}
}

0 comments on commit 6d0ef7a

Please sign in to comment.