Skip to content

Commit 3317b35

Browse files
committed
rebase
1 parent ea0865c commit 3317b35

File tree

8 files changed

+19
-17
lines changed

8 files changed

+19
-17
lines changed

app/all/providers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
aws_batch_fargate "github.com/nullstone-io/deployment-sdk/app/container/aws-batch-fargate"
66
"github.com/nullstone-io/deployment-sdk/app/container/aws-ecs-ec2"
77
"github.com/nullstone-io/deployment-sdk/app/container/aws-ecs-fargate"
8-
aws_eks "github.com/nullstone-io/deployment-sdk/app/container/aws-eks"
8+
aws_eks_service "github.com/nullstone-io/deployment-sdk/app/container/aws-eks-service"
99
gcp_gke_service "github.com/nullstone-io/deployment-sdk/app/container/gcp-gke-service"
1010
"github.com/nullstone-io/deployment-sdk/app/server/aws-beanstalk"
1111
"github.com/nullstone-io/deployment-sdk/app/serverless/aws-lambda-container"
@@ -19,7 +19,7 @@ var (
1919
aws_batch_fargate.ModuleContractName: aws_batch_fargate.Provider,
2020
aws_ecs_fargate.ModuleContractName: aws_ecs_fargate.Provider,
2121
aws_ecs_ec2.ModuleContractName: aws_ecs_ec2.Provider,
22-
aws_eks.ModuleContractName: aws_eks.Provider,
22+
aws_eks_service.ModuleContractName: aws_eks_service.Provider,
2323
aws_s3.ModuleContractName: aws_s3.Provider,
2424
aws_lambda_zip.ModuleContractName: aws_lambda_zip.Provider,
2525
aws_lambda_container.ModuleContractName: aws_lambda_container.Provider,

app/container/aws-eks/provider.go renamed to app/container/aws-eks-service/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package aws_eks
1+
package aws_eks_service
22

33
import (
44
"github.com/nullstone-io/deployment-sdk/app"

aws/eks/deploy_status_getter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
)
1717

1818
func NewDeployStatusGetter(ctx context.Context, osWriters logging.OsWriters, source outputs.RetrieverSource, appDetails app.Details) (app.DeployStatusGetter, error) {
19-
outs, err := outputs.Retrieve[Outputs](ctx, source, appDetails.Workspace)
19+
outs, err := outputs.Retrieve[Outputs](ctx, source, appDetails.Workspace, appDetails.WorkspaceConfig)
2020
if err != nil {
2121
return nil, err
2222
}

aws/eks/deployer.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package eks
33
import (
44
"context"
55
"fmt"
6+
"github.com/mitchellh/colorstring"
67
"github.com/nullstone-io/deployment-sdk/app"
78
env_vars "github.com/nullstone-io/deployment-sdk/env-vars"
89
"github.com/nullstone-io/deployment-sdk/k8s"
@@ -16,7 +17,7 @@ const (
1617
)
1718

1819
func NewDeployer(ctx context.Context, osWriters logging.OsWriters, source outputs.RetrieverSource, appDetails app.Details) (app.Deployer, error) {
19-
outs, err := outputs.Retrieve[Outputs](ctx, source, appDetails.Workspace)
20+
outs, err := outputs.Retrieve[Outputs](ctx, source, appDetails.Workspace, appDetails.WorkspaceConfig)
2021
if err != nil {
2122
return nil, err
2223
}
@@ -36,9 +37,11 @@ type Deployer struct {
3637

3738
func (d Deployer) Print() {
3839
stdout, _ := d.OsWriters.Stdout(), d.OsWriters.Stderr()
39-
fmt.Fprintf(stdout, "eks endpoint: %q\n", d.Infra.ClusterNamespace.ClusterEndpoint)
40-
fmt.Fprintf(stdout, "eks service: %q\n", d.Infra.ServiceName)
41-
fmt.Fprintf(stdout, "repository image url: %q\n", d.Infra.ImageRepoUrl)
40+
colorstring.Fprintln(stdout, "[bold]Retrieved GKE service outputs")
41+
fmt.Fprintf(stdout, " cluster_endpoint: %s\n", d.Infra.ClusterNamespace.ClusterEndpoint)
42+
fmt.Fprintf(stdout, " service_namespace: %s\n", d.Infra.ServiceNamespace)
43+
fmt.Fprintf(stdout, " service_name: %s\n", d.Infra.ServiceName)
44+
fmt.Fprintf(stdout, " image_repo_url: %s\n", d.Infra.ImageRepoUrl)
4245
}
4346

4447
func (d Deployer) Deploy(ctx context.Context, meta app.DeployMetadata) (string, error) {
@@ -49,6 +52,7 @@ func (d Deployer) Deploy(ctx context.Context, meta app.DeployMetadata) (string,
4952
return "", fmt.Errorf("no version specified, version is required to deploy")
5053
}
5154

55+
fmt.Fprintln(stdout)
5256
fmt.Fprintf(stdout, "Deploying app %q\n", d.Details.App.Name)
5357

5458
if d.Infra.ServiceName == "" {
@@ -95,6 +99,5 @@ func (d Deployer) Deploy(ctx context.Context, meta app.DeployMetadata) (string,
9599
}
96100

97101
fmt.Fprintf(stdout, "Deployed app %q\n", d.Details.App.Name)
98-
fmt.Fprintln(stdout, "")
99102
return revision, nil
100103
}

aws/eks/iam_user_auth.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ func (i IamUserAuth) AuthInfo(ctx context.Context) (clientcmdapi.AuthInfo, error
2929
Region: aws.String(i.Region),
3030
})
3131
opts := &token.GetTokenOptions{
32+
Region: i.Region,
3233
ClusterID: i.ClusterId,
3334
Session: ses,
3435
}

aws/eks/log_streamer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func NewLogStreamer(ctx context.Context, osWriters logging.OsWriters, source outputs.RetrieverSource, appDetails app.Details) (app.LogStreamer, error) {
13-
outs, err := outputs.Retrieve[Outputs](ctx, source, appDetails.Workspace)
13+
outs, err := outputs.Retrieve[Outputs](ctx, source, appDetails.Workspace, appDetails.WorkspaceConfig)
1414
if err != nil {
1515
return nil, err
1616
}

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ require (
66
cloud.google.com/go/compute v1.32.0
77
cloud.google.com/go/logging v1.13.0
88
cloud.google.com/go/storage v1.47.0
9-
github.com/aws/aws-sdk-go v1.44.332
10-
github.com/aws/aws-sdk-go-v2 v1.26.0
9+
github.com/aws/aws-sdk-go v1.54.6
10+
github.com/aws/aws-sdk-go-v2 v1.30.4
1111
github.com/aws/aws-sdk-go-v2/credentials v1.16.16
1212
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.13
1313
github.com/aws/aws-sdk-go-v2/service/batch v1.35.1
@@ -41,6 +41,7 @@ require (
4141
k8s.io/apimachinery v0.32.1
4242
k8s.io/client-go v0.32.1
4343
k8s.io/kubectl v0.32.1
44+
sigs.k8s.io/aws-iam-authenticator v0.6.16
4445
)
4546

4647
require (

go.sum

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7 h1:QPMJf+Jw8E1l7zqhZmMlFw6w
147147
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7/go.mod h1:ykf3COxYI0UJmxcfcxcVuz7b6uADi1FkiUz6Eb7AgM8=
148148
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 h1:NzO4Vrau795RkUdSHKEwiR01FaGzGOH1EETJ+5QHnm0=
149149
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7/go.mod h1:6h2YuIoxaMSCFf5fi1EgZAwdfkGMgDY+DVfa61uLe4U=
150-
github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw=
151-
github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
150+
github.com/aws/smithy-go v1.20.4 h1:2HK1zBdPgRbjFOHlfeQZfpC4r72MOb9bZkiFwggKO+4=
151+
github.com/aws/smithy-go v1.20.4/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg=
152152
github.com/beorn7/perks v0.0.0-20150223135152-b965b613227f/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
153153
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
154154
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
@@ -751,9 +751,6 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
751751
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
752752
golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0=
753753
golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
754-
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
755-
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
756-
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
757754
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
758755
golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
759756
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=

0 commit comments

Comments
 (0)