Skip to content

Commit

Permalink
chore: Rename directories to v1beta1 naming (aws#4595)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis authored Sep 8, 2023
1 parent ed03969 commit 5f450f7
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/PuerkitoBio/goquery v1.8.1
github.com/avast/retry-go v3.0.0+incompatible
github.com/aws/aws-sdk-go v1.44.328
github.com/aws/karpenter-core v0.30.1-0.20230908181031-cbc03e98ef14
github.com/aws/karpenter-core v0.30.1-0.20230908230351-681045f7c1f3
github.com/imdario/mergo v0.3.16
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/onsi/ginkgo/v2 v2.11.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHS
github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY=
github.com/aws/aws-sdk-go v1.44.328 h1:WBwlf8ym9SDQ/GTIBO9eXyvwappKJyOetWJKl4mT7ZU=
github.com/aws/aws-sdk-go v1.44.328/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/karpenter-core v0.30.1-0.20230908181031-cbc03e98ef14 h1:sBNA922mx/1UIq2Y1zI21R3/bGs1q9Mj/9xILbFI6zo=
github.com/aws/karpenter-core v0.30.1-0.20230908181031-cbc03e98ef14/go.mod h1:AQl8m8OtgO2N8IlZlzAU6MTrJTJSbe6K4GwdRUNSJVc=
github.com/aws/karpenter-core v0.30.1-0.20230908230351-681045f7c1f3 h1:p48o4NHBGkWVbBMPup+SIo3VGP9Wnc/L4pJGx4PC208=
github.com/aws/karpenter-core v0.30.1-0.20230908230351-681045f7c1f3/go.mod h1:AQl8m8OtgO2N8IlZlzAU6MTrJTJSbe6K4GwdRUNSJVc=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
Expand Down
12 changes: 6 additions & 6 deletions pkg/controllers/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"github.com/aws/karpenter/pkg/cache"
"github.com/aws/karpenter/pkg/cloudprovider"
"github.com/aws/karpenter/pkg/controllers/interruption"
machinegarbagecollection "github.com/aws/karpenter/pkg/controllers/machine/garbagecollection"
machinelink "github.com/aws/karpenter/pkg/controllers/machine/link"
"github.com/aws/karpenter/pkg/controllers/nodetemplate"
nodeclaimgarbagecollection "github.com/aws/karpenter/pkg/controllers/nodeclaim/garbagecollection"
nodeclaimlink "github.com/aws/karpenter/pkg/controllers/nodeclaim/link"
"github.com/aws/karpenter/pkg/controllers/nodeclass"
"github.com/aws/karpenter/pkg/providers/amifamily"
"github.com/aws/karpenter/pkg/providers/pricing"
"github.com/aws/karpenter/pkg/providers/securitygroup"
Expand All @@ -46,11 +46,11 @@ func NewControllers(ctx context.Context, sess *session.Session, clk clock.Clock,

logging.FromContext(ctx).With("version", project.Version).Debugf("discovered version")

linkController := machinelink.NewController(kubeClient, cloudProvider)
linkController := nodeclaimlink.NewController(kubeClient, cloudProvider)
controllers := []controller.Controller{
nodetemplate.NewNodeTemplateController(kubeClient, subnetProvider, securityGroupProvider, amiProvider),
nodeclass.NewNodeTemplateController(kubeClient, subnetProvider, securityGroupProvider, amiProvider),
linkController,
machinegarbagecollection.NewController(kubeClient, cloudProvider, linkController),
nodeclaimgarbagecollection.NewController(kubeClient, cloudProvider, linkController),
}
if settings.FromContext(ctx).InterruptionQueueName != "" {
controllers = append(controllers, interruption.NewController(kubeClient, clk, recorder, interruption.NewSQSProvider(sqs.New(sess)), unavailableOfferings))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
nodeclaimutil "github.com/aws/karpenter-core/pkg/utils/nodeclaim"
"github.com/aws/karpenter-core/pkg/utils/sets"
"github.com/aws/karpenter/pkg/cloudprovider"
"github.com/aws/karpenter/pkg/controllers/machine/link"
"github.com/aws/karpenter/pkg/controllers/nodeclaim/link"
)

type Controller struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ import (
"github.com/aws/karpenter/pkg/apis/settings"
"github.com/aws/karpenter/pkg/apis/v1alpha1"
"github.com/aws/karpenter/pkg/cloudprovider"
"github.com/aws/karpenter/pkg/controllers/machine/garbagecollection"
"github.com/aws/karpenter/pkg/controllers/machine/link"
"github.com/aws/karpenter/pkg/controllers/nodeclaim/garbagecollection"
"github.com/aws/karpenter/pkg/controllers/nodeclaim/link"
"github.com/aws/karpenter/pkg/fake"
"github.com/aws/karpenter/pkg/test"
)
Expand Down Expand Up @@ -86,7 +86,7 @@ var _ = BeforeEach(func() {
awsEnv.Reset()
})

var _ = Describe("MachineGarbageCollection", func() {
var _ = Describe("NodeClaimGarbageCollection", func() {
var instance *ec2.Instance
var providerID string

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import (
"github.com/aws/karpenter/pkg/apis/settings"
"github.com/aws/karpenter/pkg/apis/v1alpha1"
"github.com/aws/karpenter/pkg/cloudprovider"
"github.com/aws/karpenter/pkg/controllers/machine/link"
"github.com/aws/karpenter/pkg/controllers/nodeclaim/link"
"github.com/aws/karpenter/pkg/fake"
"github.com/aws/karpenter/pkg/test"
"github.com/aws/karpenter/pkg/utils"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package nodetemplate
package nodeclass

import (
"context"
Expand Down Expand Up @@ -139,6 +139,7 @@ func (c *Controller) resolveAMIs(ctx context.Context, nodeClass *v1beta1.NodeCla
return nil
}

//nolint:revive
type NodeClassController struct {
*Controller
}
Expand Down Expand Up @@ -169,7 +170,6 @@ func (c *NodeClassController) Builder(_ context.Context, m manager.Manager) core
}))
}

//nolint:revive
type NodeTemplateController struct {
*Controller
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package nodetemplate_test
package nodeclass_test

import (
"context"
Expand Down Expand Up @@ -45,7 +45,7 @@ import (
"github.com/aws/karpenter/pkg/apis"
"github.com/aws/karpenter/pkg/apis/settings"
"github.com/aws/karpenter/pkg/apis/v1alpha1"
"github.com/aws/karpenter/pkg/controllers/nodetemplate"
"github.com/aws/karpenter/pkg/controllers/nodeclass"
"github.com/aws/karpenter/pkg/test"
)

Expand All @@ -68,7 +68,7 @@ var _ = BeforeSuite(func() {
ctx = settings.ToContext(ctx, test.Settings())
awsEnv = test.NewEnvironment(ctx, env)

controller = nodetemplate.NewNodeTemplateController(env.Client, awsEnv.SubnetProvider, awsEnv.SecurityGroupProvider, awsEnv.AMIProvider)
controller = nodeclass.NewNodeTemplateController(env.Client, awsEnv.SubnetProvider, awsEnv.SecurityGroupProvider, awsEnv.AMIProvider)
})

var _ = AfterSuite(func() {
Expand Down
2 changes: 1 addition & 1 deletion test/suites/machine/garbage_collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
environmentaws "github.com/aws/karpenter/test/pkg/environment/aws"
)

var _ = Describe("MachineGarbageCollection", func() {
var _ = Describe("NodeClaimGarbageCollection", func() {
var customAMI string
var instanceInput *ec2.RunInstancesInput
var provisioner *v1alpha5.Provisioner
Expand Down

0 comments on commit 5f450f7

Please sign in to comment.