This file contains 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
// The JSON comments are somewhat brittle. Don't try anything too fancy. | |
{ | |
// Default HTTP(S) address:port to listen on for websocket and long polling clients. Either a | |
// numeric or a canonical name, e.g. ":80" or ":https". Could include a host name, e.g. | |
// "localhost:80". | |
// Could be blank: if TLS is not configured, will use ":80", otherwise ":443". | |
// Can be overridden from the command line, see option --listen. | |
"listen": ":18080", | |
// Cach-Control header for static content. 11 hours. |
This file contains 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
# https://kourier.requestcatcher.com/ | |
apiVersion: kourier.tld/v1 | |
kind: webhook | |
metadata: | |
name: test | |
spec: | |
path: /test | |
method: POST | |
validation: |
This file contains 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
<yandex> | |
<!-- Listen wildcard address to allow accepting connections from other containers and host network. --> | |
<listen_host>0.0.0.0</listen_host> | |
<listen_try>1</listen_try> | |
<http_port>8123</http_port> | |
<tcp_port>9000</tcp_port> | |
<!-- output logs to console --> | |
<logger> | |
<level>information</level> |
This file contains 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
gke-streamlayer-sl-n1-standard-2-15ee5b38-41k1 /home/drago # iptables-save | grep MASQ | |
:KUBE-MARK-MASQ - [0:0] | |
-A POSTROUTING ! -d 10.0.0.0/8 -m comment --comment "kubenet: SNAT for outbound traffic from cluster" -m addrtype ! --dst-type LOCAL -j MASQUERADE | |
-A KUBE-FW-3XHAPDZ2SSE6DUFQ -m comment --comment "istio-system/istio-ingressgateway:http2-prometheus loadbalancer IP" -j KUBE-MARK-MASQ | |
-A KUBE-FW-4BQASKKZBUHVUKPW -m comment --comment "istio-system/istio-ingressgateway:tcp-citadel-grpc-tls loadbalancer IP" -j KUBE-MARK-MASQ | |
-A KUBE-FW-62L5C2KEOX6ICGVJ -m comment --comment "istio-system/istio-ingressgateway:tcp loadbalancer IP" -j KUBE-MARK-MASQ | |
-A KUBE-FW-7N6LHPYFOVFT454K -m comment --comment "istio-system/istio-ingressgateway:https loadbalancer IP" -j KUBE-MARK-MASQ | |
-A KUBE-FW-F4WP6CIDODMYIYVX -m comment --comment "istio-system/istio-ingressgateway:tcp-pilot-grpc-tls loadbalancer IP" -j KUBE-MARK-MASQ | |
-A KUBE-FW-FNIRFTR6AM2WTDP7 -m comment --comment "istio-system/istio-ingressgateway:http2-grafana loadba |
This file contains 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
/** | |
* Create method which can be throttled in different ways using redis cache | |
*/ | |
'use strict' | |
// global-level options | |
const defaultConfig = { | |
redis: null, // redis instance (required) | |
key: 'cache', // global redis key | |
ttl: null // global ttl value |
This file contains 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
db.statistic.aggregate( | |
// Pipeline | |
[ | |
// Stage 1 | |
{ | |
$group: { | |
_id: '$user._id', | |
total: { $sum: 1 } | |
} |
This file contains 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
### docker image with chinese mirrors (able to build in China directly) | |
FROM alpine:3.5 | |
MAINTAINER Andrey <vkfont@gmail.com> Afoninsky | |
ENV VERSION=v7.4.0 | |
ENV CONFIG_FLAGS="--fully-static --without-npm" | |
# add chinese mirrors | |
RUN truncate -s 0 /etc/apk/repositories && \ | |
echo 'https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.5/main' >> /etc/apk/repositories && \ |
This file contains 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
#!/bin/bash | |
### run deployment from local machine (not CI) | |
# rollback | |
# kubectl --namespace=fulldive-staging rollout history deployment/fulldive-api | |
# kubectl --namespace=fulldive-staging rollout undo deployment/fulldive-api --to-revision=10 | |
REGISTRY_URL="us.gcr.io" | |
GOOGLE_PROJECT_NAME="spair-api" | |
NAME=`node -e "console.log(require('./package').name)"` | |
VERSION=${2:-v`node -e "console.log(require('./package').version)"`} |
This file contains 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
#!/bin/bash | |
### run deployment from local machine (not CI) | |
docker info | |
if [ "$?" -ne "0" ]; then | |
exit | |
fi | |
REGISTRY_URL="us.gcr.io" | |
GOOGLE_PROJECT_NAME="spair-api" |
This file contains 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
general: | |
branches: | |
ignore: # https://discuss.circleci.com/t/deploy-on-tag-not-running-please-help/5104/8 | |
- /^(?!noSuchBranch).*$/ | |
machine: | |
environment: | |
REGISTRY_URL: us.gcr.io | |
GOOGLE_PROJECT_NAME: spair-api | |
CLUSTER_NAME: edissons-cluster |
NewerOlder