Merge pull request #2867 from chaunceyjiang/painc
fix karmadactl interpret panic
This commit is contained in:
commit
80f3778908
|
@ -237,7 +237,7 @@ func (h *healthInterpretationRule) Name() string {
|
||||||
|
|
||||||
func (h *healthInterpretationRule) GetScript(c *configv1alpha1.ResourceInterpreterCustomization) string {
|
func (h *healthInterpretationRule) GetScript(c *configv1alpha1.ResourceInterpreterCustomization) string {
|
||||||
if c.Spec.Customizations.HealthInterpretation != nil {
|
if c.Spec.Customizations.HealthInterpretation != nil {
|
||||||
return c.Spec.Customizations.Retention.LuaScript
|
return c.Spec.Customizations.HealthInterpretation.LuaScript
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
@ -278,7 +278,7 @@ func (d *dependencyInterpretationRule) Name() string {
|
||||||
|
|
||||||
func (d *dependencyInterpretationRule) GetScript(c *configv1alpha1.ResourceInterpreterCustomization) string {
|
func (d *dependencyInterpretationRule) GetScript(c *configv1alpha1.ResourceInterpreterCustomization) string {
|
||||||
if c.Spec.Customizations.DependencyInterpretation != nil {
|
if c.Spec.Customizations.DependencyInterpretation != nil {
|
||||||
return c.Spec.Customizations.Retention.LuaScript
|
return c.Spec.Customizations.DependencyInterpretation.LuaScript
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue