Fix issues of using default monitorNamespace and monitorServiceAccounta when those properities are not assigned
@@ -395,16 +395,16 @@ func (c *KubeVirtDeploymentConfig) GetImagePullPolicy() k8sv1.PullPolicy {
}
func (c *KubeVirtDeploymentConfig) GetMonitorNamespace() string {
- p, ok := c.AdditionalProperties[AdditionalPropertiesMonitorNamespace]
- if !ok {
+ p := c.AdditionalProperties[AdditionalPropertiesMonitorNamespace]
+ if p == "" {
return DefaultMonitorNamespace
}
return p
}
func (c *KubeVirtDeploymentConfig) GetMonitorServiceAccount() string {
- p, ok := c.AdditionalProperties[AdditionalPropertiesMonitorServiceAccount]
- if !ok {
+ p := c.AdditionalProperties[AdditionalPropertiesMonitorServiceAccount]
+ if p == "" {
return DefaultMonitorAccount
}
return p
