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
# Copyright 2018 The Knative Authors | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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: apps/v1 # for versions before 1.9.0 use apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
spec: | |
selector: | |
matchLabels: | |
app: nginx | |
replicas: 2 # tells deployment to run 2 pods matching the template | |
template: |
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: Namespace | |
metadata: | |
name: lab-5 | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
lab: lab-5 |
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 ( | |
"flag" | |
"log" | |
"os" | |
"os/exec" | |
"path/filepath" | |
"github.com/sirupsen/logrus" |
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: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: system:aggregated-metrics-reader | |
labels: | |
rbac.authorization.k8s.io/aggregate-to-view: "true" | |
rbac.authorization.k8s.io/aggregate-to-edit: "true" | |
rbac.authorization.k8s.io/aggregate-to-admin: "true" | |
rules: | |
- apiGroups: ["metrics.k8s.io"] |
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: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: httpbin | |
project: httpbin | |
name: httpbin | |
spec: | |
replicas: 1 | |
selector: |
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: apiextensions.k8s.io/v1beta1 | |
kind: CustomResourceDefinition | |
metadata: | |
name: crontabs.stable.example.com | |
spec: | |
group: stable.example.com | |
versions: | |
- name: v1 | |
served: true | |
storage: true |
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
[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 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 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 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
/* | |
Copyright (c) 2019 VMware, Inc. All Rights Reserved. | |
SPDX-License-Identifier: Apache-2.0 | |
*/ | |
package main | |
import ( | |
"context" | |
"fmt" |