-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Deploy controller that copies ClusterClasses to namespaces
- Loading branch information
1 parent
7d065bf
commit e6a6f3a
Showing
4 changed files
with
85 additions
and
0 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
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,26 @@ | ||
package namespacesync | ||
|
||
import ( | ||
"github.com/spf13/pflag" | ||
corev1 "k8s.io/api/core/v1" | ||
) | ||
|
||
type Options struct { | ||
Concurrency int | ||
SourceNamespace string | ||
} | ||
|
||
func (o *Options) AddFlags(flags *pflag.FlagSet) { | ||
pflag.CommandLine.IntVar( | ||
&o.Concurrency, | ||
"namespacesync-concurrency", | ||
10, | ||
"Number of target namespaces to sync concurrently.", | ||
) | ||
|
||
pflag.CommandLine.StringVar( | ||
&o.SourceNamespace, | ||
"namespacesync-source-namespace", | ||
corev1.NamespaceDefault, "Namespace from which ClusterClasses and Templates are copied.", | ||
) | ||
} |