-
Notifications
You must be signed in to change notification settings - Fork 3
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
Refresh enhancement #85
base: main
Are you sure you want to change the base?
Conversation
@@ -148,126 +160,6 @@ var _ = Describe("AppConfiguationProvider processor", func() { | |||
}]).Should(Equal(&newFakeEtag2)) | |||
Expect(processor.ReconciliationState.NextKeyValueRefreshReconcileTime).Should(Equal(expectedNextKeyValueRefreshReconcileTime)) | |||
}) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we remove this test?
_ = json.Unmarshal([]byte(existingConfigMap.Data[dataOptions.Key]), &existingSettings) | ||
_ = json.Unmarshal([]byte(latestConfigMapSettings[dataOptions.Key]), &latestSettings) | ||
|
||
return !reflect.DeepEqual(existingSettings, latestSettings) | ||
} | ||
|
||
return false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about return true by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any scenario that will use the default value? The check of configmap data will be returned before line354.
3f451eb
to
d4931fd
Compare
internal/controller/utils.go
Outdated
return !reflect.DeepEqual(processor.Settings.SecretSettings[secretName].Data, existingK8sSecrets[secretName].Data) | ||
} | ||
|
||
func shouldCreateOrUpdateConfigMap(existingConfigMap *corev1.ConfigMap, dataOptions *acpv1.ConfigMapDataOptions, latestConfigMapSettings map[string]string) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you change the argument order to (existingConfigMap, latestConfigMapSettings, dataOptions ) for more readable.
No description provided.