Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
"log"
"os"
"os/exec"
//"time"
"time"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/dynamodb"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
//autoscaling "k8s.io/client-go/applyconfigurations/autoscaling/v1"
autoscaling "k8s.io/client-go/applyconfigurations/autoscaling/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
)
Expand Down Expand Up @@ -66,14 +66,18 @@ func deleteIngress(id, name, ddbTable string) {
log.Fatal(err)
}

/*
// Delete the cronjob so we don't spam the database for stuff that's not running
err = clientset.BatchV1().CronJobs("default").Delete(context.Background(), id, v1.DeleteOptions{})
if err != nil {
log.Fatal(err)
}

// Scale it down to save money
time.sleep(60)
time.Sleep(60)
_, err = clientset.AppsV1().Deployments("default").ApplyScale(context.Background(), id, &autoscaling.ScaleApplyConfiguration{Spec: &autoscaling.ScaleSpecApplyConfiguration{Replicas: new(int32)}}, v1.ApplyOptions{})
if err != nil {
log.Fatal(err)
}
*/

svc := dynamodb.New(sess)
err = updateFleetInstanceState(id, ddbTable, svc)
Expand Down