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
[I] ➜ go tool pprof http://localhost:3001/debug/pprof/heap | |
Fetching profile over HTTP from http://localhost:3001/debug/pprof/heap | |
Saved profile in /Users/bryan/pprof/pprof.alloc_objects.alloc_space.inuse_objects.inuse_space.013.pb.gz | |
Type: inuse_space | |
Time: Aug 1, 2019 at 3:28pm (EDT) | |
Entering interactive mode (type "help" for commands, "o" for options) | |
(pprof) top | |
Showing nodes accounting for 676.12MB, 90.43% of 747.64MB total | |
Dropped 171 nodes (cum <= 3.74MB) | |
Showing top 10 nodes out of 94 |
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
Surround these with : e.g. :calling: | |
+1 | |
-1 | |
bulb | |
calling | |
clap | |
cop | |
feet |
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 objectstore | |
import ( | |
"sync" | |
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" | |
"k8s.io/apimachinery/pkg/runtime/schema" | |
"k8s.io/apimachinery/pkg/types" | |
"github.com/vmware/octant/third_party/k8s.io/client-go/dynamic/dynamicinformer" |
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
/* | |
Copyright (c) 2019 VMware, Inc. All Rights Reserved. | |
SPDX-License-Identifier: Apache-2.0 | |
*/ | |
package main | |
import ( | |
"context" | |
"fmt" |
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
/* | |
Copyright (c) 2019 VMware, Inc. All Rights Reserved. | |
SPDX-License-Identifier: Apache-2.0 | |
*/ | |
package main | |
import ( | |
"context" | |
"fmt" |
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
func (dc *DynamicCache) Update(ctx context.Context, key store.Key, mutator func(*unstructured.Unstructured) error) error { | |
if mutator == nil { | |
return errors.New("can't update object") | |
} | |
err := kretry.RetryOnConflict(kretry.DefaultRetry, func() error { | |
object, err := dc.Get(ctx, key) | |
if err != nil { | |
return err | |
} |
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
{ | |
"title": [ | |
{ | |
"metadata": { | |
"type": "text" | |
}, | |
"config": { | |
"value": "Deployment" | |
} | |
}, |
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 | |
type KeyPair struct { | |
Key string | |
Value []byte | |
} | |
type KeyStore interface { | |
Get(k string) (*KeyPair, error) | |
} |
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
import * as kdux from 'kdux'; | |
kdux.Configure(config => { | |
config.commonLabels = { | |
project: "project-1" | |
}; | |
config.commonAnnotations = { | |
onCallEmail: "email@example.com" | |
}; |
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
local params = std.extVar('__ksonnet/params').components['site-ingress']; | |
local svcParams = std.extVar('__ksonnet/params').components['site-service']; | |
local deployParams = std.extVar('__ksonnet/params').components['site-deployment']; | |
{ | |
apiVersion: 'extensions/v1beta1', | |
kind: 'Ingress', | |
metadata: { | |
annotations: { | |
'kubernetes.io/ingress.class': 'contour', |