Skip to content

Commit

Permalink
update: aws-lb-controller to v1.8.2 (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroniscode authored Aug 20, 2024
1 parent 136c286 commit 70c5132
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 19 deletions.
4 changes: 2 additions & 2 deletions cmd/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/awslabs/eksdemo/pkg/application/appmesh_controller"
"github.com/awslabs/eksdemo/pkg/application/argo/argo_cd"
"github.com/awslabs/eksdemo/pkg/application/autoscaling/cluster_autoscaler"
awslbc "github.com/awslabs/eksdemo/pkg/application/aws/lbc"
"github.com/awslabs/eksdemo/pkg/application/aws_fluent_bit"
"github.com/awslabs/eksdemo/pkg/application/aws_lb_controller"
"github.com/awslabs/eksdemo/pkg/application/cert_manager"
"github.com/awslabs/eksdemo/pkg/application/cilium"
"github.com/awslabs/eksdemo/pkg/application/consul"
Expand Down Expand Up @@ -50,7 +50,7 @@ func NewInstallCmd() *cobra.Command {
cmd.AddCommand(NewInstallAliasCmds(autoscalingApps, "autoscaling-")...)
cmd.AddCommand(NewInstallAliasCmds(autoscalingApps, "as-")...)
cmd.AddCommand(aws_fluent_bit.NewApp().NewInstallCmd())
cmd.AddCommand(aws_lb_controller.NewApp().NewInstallCmd())
cmd.AddCommand(awslbc.NewApp().NewInstallCmd())
cmd.AddCommand(cert_manager.NewApp().NewInstallCmd())
cmd.AddCommand(cilium.NewApp().NewInstallCmd())
cmd.AddCommand(consul.NewApp().NewInstallCmd())
Expand Down
4 changes: 2 additions & 2 deletions cmd/install/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/awslabs/eksdemo/pkg/application/appmesh_controller"
"github.com/awslabs/eksdemo/pkg/application/argo/argo_cd"
"github.com/awslabs/eksdemo/pkg/application/autoscaling/cluster_autoscaler"
awslbc "github.com/awslabs/eksdemo/pkg/application/aws/lbc"
"github.com/awslabs/eksdemo/pkg/application/aws_fluent_bit"
"github.com/awslabs/eksdemo/pkg/application/aws_lb_controller"
"github.com/awslabs/eksdemo/pkg/application/cert_manager"
"github.com/awslabs/eksdemo/pkg/application/cilium"
"github.com/awslabs/eksdemo/pkg/application/consul"
Expand Down Expand Up @@ -50,7 +50,7 @@ func NewUninstallCmd() *cobra.Command {
cmd.AddCommand(NewUninstallAliasCmds(autoscalingApps, "autoscaling-")...)
cmd.AddCommand(NewUninstallAliasCmds(autoscalingApps, "as-")...)
cmd.AddCommand(aws_fluent_bit.NewApp().NewUninstallCmd())
cmd.AddCommand(aws_lb_controller.NewApp().NewUninstallCmd())
cmd.AddCommand(awslbc.NewApp().NewUninstallCmd())
cmd.AddCommand(cert_manager.NewApp().NewUninstallCmd())
cmd.AddCommand(cilium.NewApp().NewUninstallCmd())
cmd.AddCommand(consul.NewApp().NewUninstallCmd())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package aws_lb_controller
package lbc

import (
"github.com/awslabs/eksdemo/pkg/application"
Expand All @@ -16,7 +16,9 @@ import (
// Version: Latest is v2.8.1 (as of 6/4/24)

func NewApp() *application.Application {
app := &application.Application{
options, flags := newOptions()

return &application.Application{
Command: cmd.Command{
Name: "aws-lb-controller",
Description: "AWS Load Balancer Controller",
Expand All @@ -35,6 +37,8 @@ func NewApp() *application.Application {
}),
},

Flags: flags,

Installer: &installer.HelmInstaller{
ChartName: "aws-load-balancer-controller",
ReleaseName: "aws-lb-controller",
Expand All @@ -43,10 +47,9 @@ func NewApp() *application.Application {
Template: valuesTemplate,
},
},
}
app.Options, app.Flags = newOptions()

return app
Options: options,
}
}

// https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/docs/install/iam_policy.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package aws_lb_controller
package lbc

import (
"strings"
Expand All @@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
)

type AWSLBControllerOptions struct {
type Options struct {
application.ApplicationOptions

DefaultIngressClass bool
Expand All @@ -17,16 +17,16 @@ type AWSLBControllerOptions struct {
Replicas int
}

func newOptions() (options *AWSLBControllerOptions, flags cmd.Flags) {
options = &AWSLBControllerOptions{
func newOptions() (options *Options, flags cmd.Flags) {
options = &Options{
ApplicationOptions: application.ApplicationOptions{
Namespace: "awslb",
ServiceAccount: "aws-load-balancer-controller",
DefaultVersion: &application.LatestPrevious{
LatestChart: "1.8.1",
Latest: "v2.8.1",
PreviousChart: "1.7.0",
Previous: "v2.7.0",
LatestChart: "1.8.2",
Latest: "v2.8.2",
PreviousChart: "1.8.1",
Previous: "v2.8.1",
},
},
DefaultTargetType: "ip",
Expand Down
4 changes: 2 additions & 2 deletions pkg/resource/cluster/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
awssdk "github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/ec2/types"
"github.com/awslabs/eksdemo/pkg/application"
"github.com/awslabs/eksdemo/pkg/application/aws_lb_controller"
awslbc "github.com/awslabs/eksdemo/pkg/application/aws/lbc"
"github.com/awslabs/eksdemo/pkg/application/external_dns"
"github.com/awslabs/eksdemo/pkg/application/karpenter"
"github.com/awslabs/eksdemo/pkg/application/storage/ebs_csi"
Expand Down Expand Up @@ -62,7 +62,7 @@ func addOptions(res *resource.Resource) *resource.Resource {
VpcCidr: "192.168.0.0/16",

appsForIrsa: []*application.Application{
aws_lb_controller.NewApp(),
awslbc.NewApp(),
ebs_csi.NewApp(),
external_dns.New(),
karpenter.NewApp(),
Expand Down

0 comments on commit 70c5132

Please sign in to comment.