Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
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/code-generator
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/dlclark/regexp2 v1.4.0
// pin to v0.1.1 due to release problem with v0.1.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
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.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: 4 additions & 0 deletions pkg/generate/ack/runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ func (frm *fakeRM) IsSynced(context.Context, acktypes.AWSResource) (bool, error)
return true, nil
}

func (frm *fakeRM) EnsureTags(context.Context, acktypes.AWSResource, acktypes.ServiceControllerMetadata) error {
return nil
}

// This test is mostly just a hack to introduce a Go module dependency between
// the ACK runtime library and the code generator. The code generator doesn't
// actually depend on Go code in the ACK runtime, but it *produces* templated
Expand Down
3 changes: 2 additions & 1 deletion templates/cmd/controller/main.go.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1"
ackcfg "github.com/aws-controllers-k8s/runtime/pkg/config"
ackrt "github.com/aws-controllers-k8s/runtime/pkg/runtime"
acktypes "github.com/aws-controllers-k8s/runtime/pkg/types"
ackrtutil "github.com/aws-controllers-k8s/runtime/pkg/util"
ackrtwebhook "github.com/aws-controllers-k8s/runtime/pkg/webhook"
flag "github.com/spf13/pflag"
Expand Down Expand Up @@ -103,7 +104,7 @@ func main() {
)
sc := ackrt.NewServiceController(
awsServiceAlias, awsServiceAPIGroup, awsServiceEndpointsID,
ackrt.VersionInfo{
acktypes.VersionInfo{
version.GitCommit,
version.GitVersion,
version.BuildDate,
Expand Down
2 changes: 1 addition & 1 deletion templates/config/controller/deployment.yaml.tpl
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_VERSION%,services.k8s.aws/namespace=%K8S_NAMESPACE%"
securityContext:
allowPrivilegeEscalation: false
privileged: false
Expand Down
5 changes: 2 additions & 3 deletions templates/helm/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,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_VERSION%
- services.k8s.aws/namespace=%K8S_NAMESPACE%

serviceAccount:
# Specifies whether a service account should be created
Expand Down