Skip to content

Instantly share code, notes, and snippets.

View ncdc's full-sized avatar

Andy Goldstein ncdc

View GitHub Profile
diff --git a/pkg/cmd/server/server.go b/pkg/cmd/server/server.go
index 779df46..1ba4d96 100644
--- a/pkg/cmd/server/server.go
+++ b/pkg/cmd/server/server.go
@@ -224,6 +224,8 @@ func newServer(namespace, baseName, pluginDir string, logger *logrus.Logger) (*s
}
func (s *server) run() error {
+ defer s.pluginManager.CleanupClients()
+
"route_table_dump": {
"name": "ingress_http",
"virtual_hosts": [
{
"name": "kuard.demo",
"domains": [
"kuard.demo"
],
"routes": [
{
@ncdc
ncdc / brainstorming.sh
Last active March 22, 2018 17:35
Ark backup target UX brainstorming
# Create a backup target
$ ark backuptarget create s3-us-east-1 --provider aws --config region=us-east-1,bucket=foo
# Work the default target
$ ark backuptarget default get
s3-us-east-1
$ ark backuptarget default set s3-us-west-1
# Create volume targets
$ ark volumetarget create aws-us-east-1 --provider aws --config region=us-east-1,credentialsFile=/foo
Name: minio-setup-hzlms
Namespace: heptio-ark
Node: f26/10.211.55.3
Start Time: Thu, 15 Mar 2018 10:41:13 -0400
Labels: controller-uid=e8bd8b60-285e-11e8-934d-001c4250b198
job-name=minio-setup
Annotations: <none>
Status: Succeeded
IP: 192.168.56.38
Controlled By: Job/minio-setup
ark backup describe b1
Name: b1
Namespace: heptio-ark
Labels: <none>
Annotations: <none>
Namespaces:
Included: default
Excluded: <none>
diff --git a/README.md b/README.md
index 03849dc..9f30d51 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
---
permalink: /
redirect_to:
-- /master/
+- LATEST
@ncdc
ncdc / backup.go
Created December 15, 2017 22:19
How would you unit test this?
func (c *backupController) run(backup *v1.Backup) error {
var errs []error
// shallow copy to backup so we can generate a patch
var original := backup
// deep copy so we don't mutate original
backup = backup.DeepCopy()
file, _ := ioutil.TempFile("", "")
defer file.Close()
@ncdc
ncdc / main.go
Created November 17, 2017 19:53
Sample Heptio Ark plugin
package main
import (
plugin "github.com/hashicorp/go-plugin"
"github.com/heptio/ark/pkg/cloudprovider"
"github.com/heptio/ark/pkg/cloudprovider/aws"
arkplugin "github.com/heptio/ark/pkg/plugin"
"github.com/sirupsen/logrus"
)
@ncdc
ncdc / azure-credentials
Created November 15, 2017 19:00
Possible azure credentials file for Heptio Ark
subscription_id: ...
tenant_id: ...
resource_group: ...
client_id: ...
client_secret: ...
storage_account_name: ...
storage_key: ...
@ncdc
ncdc / calls.txt
Created November 9, 2017 17:13
kubicorn aws calls
Sdk.ASG.CreateAutoScalingGroup(input)
Sdk.ASG.CreateLaunchConfiguration(lcInput)
Sdk.ASG.CreateOrUpdateTags(tagInput)
Sdk.ASG.DeleteAutoScalingGroup(input)
Sdk.ASG.DeleteLaunchConfiguration(input)
Sdk.ASG.DescribeAutoScalingGroups(input)
Sdk.ASG.DescribeLaunchConfigurations(lcInput)
Sdk.ASG.UpdateAutoScalingGroup(input)
Sdk.Client.Droplets.Create(context.TODO()
Sdk.Client.Droplets.Delete(context.TODO()