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
{ | |
"apiVersion": "fission.io/v1", | |
"kind": "Environment", | |
"metadata": { | |
"name": "nodejs", | |
"namespace": "default" | |
}, | |
"spec": { | |
"builder": {}, | |
"keeparchive": false, |
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
{ | |
"swagger": "2.0", | |
"info": { | |
"description": "\nOpenAPI 2.0 document for fission controller\n* Metadata (v1.ObjectMeta) should be empty when creating a CRD resource. Kubernetes will assign it automatically.\n* Following semantic errors are known issues and won't affect the API access.\n - Operations must have unique operationIds.\n - All scale semantic errors. (Due to go-restful exposes inner fields of k8s struct).\n", | |
"title": "Fission OpenAPI 2.0", | |
"version": "v1" | |
}, | |
"paths": { | |
"/proxy/storage/v1/archive": { | |
"get": { |
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
$ go run ./p7uGl0JZ_TR.go | |
NoEmbedStruct | |
without pool: 1.558109ms | |
with pool: 89.337184ms | |
EmbedStruct | |
without pool: 651.618531ms | |
with pool: 84.505615ms | |
# https://stackoverflow.com/questions/45003259/passing-an-optimization-flag-to-a-go-compiler |
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 mq trigger | |
$ fission mqt create --name mqt-test --function <function name> --topic <topic-name> | |
# Check wether nats-streaming server create a channel to receive message | |
$ kubectl -n fission logs -f <nats-streaming pod> | |
[1] 2018/08/27 06:19:00.989160 [INF] STREAM: Starting nats-streaming-server[fissionMQTrigger] version 0.10.2 | |
[1] 2018/08/27 06:19:00.989192 [INF] STREAM: ServerID: qYfsXq0SHJ6ud9madIckpq | |
[1] 2018/08/27 06:19:00.989195 [INF] STREAM: Go version: go1.10.3 | |
[1] 2018/08/27 06:19:00.989636 [INF] Starting nats-server version 1.1.0 | |
[1] 2018/08/27 06:19:00.989855 [INF] Git commit [not set] |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"runtime" | |
"strconv" | |
"sync" | |
"time" | |
) |
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
+ kubectl -n fission delete pod -l svc=executor | |
pod "executor-7cf5d5c445-4f68r" deleted | |
+ sleep 60 | |
+ kubectl -n fission delete pod -l svc=router | |
pod "router-b4cfbd5c7-2ksnd" deleted | |
+ sleep 10 | |
+ hey -c 100 -n 100 http://192.168.99.100:31314/hello-go | |
Summary: | |
Total: 14.2395 secs |
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
+ kubectl -n fission delete pod -l svc=executor | |
pod "executor-7cf5d5c445-47xvl" deleted | |
+ sleep 60 | |
+ kubectl -n fission delete pod -l svc=router | |
pod "router-75474bc6b9-krz4f" deleted | |
+ sleep 10 | |
+ hey -c 100 -n 100 http://192.168.99.100:31314/hello-go | |
Summary: | |
Total: 0.0799 secs |
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
# exec form | |
FROM ubuntu | |
ENTRYPOINT ["top", "-b"] | |
# exec form result | |
top - 03:41:47 up 19 min, 0 users, load average: 0.61, 0.34, 0.27 | |
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie | |
%Cpu(s): 3.0 us, 2.3 sy, 0.0 ni, 94.4 id, 0.4 wa, 0.0 hi, 0.0 si, 0.0 st | |
KiB Mem : 3938828 total, 1300384 free, 582236 used, 2056208 buff/cache | |
KiB Swap: 1023996 total, 1023996 free, 0 used. 2561664 avail Mem |
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
--- | |
apiVersion: apiextensions.k8s.io/v1beta1 | |
kind: CustomResourceDefinition | |
metadata: | |
namespace: default | |
name: environments.fission.io | |
spec: | |
group: fission.io | |
names: | |
kind: Environment |
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
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
labels: | |
svc: logger | |
name: logger | |
namespace: fission | |
spec: | |
selector: | |
matchLabels: |
NewerOlder