Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/cmd/controller/main.go b/cmd/controller/main.go
- index 537513c..347dfe2 100644
- --- a/cmd/controller/main.go
- +++ b/cmd/controller/main.go
- @@ -29,10 +29,11 @@ import (
- )
- var (
- - keyName = flag.String("key-name", "sealed-secrets-key", "Name of Secret containing public/private key.")
- - keySize = flag.Int("key-size", 4096, "Size of encryption key.")
- - validFor = flag.Duration("key-ttl", 10*365*24*time.Hour, "Duration that certificate is valid for.")
- - myCN = flag.String("my-cn", "", "CN to use in generated certificate.")
- + keyName = flag.String("key-name", "sealed-secrets-key", "Name of Secret containing public/private key.")
- + keySize = flag.Int("key-size", 4096, "Size of encryption key.")
- + namespace = flag.String("namespace", "kube-system", "Namespace")
- + validFor = flag.Duration("key-ttl", 10*365*24*time.Hour, "Duration that certificate is valid for.")
- + myCN = flag.String("my-cn", "", "CN to use in generated certificate.")
- )
- func init() {
- @@ -190,7 +191,11 @@ func main2() error {
- return err
- }
- - ssinformer := ssinformers.NewSharedInformerFactory(ssclient, 0)
- + if ns := os.Getenv("POD_NAMESPACE"); ns != "" && *namespace == "" {
- + namespace = &ns
- + }
- +
- + ssinformer := ssinformers.NewFilteredSharedInformerFactory(ssclient, 0, *namespace, nil)
- controller := NewController(clientset, ssinformer, privKey)
- stop := make(chan struct{})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement