Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Added fromHost crd sync pro check #2232

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func (c *Config) IsProFeatureEnabled() bool {
return true
}

if len(c.Sync.ToHost.CustomResources) > 0 {
if len(c.Sync.ToHost.CustomResources) > 0 || len(c.Sync.FromHost.CustomResources) > 0 {
ThomasK33 marked this conversation as resolved.
Show resolved Hide resolved
return true
}

Expand Down
15 changes: 14 additions & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ func TestConfig_IsProFeatureEnabled(t *testing.T) {
expected: true,
},
{
name: "Custom Resource Syncing is configured",
name: "Custom Resource Syncing to host is configured",
config: &Config{
Sync: Sync{
ToHost: SyncToHost{
Expand All @@ -385,6 +385,19 @@ func TestConfig_IsProFeatureEnabled(t *testing.T) {
},
expected: true,
},
{
name: "Custom Resource Syncing from host is configured",
config: &Config{
Sync: Sync{
FromHost: SyncFromHost{
CustomResources: map[string]SyncFromHostCustomResource{
"demo": {},
},
},
},
},
expected: true,
},
}

for _, tt := range tests {
Expand Down
Loading