-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0757dd2
commit 74fc767
Showing
3 changed files
with
72 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package ascp | ||
|
||
import ( | ||
"github.com/awslabs/eksdemo/pkg/application" | ||
"github.com/awslabs/eksdemo/pkg/cmd" | ||
) | ||
|
||
type Options struct { | ||
application.ApplicationOptions | ||
JSONFormat bool | ||
K8sSecret bool | ||
} | ||
|
||
func newOptions() (options *Options, flags cmd.Flags) { | ||
options = &Options{ | ||
ApplicationOptions: application.ApplicationOptions{ | ||
DisableServiceAccountFlag: true, | ||
DisableVersionFlag: true, | ||
Namespace: "ascp", | ||
ServiceAccount: "nginx-deployment-sa", | ||
}, | ||
} | ||
|
||
flags = cmd.Flags{ | ||
&cmd.BoolFlag{ | ||
CommandFlag: cmd.CommandFlag{ | ||
Name: "json-format", | ||
Description: "mount key/value pairs from a secret in json format", | ||
}, | ||
Option: &options.JSONFormat, | ||
}, | ||
&cmd.BoolFlag{ | ||
CommandFlag: cmd.CommandFlag{ | ||
Name: "k8s-secret", | ||
Description: "create a Kubernetes Secret to mirror the mounted secret", | ||
}, | ||
Option: &options.K8sSecret, | ||
}, | ||
} | ||
|
||
return | ||
} |