Knative Serving allows for collecting runtime profiling data expected by the
pprof visualization tool. Profiling data is available for the autoscaler,
activator, controller, webhook and for the queue-proxy container which is
injected into the user application pod. When enabled Knative serves profiling
data on the default port 8008
through a web server.
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
import com.google.gson.JsonObject | |
import com.github.salomonbrys.kotson.* | |
fun main(args : JsonObject): JsonObject { | |
val name = args["name"].string | |
return jsonObject( | |
"message" to "Hello $name!" | |
) | |
} |
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
import com.google.gson.JsonObject | |
fun main(args : JsonObject): JsonObject { | |
val name = args["name"].asString | |
val response = JsonObject() | |
response.addProperty("message", "Hello $name!") | |
return response | |
} |
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
buildscript { | |
ext.kotlin_version = '1.1.2-2' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_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
[user] | |
name = Markus Thömmes | |
email = [email protected] | |
[push] | |
default = matching | |
[alias] | |
pr = "!sh -c \"git fetch upstream pull/$1/head:pr-$1\" -" | |
update-fork = "!sh -c \"git fetch upstream; git rebase upstream/master; git push origin master\" -" | |
[core] | |
excludesfile = ~/.gitignore |
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: v1 | |
kind: Service | |
metadata: | |
name: test-service | |
spec: | |
ports: | |
- port: 8080 | |
name: http | |
selector: | |
app: test |
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
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: serverless-operator | |
data: | |
customResourceDefinitions: |- | |
- apiVersion: apiextensions.k8s.io/v1beta1 | |
kind: CustomResourceDefinition | |
metadata: |
- Get a machine to run
mitmproxy
. Anything that can get an IP will work. - Download
mitmproxy
:wget https://snapshots.mitmproxy.org/5.0.1/mitmproxy-5.0.1-linux.tar.gz
- Unpack:
tar -xf mitmproxy-5.0.1-linux.tar.gz
- Just run mitmproxy:
./mitmproxy --set block_global=false
. Disablingblock_global
is important to allow any traffic. - Get the relevant certificate:
cat ~/.mitmproxy/mitmproxy-ca-cert.pem
- Try out it works:
curl --proxy $IP:8080 --cacert mitmproxy-ca-cert.pem https://www.canihazip.com/s
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
package main | |
import ( | |
"context" | |
"fmt" | |
"io/ioutil" | |
"net" | |
"net/http" | |
) |
serving.yaml
and serving-cert-manager.yaml
will be shipped for the last time in this release. They have been broken out into separate artifacts. Please refer to the current installation docs for guidance on how to install Knative Serving and its optional components.
As per the Kubernetes minimum version principle - our current minimum supported Kubernetes version is now 1.16.
OlderNewer