First build pilot with GCFLAGS="all=-n -l"
:
GCFLAGS="all=-N -l" DEBUG=1 HUB=docker.io/slandow TAG=slandow BUILD_IN_CONTAINER=1 make docker.pilot
Then we can wrap that image in one that includes delve:
#!/usr/bin/env bash | |
number=$1 | |
name=$2 | |
region=$3 | |
zone=$4 | |
twodigits=$(printf "%02d\n" $number) | |
if [ -z "$3" ]; then | |
region=us-east-1 |
# go and find a deeply nested key with the name accessLog | |
jq '.. |."accessLog"? | select(. != null)' |
"domains": [ | |
"catalog.prod.svc.cluster.local" | |
], | |
"name": "catalog.prod.svc.cluster.local:80", | |
"routes": [ | |
{ | |
"match": { | |
"headers": [ | |
{ | |
"name": "x-dark-launch", |
kubectl --context=cluster1 create ns echo | |
kubectl --context=cluster1 label ns echo istio-injection=enabled | |
kubectl --context=cluster1 -n echo apply -f https://git.io/JyIRn | |
kubectl --context=cluster1 -n echo apply -f https://git.io/JyqPy | |
kubectl kubectl --context=mgmt apply -f - <<EOF | |
--- | |
apiVersion: networking.enterprise.mesh.gloo.solo.io/v1beta1 | |
kind: RateLimitServerConfig | |
metadata: |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: keycloak | |
labels: | |
app: keycloak | |
spec: | |
ports: | |
- name: http | |
port: 8080 |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: echo-v2 | |
name: echo-v2 | |
spec: | |
ports: | |
- name: http | |
port: 8080 |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: echo-v1 | |
name: echo-v1 | |
spec: | |
ports: | |
- name: http | |
port: 8080 |
analyzeSentence() { | |
fetch('/sentiment', { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json', | |
'Authorization': `Bearer ${auth.getAccessToken()}` // Access Token | |
}, | |
body: JSON.stringify({ sentence: this.textField.getValue() }) | |
}) | |
.then(response => response.json()) |
#!/bin/bash | |
#set -e | |
help() { | |
cat <<EOF | |
A minimalistic script to showcase named arguments in bash. | |
The following flags are required. | |
--req-arg If required arg is not specified execution is interrupted. |