forked from bitnami-labs/sealed-secrets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved trigger and blacklister to ssadmin
This commit moves the in-container admin functions to a new admin executable. In particular, trigger and blacklisting functionality has been moved into a single ssadmin command in the controller image. All necessary changes to dockerfile, Makefile and gitignore are included.
- Loading branch information
Showing
11 changed files
with
56 additions
and
67 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 was deleted.
Oops, something went wrong.
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
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,35 @@ | ||
package main | ||
|
||
import ( | ||
"flag" | ||
"net" | ||
"net/rpc" | ||
) | ||
|
||
var t = false | ||
|
||
var ( | ||
generateKey = flag.Bool("key-gen", false, "Force controller to generate a new key immediately") | ||
blacklistKeyname = flag.String("blacklist", "", "Give a keyname to blacklist") | ||
|
||
generated = &t | ||
) | ||
|
||
func main() { | ||
flag.Parse() | ||
conn, err := net.Dial("tcp", ":8081") | ||
if err != nil { | ||
panic(err) | ||
} | ||
client := rpc.NewClient(conn) | ||
if *blacklistKeyname != "" { | ||
if err = client.Call("blacklister.Blacklist", *blacklistKeyname, generated); err != nil { | ||
panic(err) | ||
} | ||
} | ||
if *generateKey && !*generated { | ||
if err = client.Call("trigger.Trigger", struct{}{}, &struct{}{}); err != nil { | ||
panic(err) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Binary file not shown.
Binary file not shown.