Skip to content
Open
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
4 changes: 2 additions & 2 deletions addons/applicationautoscaling-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
name: applicationautoscaling-chart
description: A Helm chart for the ACK service controller for AWS Auto Scaling (AutoScaling)
version: 1.0.8
appVersion: 1.0.8
version: 1.3.0
appVersion: 1.3.0
home: https://github.com/aws-controllers-k8s/applicationautoscaling-controller
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
sources:
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.19.0
name: fieldexports.services.k8s.aws
spec:
group: services.k8s.aws
Expand All @@ -21,30 +20,37 @@ spec:
description: FieldExport is the schema for the FieldExport API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: FieldExportSpec defines the desired state of the FieldExport.
properties:
from:
description: ResourceFieldSelector provides the values necessary to
identify an individual field on an individual K8s resource.
description: |-
ResourceFieldSelector provides the values necessary to identify an individual
field on an individual K8s resource.
properties:
path:
type: string
resource:
description: NamespacedResource provides all the values necessary
to identify an ACK resource of a given type (within the same
namespace as the custom resource containing this type).
description: |-
NamespacedResource provides all the values necessary to identify an ACK
resource of a given type (within the same namespace as the custom resource
containing this type).
properties:
group:
type: string
Expand All @@ -62,16 +68,18 @@ spec:
- resource
type: object
to:
description: FieldExportTarget provides the values necessary to identify
the output path for a field export.
description: |-
FieldExportTarget provides the values necessary to identify the
output path for a field export.
properties:
key:
description: Key overrides the default value (`<namespace>.<FieldExport-resource-name>`)
for the FieldExport target
type: string
kind:
description: FieldExportOutputType represents all types that can
be produced by a field export operation
description: |-
FieldExportOutputType represents all types that can be produced by a field
export operation
enum:
- configmap
- secret
Expand All @@ -94,12 +102,14 @@ spec:
description: FieldExportStatus defines the observed status of the FieldExport.
properties:
conditions:
description: A collection of `ackv1alpha1.Condition` objects that
describe the various recoverable states of the field CR
description: |-
A collection of `ackv1alpha1.Condition` objects that describe the various
recoverable states of the field CR
items:
description: Condition is the common struct used by all CRDs managed
by ACK service controllers to indicate terminal states of the
CR and its backend AWS service API resource
description: |-
Condition is the common struct used by all CRDs managed by ACK service
controllers to indicate terminal states of the CR and its backend AWS
service API resource
properties:
lastTransitionTime:
description: Last time the condition transitioned from one status
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.19.0
name: iamroleselectors.services.k8s.aws
spec:
group: services.k8s.aws
names:
kind: IAMRoleSelector
listKind: IAMRoleSelectorList
plural: iamroleselectors
singular: iamroleselector
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: IAMRoleSelector is the schema for the IAMRoleSelector API.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
properties:
arn:
type: string
x-kubernetes-validations:
- message: Value is immutable once set
rule: self == oldSelf
namespaceSelector:
description: IAMRoleSelectorSpec defines the desired state of IAMRoleSelector
properties:
labelSelector:
description: LabelSelector is a label query over a set of resources.
properties:
matchLabels:
additionalProperties:
type: string
type: object
required:
- matchLabels
type: object
names:
items:
type: string
type: array
required:
- names
type: object
resourceLabelSelector:
description: LabelSelector is a label query over a set of resources.
properties:
matchLabels:
additionalProperties:
type: string
type: object
required:
- matchLabels
type: object
resourceTypeSelector:
items:
properties:
group:
type: string
kind:
type: string
version:
type: string
required:
- group
- kind
- version
type: object
type: array
required:
- arn
type: object
status:
type: object
type: object
served: true
storage: true
subresources:
status: {}
2 changes: 1 addition & 1 deletion addons/applicationautoscaling-chart/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ .Chart.Name }} has been installed.
This chart deploys "public.ecr.aws/aws-controllers-k8s/applicationautoscaling-controller:1.0.8".
This chart deploys "public.ecr.aws/aws-controllers-k8s/applicationautoscaling-controller:1.3.0".

Check its status by running:
kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}"
Expand Down
93 changes: 85 additions & 8 deletions addons/applicationautoscaling-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{/* The name of the application this chart installs */}}
{{- define "app.name" -}}
{{- define "ack-applicationautoscaling-controller.app.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

Expand All @@ -8,7 +8,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "app.fullname" -}}
{{- define "ack-applicationautoscaling-controller.app.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
Expand All @@ -22,27 +22,104 @@ If release name contains chart name it will be used as a full name.
{{- end -}}

{{/* The name and version as used by the chart label */}}
{{- define "chart.name-version" -}}
{{- define "ack-applicationautoscaling-controller.chart.name-version" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/* The name of the service account to use */}}
{{- define "service-account.name" -}}
{{- define "ack-applicationautoscaling-controller.service-account.name" -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}

{{- define "watch-namespace" -}}
{{- define "ack-applicationautoscaling-controller.watch-namespace" -}}
{{- if eq .Values.installScope "namespace" -}}
{{ .Values.watchNamespace | default .Release.Namespace }}
{{- end -}}
{{- end -}}

{{/* The mount path for the shared credentials file */}}
{{- define "aws.credentials.secret_mount_path" -}}
{{- define "ack-applicationautoscaling-controller.aws.credentials.secret_mount_path" -}}
{{- "/var/run/secrets/aws" -}}
{{- end -}}

{{/* The path the shared credentials file is mounted */}}
{{- define "aws.credentials.path" -}}
{{- printf "%s/%s" (include "aws.credentials.secret_mount_path" .) .Values.aws.credentials.secretKey -}}
{{- define "ack-applicationautoscaling-controller.aws.credentials.path" -}}
{{ $secret_mount_path := include "ack-applicationautoscaling-controller.aws.credentials.secret_mount_path" . }}
{{- printf "%s/%s" $secret_mount_path .Values.aws.credentials.secretKey -}}
{{- end -}}

{{/* The rules a of ClusterRole or Role */}}
{{- define "ack-applicationautoscaling-controller.rbac-rules" -}}
rules:
- apiGroups:
- ""
resources:
- configmaps
- secrets
verbs:
- get
- list
- patch
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- applicationautoscaling.services.k8s.aws
resources:
- scalabletargets
- scalingpolicies
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- applicationautoscaling.services.k8s.aws
resources:
- scalabletargets/status
- scalingpolicies/status
verbs:
- get
- patch
- update
- apiGroups:
- services.k8s.aws
resources:
- fieldexports
- iamroleselectors
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- services.k8s.aws
resources:
- fieldexports/status
- iamroleselectors/status
verbs:
- get
- patch
- update
{{- end }}

{{/* Convert k/v map to string like: "key1=value1,key2=value2,..." */}}
{{- define "ack-applicationautoscaling-controller.feature-gates" -}}
{{- $list := list -}}
{{- range $k, $v := .Values.featureGates -}}
{{- $list = append $list (printf "%s=%s" $k ( $v | toString)) -}}
{{- end -}}
{{ join "," $list }}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "ack-applicationautoscaling-controller.app.fullname" . }}-namespaces-cache
labels:
app.kubernetes.io/name: {{ include "ack-applicationautoscaling-controller.app.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
k8s-app: {{ include "ack-applicationautoscaling-controller.app.name" . }}
helm.sh/chart: {{ include "ack-applicationautoscaling-controller.chart.name-version" . }}
roleRef:
kind: ClusterRole
apiGroup: rbac.authorization.k8s.io
name: {{ include "ack-applicationautoscaling-controller.app.fullname" . }}-namespaces-cache
subjects:
- kind: ServiceAccount
name: {{ include "ack-applicationautoscaling-controller.service-account.name" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "ack-applicationautoscaling-controller.app.fullname" . }}-configmaps-cache
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ include "ack-applicationautoscaling-controller.app.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
k8s-app: {{ include "ack-applicationautoscaling-controller.app.name" . }}
helm.sh/chart: {{ include "ack-applicationautoscaling-controller.chart.name-version" . }}
roleRef:
kind: Role
apiGroup: rbac.authorization.k8s.io
name: {{ include "ack-applicationautoscaling-controller.app.fullname" . }}-configmaps-cache
subjects:
- kind: ServiceAccount
name: {{ include "ack-applicationautoscaling-controller.service-account.name" . }}
namespace: {{ .Release.Namespace }}
Loading