Merge pull request #2867 from chaunceyjiang/painc

fix karmadactl interpret panic
This commit is contained in:
karmada-bot 2022-11-25 15:51:09 +08:00 committed by GitHub
commit 80f3778908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -237,7 +237,7 @@ func (h *healthInterpretationRule) Name() string {
func (h *healthInterpretationRule) GetScript(c *configv1alpha1.ResourceInterpreterCustomization) string {
if c.Spec.Customizations.HealthInterpretation != nil {
return c.Spec.Customizations.Retention.LuaScript
return c.Spec.Customizations.HealthInterpretation.LuaScript
}
return ""
}
@ -278,7 +278,7 @@ func (d *dependencyInterpretationRule) Name() string {
func (d *dependencyInterpretationRule) GetScript(c *configv1alpha1.ResourceInterpreterCustomization) string {
if c.Spec.Customizations.DependencyInterpretation != nil {
return c.Spec.Customizations.Retention.LuaScript
return c.Spec.Customizations.DependencyInterpretation.LuaScript
}
return ""
}