This gist contains code samples for the blog post "Connected data: Using BigQuery to analyse user behaviour in response to webhooks".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cmd | |
import ( | |
"bytes" | |
"context" | |
"encoding/json" | |
"fmt" | |
"os" | |
"strings" | |
"text/template" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make-it-rain.json: make-it-rain.jsonnet | |
jsonnet -J $(ANU_ROOT)/utopia/lib -J $(ANU_ROOT)/utopia/jvendor $^ > $@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local registry = import 'registry/index.jsonnet'; | |
// Compute the rbac rules that should be configured in ArgoCD, using the service | |
// registry to determine who should be given what permissions. | |
// | |
// This module can be evaluated concretely, which may help to debug the rbac | |
// list for ArgoCD. | |
{ | |
_config:: { | |
// Operator grants- anyone with admin or operator should be permitted to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local app = import 'app.libsonnet'; | |
app { | |
_config+:: { | |
release: 'release-bot', | |
namespace: 'connect-team', | |
environment: 'production', | |
app: 'release-bot', | |
image: 'eu.gcr.io/gc-containers/gocardless/release-bot', | |
tag: 'TODO', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local k = import 'vendor/k8s.libsonnet'; | |
k { | |
_config+:: { | |
name: 'name', | |
namespace: 'namespace', | |
node_storage: '5Gi', | |
labels: { app: 'elastic-cloud' }, | |
version: '7.5.2', | |
master_replicas: 3, |
2020-01-10 09:01:07.456 UTC [9359] LOG: duration: 0.127 ms parse <unnamed>: select pg_sleep($1)
2020-01-10 09:01:07.457 UTC [9359] LOG: duration: 0.078 ms bind <unnamed>: select pg_sleep($1)
2020-01-10 09:01:07.457 UTC [9359] DETAIL: parameters: $1 = '2'
2020-01-10 09:01:09.461 UTC [9359] LOG: duration: 2004.025 ms execute <unnamed>: select pg_sleep($1)