Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ack_generate_info:
build_date: "2021-09-01T17:57:49Z"
build_hash: 6f22b7b568e25b4ee007bb1ab5f9338c16daf172
go_version: go1.14.14 darwin/amd64
version: v0.13.0
api_directory_checksum: 8697d12182de3cc93f7263c2a5d45e480b77bf05
api_version: v1alpha1
aws_sdk_go_version: v1.37.10
generator_config_info:
file_checksum: ceb5dc31d23cbb01d1f68fb9b2b99bc597d6e732
original_file_name: generator.yaml
last_modification:
reason: API generation
timestamp: 2021-09-01 17:57:58.713578 +0000 UTC
36 changes: 36 additions & 0 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
operations:
PutScalingPolicy:
operation_type: Create
resource_name: ScalingPolicy
RegisterScalableTarget:
operation_type: Create
resource_name: ScalableTarget
DeregisterScalableTarget:
operation_type: Delete
resource_name: ScalableTarget
DescribeScalableTargets:
primary_identifier_field_name: ResourceId
DescribeScalingPolicies:
primary_identifier_field_name: ResourceId
resources:
ScalableTarget:
is_adoptable: false
hooks:
sdk_read_many_post_build_request:
code: rm.customDescribeScalableTarget(ctx, r, input)
delta_pre_compare:
code: customSetDefaults(a, b)
fields:
ResourceID:
is_name: true
ScalingPolicy:
is_adoptable: false
fields:
ResourceID:
is_name: true
PolicyARN:
is_arn: true
ignore:
resource_names:
- ScheduledAction

6 changes: 5 additions & 1 deletion apis/v1alpha1/scalable_target.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion apis/v1alpha1/scaling_policy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 35 additions & 6 deletions cmd/controller/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
controller-gen.kubebuilder.io/version: v0.6.1
creationTimestamp: null
name: scalabletargets.applicationautoscaling.services.k8s.aws
spec:
Expand Down Expand Up @@ -34,7 +34,8 @@ spec:
metadata:
type: object
spec:
description: ScalableTargetSpec defines the desired state of ScalableTarget
description: "ScalableTargetSpec defines the desired state of ScalableTarget.
\n Represents a scalable target."
properties:
maxCapacity:
description: "The maximum value that you plan to scale out to. When
Expand Down Expand Up @@ -237,9 +238,6 @@ spec:
- type
type: object
type: array
required:
- ackResourceMetadata
- conditions
type: object
type: object
served: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
controller-gen.kubebuilder.io/version: v0.6.1
creationTimestamp: null
name: scalingpolicies.applicationautoscaling.services.k8s.aws
spec:
Expand Down Expand Up @@ -34,7 +34,11 @@ spec:
metadata:
type: object
spec:
description: ScalingPolicySpec defines the desired state of ScalingPolicy
description: "ScalingPolicySpec defines the desired state of ScalingPolicy.
\n Represents a scaling policy to use with Application Auto Scaling.
\n For more information about configuring scaling policies for a specific
service, see Getting started with Application Auto Scaling (https://docs.aws.amazon.com/autoscaling/application/userguide/getting-started.html)
in the Application Auto Scaling User Guide."
properties:
policyName:
description: The name of the scaling policy.
Expand Down Expand Up @@ -325,9 +329,6 @@ spec:
- type
type: object
type: array
required:
- ackResourceMetadata
- conditions
type: object
type: object
served: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ spec:
description: AWSIdentifiers provide all unique ways to reference an
AWS resource.
properties:
additionalKeys:
additionalProperties:
type: string
description: AdditionalKeys represents any additional arbitrary
identifiers used when describing the target resource.
type: object
arn:
description: ARN is the AWS Resource Name for the resource. It
is a globally unique identifier.
Expand Down
15 changes: 15 additions & 0 deletions config/overlays/namespaced/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resources:
- ../../default
patches:
- path: role.json
target:
group: rbac.authorization.k8s.io
version: v1
kind: ClusterRole
name: ack-applicationautoscaling-controller
- path: role-binding.json
target:
group: rbac.authorization.k8s.io
version: v1
kind: ClusterRoleBinding
name: ack-applicationautoscaling-controller-rolebinding
3 changes: 3 additions & 0 deletions config/overlays/namespaced/role-binding.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[{"op": "replace", "path": "/kind", "value": "RoleBinding"},
{"op": "add", "path": "/metadata/namespace", "value": "ack-system"},
{"op": "replace", "path": "/roleRef/kind", "value": "Role"}]
2 changes: 2 additions & 0 deletions config/overlays/namespaced/role.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[{"op": "replace", "path": "/kind", "value": "Role"},
{"op": "add", "path": "/metadata/namespace", "value": "ack-system"}]
4 changes: 4 additions & 0 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ operations:
DeregisterScalableTarget:
operation_type: Delete
resource_name: ScalableTarget
DescribeScalableTargets:
primary_identifier_field_name: ResourceId
DescribeScalingPolicies:
primary_identifier_field_name: ResourceId
resources:
ScalableTarget:
is_adoptable: false
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/aws-controllers-k8s/applicationautoscaling-controller
go 1.14

require (
github.com/aws-controllers-k8s/runtime v0.2.1
github.com/aws/aws-sdk-go v1.37.4
github.com/aws-controllers-k8s/runtime v0.13.0
github.com/aws/aws-sdk-go v1.37.10
github.com/ghodss/yaml v1.0.0
github.com/go-logr/logr v0.1.0
github.com/google/go-cmp v0.3.1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/aws-controllers-k8s/runtime v0.2.1 h1:vItjQ5/pZjr8Z7cR35sQKcSjQy19mF3qOfbUitWMt1A=
github.com/aws-controllers-k8s/runtime v0.2.1/go.mod h1:xA2F18PJerBHaqrS4de1lpP7skeSMeStkmh+3x5sWvw=
github.com/aws/aws-sdk-go v1.37.4 h1:tWxrpMK/oRSXVnjUzhGeCWLR00fW0WF4V4sycYPPrJ8=
github.com/aws/aws-sdk-go v1.37.4/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws-controllers-k8s/runtime v0.13.0 h1:PYiNnQejjS/1H93bolFXGIzgQZSn/gRoPSAEU6UG0ec=
github.com/aws-controllers-k8s/runtime v0.13.0/go.mod h1:kG2WM4JAmLgf67cgZV9IZUkY2DsrUzsaNbmhFMfb05c=
github.com/aws/aws-sdk-go v1.37.10 h1:LRwl+97B4D69Z7tz+eRUxJ1C7baBaIYhgrn5eLtua+Q=
github.com/aws/aws-sdk-go v1.37.10/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down
6 changes: 3 additions & 3 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: ack-applicationautoscaling-controller
description: A Helm chart for the ACK service controller for applicationautoscaling
name: applicationautoscaling-chart
description: A Helm chart for the ACK service controller for AWS Auto Scaling (AutoScaling)
version: v0.0.1
appVersion: v0.0.1
home: https://github.com/aws-controllers-k8s/applicationautoscaling-controller
Expand All @@ -10,7 +10,7 @@ sources:
maintainers:
- name: ACK Admins
url: https://github.com/orgs/aws-controllers-k8s/teams/ack-admin
- name: applicationautoscaling Admins
- name: AutoScaling Admins
url: https://github.com/orgs/aws-controllers-k8s/teams/applicationautoscaling-maintainer
keywords:
- aws
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
controller-gen.kubebuilder.io/version: v0.6.1
creationTimestamp: null
name: scalabletargets.applicationautoscaling.services.k8s.aws
spec:
Expand Down Expand Up @@ -34,7 +34,8 @@ spec:
metadata:
type: object
spec:
description: ScalableTargetSpec defines the desired state of ScalableTarget
description: "ScalableTargetSpec defines the desired state of ScalableTarget.
\n Represents a scalable target."
properties:
maxCapacity:
description: "The maximum value that you plan to scale out to. When
Expand Down Expand Up @@ -237,9 +238,6 @@ spec:
- type
type: object
type: array
required:
- ackResourceMetadata
- conditions
type: object
type: object
served: true
Expand Down
Loading