fix karmadactl interpret panic

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
chaunceyjiang 2022-11-24 22:06:00 +08:00
parent 63a67d7cbd
commit 2deab7877f
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 ""
}