Skip to content

Instantly share code, notes, and snippets.

View incfly's full-sized avatar

Jianfei Hu incfly

  • ClickHouse
  • San Francisco Bay Area
View GitHub Profile
#!/usr/bin/python3
import urllib.request
# url =
# 'https://storage.googleapis.com/istio-prow/logs/integ-distroless-k8s-tests_istio_postsubmit/1418/build-log.txt'submit/1418/build-log.txt'
def download_url(run: int, suite='integ-distroless-k8s-tests_istio_postsubmit'):
return f'https://storage.googleapis.com/istio-prow/logs/{suite}/{run}/build-log.txt'
{
"bootstrap": {
"node": {
"id": "sidecar~10.1.0.245~elasticsearch-logging-0.kubeprod~kubeprod.svc.cluster.local",
"cluster": "elasticsearch.kubeprod",
"metadata": {
"CLUSTER_ID": "Kubernetes",
"CONFIG_NAMESPACE": "kubeprod",
"EXCHANGE_KEYS": "NAME,NAMESPACE,INSTANCE_IPS,LABELS,OWNER,PLATFORM_METADATA,WORKLOAD_NAME,CANONICAL_TELEMETRY_SERVICE,MESH_ID,SERVICE_ACCOUNT",
"INSTANCE_IPS": "10.1.0.245",
Namespace(baseline=False, bothsidecar=True, cacert=None, client=None, clientsidecar=False, config_file='./configs/istio/plaintext/latency.yaml', conn=None, duration=None, extra_labels=None, headers=None, ingress=None, mesh='istio', mode='http', perf=False, qps=None, server=None, serversidecar=False, size=1024, telemetry_mode='mixer')
-------------- Running in both sidecar mode --------------
kubectl --namespace twopods-istio exec fortioclient-9c8d6768f-glqtx -- fortio load -c 2 -qps 1000 -t 120s -a -r 0.00005 -httpbufferkb=128 -labels 0ec0d497_qps_1000_c_2_1024_none_plaintext_both http://fortioserver:8080/echo?size=1024
Defaulting container name to captured.
Use 'kubectl describe pod/fortioclient-9c8d6768f-glqtx -n twopods-istio' to see all of the containers in this pod.
Fortio 1.3.2-pre running at 1000 queries per second, 32->32 procs, for 2m0s: http://fortioserver:8080/echo?size=1024
01:43:17 I httprunner.go:82> Starting http test for http://fortioserver:8080/echo?size=1024 with 2 threads at 1000.0 qps
tar -xzf /home/jianfeih/workspace/go/src/istio.io/tools/perf/istio-install/tmp/istio-1.5-alpha.d1b25ad161350973c87bec45a4620c96226f2e46.tgz -C /tmp/tmp.7Jp9J0FD6F --strip-components 1
+ [[ -z '' ]]
+ mv /tmp/tmp.7Jp9J0FD6F/install/kubernetes/helm /home/jianfeih/workspace/go/src/istio.io/tools/perf/istio-install/tmp/1.5-alpha.d1b25ad161350973c87bec45a4620c96226f2e46
+ mv /tmp/tmp.7Jp9J0FD6F/bin/istioctl /home/jianfeih/workspace/go/src/istio.io/tools/perf/istio-install/tmp/1.5-alpha.d1b25ad161350973c87bec45a4620c96226f2e46
+ cp /tmp/tmp.7Jp9J0FD6F/bin/istioctl /home/jianfeih/workspace/go/src/istio.io/tools/perf/istio-install/tmp
cp: cannot stat '/tmp/tmp.7Jp9J0FD6F/bin/istioctl': No such file or directory
@incfly
incfly / automtls-sample.yaml
Created March 23, 2020 20:08
Sample envoy config to illustrating how auto mtls works.
dynamic_active_clusters:
- name: "outbound||httpbin.svc.default.cluster.local"
transportSocketMatches:
- name: "istioMtls"
match:
tlsLabel: "istio-mutual" # could also be other
transport_socket:
# sample tls config on client side.
# same as today's setup, use file path just as an e.g. The SDS will be similiar.
common_tls_context:
@incfly
incfly / demo.yaml
Created January 31, 2020 09:54
knative-mtls-dummy-service
# Resources for AddonComponents prometheus component
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus-istio-system
labels:
app: prometheus
release: istio
rules:
@incfly
incfly / knative.sh
Last active December 4, 2019 23:03
knative-mtls
function prepare() {
kubectl create ns bug
kubectl label ns bug istio-injection=enabled
cat <<EOF | kubectl apply -f -
apiVersion: "authentication.istio.io/v1alpha1"
kind: "Policy"
metadata:
name: "default"
"listener": {
"name": "0.0.0.0_443",
"address": {
"socket_address": {
"address": "0.0.0.0",
"port_value": 443
}
},
"filter_chains": [
{
This file has been truncated, but you can view the full file.
[2019-10-28 22:11:00.279][20][debug][main] [external/envoy/source/server/server.cc:173] flushing stats
[2019-10-28 22:11:01.113][20][trace][connection] [external/envoy/source/common/network/connection_impl.cc:458] [C1] socket event: 3
[2019-10-28 22:11:01.113][20][trace][connection] [external/envoy/source/common/network/connection_impl.cc:543] [C1] write ready
[2019-10-28 22:11:01.113][20][trace][connection] [external/envoy/source/common/network/connection_impl.cc:496] [C1] read ready
[2019-10-28 22:11:01.113][20][trace][connection] [external/envoy/source/common/network/raw_buffer_socket.cc:23] [C1] read returns: 107
[2019-10-28 22:11:01.113][20][trace][connection] [external/envoy/source/common/network/raw_buffer_socket.cc:37] [C1] read error: Resource temporarily unavailable
[2019-10-28 22:11:01.113][20][trace][http] [external/envoy/source/common/http/http1/codec_impl.cc:391] [C1] parsing 107 bytes
[2019-10-28 22:11:01.113][20][trace][http] [external/envoy/source/common/http/http1/codec_impl.cc:540] [C1] mes