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
deployment := &unstructured.Unstructured{ | |
Object: map[string]interface{}{ | |
"apiVersion": "apps/v1", | |
"kind": "Deployment", | |
"metadata": map[string]interface{}{ | |
"name": "demo-deployment", | |
}, | |
"spec": map[string]interface{}{ | |
"replicas": 2, | |
"selector": map[string]interface{}{ |
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 | |
import ( | |
"context" | |
"fmt" | |
v1 "k8s.io/api/core/v1" | |
"k8s.io/apimachinery/pkg/runtime" | |
"k8s.io/client-go/informers" | |
"k8s.io/client-go/kubernetes/fake" | |
testingKube "k8s.io/client-go/testing" |
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 createDeployment(clientAppsV1 typedappsv1.AppsV1Interface) error { | |
deployment := &appsv1.Deployment{ | |
ObjectMeta: metav1.ObjectMeta{ | |
Name: appName, | |
Labels: map[string]string{ | |
"app": appName, | |
}, | |
}, | |
Spec: appsv1.DeploymentSpec{ | |
Replicas: pointer.Int32Ptr(1), |
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 main() { | |
// Subcommands | |
aws := flag.NewFlagSet("aws", flag.ExitOnError) | |
inCluster := flag.NewFlagSet("inCluster", flag.ExitOnError) | |
outCluster := flag.NewFlagSet("outCluster", flag.ExitOnError) | |
// aws subcommand flag pointers | |
clusterName := aws.String("clusterName", "", "EKS Cluster name. (Required)") | |
clusterUrl := aws.String("clusterUrl", "", "EKS Cluster url. (Required)") | |
roleArn := aws.String("roleArn", "", "EKS Role to assume. (Required)") |
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 k8sAuth | |
import ( | |
"flag" | |
"fmt" | |
"github.com/aws/aws-sdk-go/aws/session" | |
"k8s.io/client-go/kubernetes" | |
"k8s.io/client-go/rest" | |
"k8s.io/client-go/tools/clientcmd" | |
"k8s.io/client-go/tools/clientcmd/api" |
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
{ | |
"chaoslib-version": "0.20.0", | |
"platform": "Windows-10-10.0.14393-SP0", | |
"node": "XXXXXXXXX", | |
"experiment": { | |
"version": "0.1.0", | |
"title": "Stopping a given EC2 instance", | |
"description": "Stopping a given EC2 instance", | |
"tags": [], | |
"steady-state-hypothesis": { |