wip: Add support for secrets
This commit is contained in:
@ -20,6 +20,8 @@ func init() {
|
||||
sync.Flags().String("workdir", "", "A path to the workdir. On the moment of running, it should be an empty dir")
|
||||
sync.Flags().String("ssh-key", "", "A path to the pricate ssh key")
|
||||
sync.Flags().Bool("dry-run", false, "If set to false, will no push changes to git")
|
||||
sync.Flags().String("sops-bin", "/usr/bin/sops", "A path to the sops binary in your system")
|
||||
|
||||
rootCmd.AddCommand(sync)
|
||||
}
|
||||
|
||||
@ -27,6 +29,7 @@ func syncCmd(cmd *cobra.Command, args []string) {
|
||||
config := cmd.Flag("config").Value.String()
|
||||
workdir := cmd.Flag("workdir").Value.String()
|
||||
sshKey := cmd.Flag("ssh-key").Value.String()
|
||||
sopsBin := cmd.Flag("sops-bin").Value.String()
|
||||
dryRun, err := cmd.Flags().GetBool("dry-run")
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
@ -36,6 +39,7 @@ func syncCmd(cmd *cobra.Command, args []string) {
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
configObj.SopsBin = sopsBin
|
||||
|
||||
err = controller.Reconcile(workdir, sshKey, configObj, dryRun)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user