You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactoring build so that ServiceAccountName is available in ack-generate controller process as well as ack-generate release process. Also adding in a service-account.yaml.tpl to be referenced in deployment.yaml.tpl and cluster-role-binding.yaml.tpl
Copy file name to clipboardExpand all lines: cmd/ack-generate/command/release.go
+2-6Lines changed: 2 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -27,9 +27,8 @@ import (
27
27
)
28
28
29
29
var (
30
-
optReleaseOutputPathstring
31
-
optImageRepositorystring
32
-
optServiceAccountNamestring
30
+
optReleaseOutputPathstring
31
+
optImageRepositorystring
33
32
)
34
33
35
34
varreleaseCmd=&cobra.Command{
@@ -42,9 +41,6 @@ func init() {
42
41
releaseCmd.PersistentFlags().StringVar(
43
42
&optImageRepository, "image-repository", "", "the Docker image repository to use in release artifacts. Defaults to 'public.ecr.aws/aws-controllers-k8s/$service-controller'",
44
43
)
45
-
releaseCmd.PersistentFlags().StringVar(
46
-
&optServiceAccountName, "service-account-name", "default", "The name of the ServiceAccount AND ClusterRole used for ACK service controller",
47
-
)
48
44
releaseCmd.PersistentFlags().StringVarP(
49
45
&optReleaseOutputPath, "output", "o", "", "path to root directory to create generated files. Defaults to "+optServicesDir+"/$service",
Copy file name to clipboardExpand all lines: cmd/ack-generate/command/root.go
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ var (
43
43
optGeneratorConfigPathstring
44
44
optMetadataConfigPathstring
45
45
optOutputPathstring
46
+
optServiceAccountNamestring
46
47
)
47
48
48
49
varrootCmd=&cobra.Command{
@@ -121,6 +122,9 @@ func init() {
121
122
rootCmd.PersistentFlags().StringVar(
122
123
&optAWSSDKGoVersion, "aws-sdk-go-version", "", "Version of github.com/aws/aws-sdk-go used to generate apis and controllers files",
123
124
)
125
+
rootCmd.PersistentFlags().StringVar(
126
+
&optServiceAccountName, "service-account-name", optServiceAccountName, "The name of the ServiceAccount AND ClusterRole used for ACK service controller",
127
+
)
124
128
}
125
129
126
130
// Execute adds all child commands to the root command and sets flags
0 commit comments