Skip to content

Instantly share code, notes, and snippets.

View wwitzel3's full-sized avatar

Wayne Witzel III wwitzel3

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"type": "event.octant.dev/content",
"data": {
"content": {
"viewComponents": [
{
"metadata": { "type": "flexlayout" },
"config": {
"sections": [
[
import * as octant from "./octant";
let podGVK = {version: "v1", kind: "Pod"}
export default class MyPlugin implements octant.Plugin {
name = "typescript plugin";
description = "typescript plugin description";
isModule = false;
capabilities = {supportPrinterConfig: [podGVK]};
---
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"projectcontour.io/v1","kind":"HTTPProxy","metadata":{"annotations":{},"name":"httpbin","namespace":"default"},"spec":{"includes":[{"conditions":[{"prefix":"/httpbin"}],"name":"httpbin","namespace":"wwitzel3"}],"virtualhost":{"fqdn":"sites.octant.dev"}}}
creationTimestamp: "2020-06-23T20:41:01Z"
generation: 1
name: httpbin
---
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"projectcontour.io/v1","kind":"HTTPProxy","metadata":{"annotations":{},"name":"httpbin","namespace":"wwitzel3"},"spec":{"routes":[{"services":[{"name":"httpbin","port":8080}]}],"virtualhost":{"fqdn":"sites.octant.dev"}}}
creationTimestamp: "2020-06-23T18:32:31Z"
generation: 5
name: httpbin
function create(registrationSvc: PluginRegistrationService) {
//registrationSvc.SetCapabilities(myCapabilities);
registrationSvc.SetPrintHandler(myPrinter)
}
function myPrinter(printRequest: PrintRequest) :string {
let key = printRequest.KeyFromObject()
let clientResp = printRequest.Client.Get(key)
return "Object: " + printRequest.Object() + ", Key: " + key + ", Client.Get: " + clientResp;
@wwitzel3
wwitzel3 / octant-webinar.txt
Last active June 17, 2020 11:41
octant webinar
## Octant CNCF Webinar
### Intro Slide
First let me say Hi and thank you everyone for taking some time out of your day to learn a bit more about Octant.
(as mentioned) My name is Wayne Witzel and I am one of the Octant maintainers and I'm really excited to be here to show you,
what I think is a pretty awesome tool for developers.
I encourage you to ask questions as you watch, and if possible, I will answer some questions dircetly during the demo portion, but we will have a dedicated Q and A session at the end, so don't worry if I miss your question during the live demo.
@wwitzel3
wwitzel3 / gist:c448816e103c839d582f1faab0174c0e
Created May 18, 2020 17:02
kubectl client key authorization expired cert
~/.kube  docker exec kind-control-plane cat /etc/kubernetes/pki/ca.key > ~/repos/octant/kind.ca.key
~/.kube  docker exec kind-control-plane cat /etc/kubernetes/pki/ca.crt > ~/repos/octant/kind.ca.crt
openssl genrsa -out readonly.key 2048
openssl req -new -key readonly.key -out readonly.csr -subj "/CN=readonly/O=octant"
openssl x509 -req -in readonly.csr -CA kind.ca.crt -CAkey kind.ca.key -CAcreateserial -out readonly.crt -days 500
✘  ~/podreader  cat 01-clusterrole.yaml
PS C:\Users\wwitzel3> Get-ChildItem -Path C:\Windows\System32 -Filter MRT.exe -Recurse -ErrorAction SilentlyContinue -Force
Directory: C:\Windows\System32
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 14-Aug-19 07:24 134272480 MRT.exe
func frontendNoCacheMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
path := r.URL.EscapedPath()
if path == "/" {
w.Header().Set("Cache-Control", "no-cache, no-store")
}
next.ServeHTTP(w, r)
})
}