@@ -33,6 +33,10 @@ const (
3333 Singletenancy = "singletenancy"
3434 Multitenancy = "multitenancy"
3535
36+ // Multitenant Config flags
37+ FlagCNSUrl = "cnsurl"
38+ FlagEnableExactMatchForPodName = "enableexactmatchforpodname"
39+
3640 // os flags
3741 Linux = "linux"
3842 Windows = "windows"
@@ -66,35 +70,43 @@ const (
6670 Transparent = "transparent"
6771 Bridge = "bridge"
6872 Azure0 = "azure0"
73+
74+ // Multitenancy defaults
75+ DefaultCNSUrl = "http://localhost:10090"
76+ DefaultEnableExactMatchForPodName = "false"
6977)
7078
7179var (
7280 // Concatenating flags to the env ensures consistency between flags and env's for viper and cobra
73- EnvCNIOS = EnvPrefix + "_" + strings .ToUpper (FlagOS )
74- EnvCNIType = EnvPrefix + "_" + strings .ToUpper (FlagTenancy )
75- EnvCNISourceDir = EnvPrefix + "_" + "SRC_DIR"
76- EnvCNIDestinationBinDir = EnvPrefix + "_" + "BIN_DIR"
77- EnvCNIDestinationConflistDir = EnvPrefix + "_" + "CONFLIST_DIR"
78- EnvCNIIPAMType = EnvPrefix + "_" + strings .ToUpper (FlagIPAM )
79- EnvCNIMode = EnvPrefix + "_" + strings .ToUpper (FlagMode )
80- EnvCNIExemptBins = EnvPrefix + "_" + strings .ToUpper (FlagExempt )
81- EnvCNILogFile = EnvPrefix + "_" + "LOG_FILE"
81+ EnvCNIOS = EnvPrefix + "_" + strings .ToUpper (FlagOS )
82+ EnvCNIType = EnvPrefix + "_" + strings .ToUpper (FlagTenancy )
83+ EnvCNISourceDir = EnvPrefix + "_" + "SRC_DIR"
84+ EnvCNIDestinationBinDir = EnvPrefix + "_" + "BIN_DIR"
85+ EnvCNIDestinationConflistDir = EnvPrefix + "_" + "CONFLIST_DIR"
86+ EnvCNIIPAMType = EnvPrefix + "_" + strings .ToUpper (FlagIPAM )
87+ EnvCNIMode = EnvPrefix + "_" + strings .ToUpper (FlagMode )
88+ EnvCNIExemptBins = EnvPrefix + "_" + strings .ToUpper (FlagExempt )
89+ EnvCNILogFile = EnvPrefix + "_" + "LOG_FILE"
90+ EnvCNICNSUrl = EnvPrefix + "_" + strings .ToUpper (FlagCNSUrl )
91+ EnvCNIEnableExactMatchForPodName = EnvPrefix + "_" + strings .ToUpper (FlagEnableExactMatchForPodName )
8292
8393 Defaults = map [string ]string {
84- FlagOS : Linux ,
85- FlagTenancy : Singletenancy ,
86- FlagIPAM : AzureVNETIPAM ,
87- FlagExempt : AzureTelemetryBin + "," + AzureTelemetryConfig ,
88- FlagMode : Transparent ,
89- FlagTarget : Local ,
90- FlagBinDirectory : DefaultBinDirLinux ,
91- FlagConflistDirectory : DefaultConflistDirLinux ,
92- FlagVersion : Packaged ,
93- FlagLogFilePath : DefaultLogFile ,
94- EnvCNILogFile : EnvCNILogFile ,
95- EnvCNISourceDir : DefaultSrcDirLinux ,
96- EnvCNIDestinationBinDir : DefaultBinDirLinux ,
97- EnvCNIDestinationConflistDir : DefaultConflistDirLinux ,
94+ FlagOS : Linux ,
95+ FlagTenancy : Singletenancy ,
96+ FlagIPAM : AzureVNETIPAM ,
97+ FlagExempt : AzureTelemetryBin + "," + AzureTelemetryConfig ,
98+ FlagMode : Transparent ,
99+ FlagTarget : Local ,
100+ FlagBinDirectory : DefaultBinDirLinux ,
101+ FlagConflistDirectory : DefaultConflistDirLinux ,
102+ FlagVersion : Packaged ,
103+ FlagLogFilePath : DefaultLogFile ,
104+ FlagCNSUrl : DefaultCNSUrl ,
105+ FlagEnableExactMatchForPodName : DefaultEnableExactMatchForPodName ,
106+ EnvCNILogFile : EnvCNILogFile ,
107+ EnvCNISourceDir : DefaultSrcDirLinux ,
108+ EnvCNIDestinationBinDir : DefaultBinDirLinux ,
109+ EnvCNIDestinationConflistDir : DefaultConflistDirLinux ,
98110 }
99111
100112 DefaultToggles = map [string ]bool {
0 commit comments