Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to ACK runtime v0.19.1, code-generator v0.19.1 #82

Merged
merged 1 commit into from
Jun 17, 2022
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
6 changes: 3 additions & 3 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ack_generate_info:
build_date: "2022-06-14T04:07:34Z"
build_hash: a133935a9a93591a9e1ba9d5ca940cb83a1353b4
build_date: "2022-06-17T18:07:35Z"
build_hash: a45f3b900849ec03c5e16ed2778c0b8e2923ffee
go_version: go1.17.5
version: v0.19.0
version: v0.19.1
api_directory_checksum: 129f62379684f764be26baaa8e217e0c431281e5
api_version: v1alpha1
aws_sdk_go_version: v1.42.0
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/s3-controller
newTag: v0.1.1
newTag: v0.1.2
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/s3-controller
go 1.17

require (
github.com/aws-controllers-k8s/runtime v0.19.0
github.com/aws-controllers-k8s/runtime v0.19.1
github.com/aws/aws-sdk-go v1.42.0
github.com/go-logr/logr v1.2.0
github.com/pkg/errors v0.9.1
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.19.0 h1:+O5a6jBSBAd8XTNMrVCIYu4G+ZUPZe/G5eopVFO18Dc=
github.com/aws-controllers-k8s/runtime v0.19.0/go.mod h1:oA8ML1/LL3chPn26P6SzBNu1CUI2nekB+PTqykNs0qU=
github.com/aws-controllers-k8s/runtime v0.19.1 h1:OBV7vbIbLFRpXdAwJfoPGphhjTa7xSc3pS/kuYlKzRU=
github.com/aws-controllers-k8s/runtime v0.19.1/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: s3-chart
description: A Helm chart for the ACK service controller for Amazon Simple Storage Service (S3)
version: v0.1.1
appVersion: v0.1.1
version: v0.1.2
appVersion: v0.1.2
home: https://github.com/aws-controllers-k8s/s3-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/s3-controller:v0.1.1".
This chart deploys "public.ecr.aws/aws-controllers-k8s/s3-controller:v0.1.2".

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
9 changes: 8 additions & 1 deletion 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/s3-controller
tag: v0.1.1
tag: v0.1.2
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 Down
6 changes: 6 additions & 0 deletions pkg/resource/bucket/manager.go

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

12 changes: 9 additions & 3 deletions pkg/resource/bucket/sdk.go

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