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
8 changes: 4 additions & 4 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2022-04-15T20:27:58Z"
build_hash: 50c64871bcaf88b9ee200eb8d6b8245fa8f675eb
build_date: "2022-06-15T16:33:46Z"
build_hash: 53ebfaca89abd8cedbeb8e48ac76954a8e1841dd
go_version: go1.17.5
version: v0.18.4
version: v0.19.0-2-g53ebfac
api_directory_checksum: c69d75f37400a8d4d6eb4362eb743005531a7b2c
api_version: v1alpha1
aws_sdk_go_version: v1.42.0
generator_config_info:
file_checksum: 6ea111ed6683ab7ee07ffd165ae76454bd0fddab
file_checksum: 52b0fd0e1882461d1c0694dd583d1ef7e655c5c1
original_file_name: generator.yaml
last_modification:
reason: API generation
8 changes: 8 additions & 0 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,16 @@ resources:
references:
resource: API
path: Status.APIID
tags:
ignore: true
Deployment:
fields:
ApiId:
references:
resource: API
path: Status.APIID
tags:
ignore: true
Integration:
fields:
ApiId:
Expand All @@ -66,6 +70,8 @@ resources:
references:
resource: VPCLink
path: Status.VPCLinkID
tags:
ignore: true
Route:
fields:
ApiId:
Expand All @@ -83,6 +89,8 @@ resources:
hooks:
references_post_resolve:
template_path: hooks/route/references_post_resolve.go.tpl
tags:
ignore: true
VpcLink:
hooks:
sdk_update_pre_build_request:
Expand Down
3 changes: 2 additions & 1 deletion cmd/controller/main.go

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

2 changes: 1 addition & 1 deletion config/controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
- name: ACK_LOG_LEVEL
value: "info"
- name: ACK_RESOURCE_TAGS
value: "services.k8s.aws/managed=true,services.k8s.aws/created=%UTCNOW%,services.k8s.aws/namespace=%KUBERNETES_NAMESPACE%"
value: "services.k8s.aws/controller-version=%CONTROLLER_SERVICE%-%CONTROLLER_VERSION%,services.k8s.aws/namespace=%K8S_NAMESPACE%"
securityContext:
allowPrivilegeEscalation: false
privileged: false
Expand Down
2 changes: 1 addition & 1 deletion config/controller/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ kind: Kustomization
images:
- name: controller
newName: public.ecr.aws/aws-controllers-k8s/apigatewayv2-controller
newTag: v0.1.0
newTag: v0.1.1
8 changes: 8 additions & 0 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,16 @@ resources:
references:
resource: API
path: Status.APIID
tags:
ignore: true
Deployment:
fields:
ApiId:
references:
resource: API
path: Status.APIID
tags:
ignore: true
Integration:
fields:
ApiId:
Expand All @@ -66,6 +70,8 @@ resources:
references:
resource: VPCLink
path: Status.VPCLinkID
tags:
ignore: true
Route:
fields:
ApiId:
Expand All @@ -83,6 +89,8 @@ resources:
hooks:
references_post_resolve:
template_path: hooks/route/references_post_resolve.go.tpl
tags:
ignore: true
VpcLink:
hooks:
sdk_update_pre_build_request:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/aws-controllers-k8s/apigatewayv2-controller
go 1.17

require (
github.com/aws-controllers-k8s/runtime v0.18.4
github.com/aws-controllers-k8s/runtime v0.19.0
github.com/aws/aws-sdk-go v1.42.0
github.com/go-logr/logr v1.2.0
github.com/google/go-cmp v0.5.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/aws-controllers-k8s/runtime v0.18.4 h1:iwLYNwhbuiWZrHPoulGj75oT+alE91wCNkF1FUELiAw=
github.com/aws-controllers-k8s/runtime v0.18.4/go.mod h1:oA8ML1/LL3chPn26P6SzBNu1CUI2nekB+PTqykNs0qU=
github.com/aws-controllers-k8s/runtime v0.19.0 h1:+O5a6jBSBAd8XTNMrVCIYu4G+ZUPZe/G5eopVFO18Dc=
github.com/aws-controllers-k8s/runtime v0.19.0/go.mod h1:oA8ML1/LL3chPn26P6SzBNu1CUI2nekB+PTqykNs0qU=
github.com/aws/aws-sdk-go v1.42.0 h1:BMZws0t8NAhHFsfnT3B40IwD13jVDG5KerlRksctVIw=
github.com/aws/aws-sdk-go v1.42.0/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
Expand Down
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
name: apigatewayv2-chart
description: A Helm chart for the ACK service controller for Amazon API Gateway (APIGWv2)
version: v0.1.0
appVersion: v0.1.0
version: v0.1.1
appVersion: v0.1.1
home: https://github.com/aws-controllers-k8s/apigatewayv2-controller
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
sources:
Expand Down
2 changes: 1 addition & 1 deletion helm/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/apigatewayv2-controller:v0.1.0".
This chart deploys "public.ecr.aws/aws-controllers-k8s/apigatewayv2-controller:v0.1.1".

Check its status by running:
kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}"
Expand Down
10 changes: 10 additions & 0 deletions helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,13 @@ If release name contains chart name it will be used as a full name.
{{- .Release.Namespace -}}
{{- end -}}
{{- end -}}

{{/* The mount path for the shared credentials file */}}
{{- define "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 -}}
{{- end -}}
16 changes: 16 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ spec:
value: {{ .Values.log.level | quote }}
- name: ACK_RESOURCE_TAGS
value: {{ join "," .Values.resourceTags | quote }}
{{- if .Values.aws.credentials.secretName }}
- name: AWS_SHARED_CREDENTIALS_FILE
value: {{ include "aws.credentials.path" . }}
- name: AWS_PROFILE
value: {{ .Values.aws.credentials.profile }}
volumeMounts:
- name: {{ .Values.aws.credentials.secretName }}
mountPath: {{ include "aws.credentials.secret_mount_path" . }}
readOnly: true
{{- end }}
securityContext:
allowPrivilegeEscalation: false
privileged: false
Expand All @@ -101,3 +111,9 @@ spec:
hostIPC: false
hostNetwork: false
hostPID: false
{{ if .Values.aws.credentials.secretName -}}
volumes:
- name: {{ .Values.aws.credentials.secretName }}
secret:
secretName: {{ .Values.aws.credentials.secretName }}
{{ end -}}
15 changes: 15 additions & 0 deletions helm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,21 @@
},
"endpoint": {
"type": "string"
},
"credentials": {
"description": "AWS credentials information",
"properties": {
"secretName": {
"type": "string"
},
"secretKey": {
"type": "string"
},
"profile": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
Expand Down
14 changes: 10 additions & 4 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

image:
repository: public.ecr.aws/aws-controllers-k8s/apigatewayv2-controller
tag: v0.1.0
tag: v0.1.1
pullPolicy: IfNotPresent
pullSecrets: []

Expand Down Expand Up @@ -50,6 +50,13 @@ aws:
# If specified, use the AWS region for AWS API calls
region: ""
endpoint_url: ""
credentials:
# If specified, Secret with shared credentials file to use.
secretName: ""
# Secret stringData key that contains the credentials
secretKey: "credentials"
# Profile used for AWS credentials
profile: "default"

# log level for the controller
log:
Expand All @@ -64,9 +71,8 @@ installScope: cluster
resourceTags:
# Configures the ACK service controller to always set key/value pairs tags on
# resources that it manages.
- services.k8s.aws/managed=true
- services.k8s.aws/created=%UTCNOW%
- services.k8s.aws/namespace=%KUBERNETES_NAMESPACE%
- services.k8s.aws/controller-version=%CONTROLLER_SERVICE%-%CONTROLLER_VERSION%
- services.k8s.aws/namespace=%K8S_NAMESPACE%

serviceAccount:
# Specifies whether a service account should be created
Expand Down
3 changes: 3 additions & 0 deletions pkg/resource/api/custom_http_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ func (rm *resourceManager) validateImportApiInputFields(api *v1alpha1.API) error
specCopy.Body = nil
specCopy.FailOnWarnings = nil
specCopy.Basepath = nil
// Tags field is added with ACK default tags by ACK reconciler.
//Allow tag field to be present with other ImportApi fields.
specCopy.Tags = nil
opts := []cmp.Option{cmpopts.EquateEmpty()}
if cmp.Equal(*specCopy, v1alpha1.APISpec{}, opts...) {
return nil
Expand Down
36 changes: 34 additions & 2 deletions pkg/resource/api/manager.go

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

59 changes: 59 additions & 0 deletions pkg/resource/api/tags.go

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

Loading