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
type Var struct { | |
. | |
. | |
. | |
// EnvRef refers to a variable from the process environment whose value will be extracted for use in | |
// replacing $(FOO). | |
EnvRef EnvVar `json:"envref" yaml:"envref"` | |
} |
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
if filepath.Ext(mf.path) == ".json" { | |
// Unmarshal the YAML instead of directly marshaling to JSON to support future changes of kustomizationFile::marshal method: | |
k := make(map[string]interface{}) | |
err := yaml.Unmarshal(data, &k) | |
if err != nil { | |
return err | |
} | |
// Remove `kind` and `apiVersion` so as make minimal changes to original source file: |
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
var uaDeviceDetector=require('ua-device-detector'); | |
var deviceInfo=uaDeviceDetector.parseUserAgent(options); |
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
var re = { | |
and: [ | |
{ | |
or: [ | |
/\bChrome\b/, | |
/\bCriOS\b/ | |
] | |
}, | |
{not: /\bOPR\b/} | |
] |
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
{ | |
"raw": { | |
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.80 Safari/537.36", | |
"os": { | |
"windows": false, | |
"mac": false, | |
. | |
. | |
. | |
"windows-phone": false, |
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
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.80 Safari/537.36 |
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
{ | |
"apiVersion": "operators.srfrnk.com/v1", | |
"kind": "FlinkJob", | |
"metadata": { | |
"name": "flink-streaming-job" | |
}, | |
"spec": { | |
"version": "IMAGE_VERSION", | |
"jobManagerUrl": "flink-jobmanager:8081", | |
"jarImage": "flink-test:IMAGE_VERSION", |
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
kubectl apply -f https://raw.githubusercontent.com/srfrnk/k8s-flink-operator/master/dist/flink-controller.yaml |
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
kubectl create namespace metacontroller | |
kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/metacontroller/master/manifests/metacontroller-rbac.yaml | |
kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/metacontroller/master/manifests/metacontroller.yaml |
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
#!/usr/bin/env bash | |
echo "Checking health:" | |
if [[ -f /app/jobId ]] | |
then | |
jobId=$(cat /app/jobId) | |
echo "Checking job ${jobId}..." | |
count=$(flink list -m ${jobManagerUrl} -r | grep -e ": ${jobId} :" | wc -l) | |
if [[ ${count} -gt 0 ]] | |
then echo "Job running.";exit 0 | |
else echo "Job missing.";exit 1 |