Skip to content

Commit

Permalink
Fix advanced settings Camel case json. and fix proxy_server from `pro…
Browse files Browse the repository at this point in the history
…xy_version`
  • Loading branch information
tomer-shefler committed Jan 15, 2024
1 parent 2644635 commit 97f8ebe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cbcontainers/models/remote_configuration_changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ var (
)

type AdvancedSettings struct {
ProxyVersion *string `json:"proxy_version,omitempty"`
ProxyServer *string `json:"proxy_server,omitempty"`
RegistryServer *string `json:"registry_server,omitempty"`
}

type ConfigurationChange struct {
ID string `json:"id"`
Status RemoteChangeStatus `json:"status"`
AgentVersion *string `json:"agent_version"`
AdvancedSettings *AdvancedSettings `json:"advancedSettings,omitempty"`
AdvancedSettings *AdvancedSettings `json:"advanced_settings,omitempty"`
Timestamp string `json:"timestamp"`
}

Expand Down
6 changes: 3 additions & 3 deletions cbcontainers/remote_configuration/change_applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ func applyAdvancedSettings(settings *models.AdvancedSettings, cr *cbcontainersv1
if settings.RegistryServer != nil {
cr.Spec.Components.Settings.DefaultImagesRegistry = *settings.RegistryServer
}
if settings.ProxyVersion != nil {
cr.Spec.Components.Settings.Proxy.HttpsProxy = settings.ProxyVersion
cr.Spec.Components.Settings.Proxy.HttpProxy = settings.ProxyVersion
if settings.ProxyServer != nil {
cr.Spec.Components.Settings.Proxy.HttpsProxy = settings.ProxyServer
cr.Spec.Components.Settings.Proxy.HttpProxy = settings.ProxyServer
}
}

0 comments on commit 97f8ebe

Please sign in to comment.