From 5969015a0ece245509280a5d6dfd15443b7a5af8 Mon Sep 17 00:00:00 2001 From: Elio Bischof Date: Thu, 14 Oct 2021 19:06:39 +0200 Subject: [PATCH] fix: complete defines and contains functions --- .../orbiter/kinds/clusters/kubernetes/software.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/operator/orbiter/kinds/clusters/kubernetes/software.go b/internal/operator/orbiter/kinds/clusters/kubernetes/software.go index 1e7ca29e6..d31ebfe78 100644 --- a/internal/operator/orbiter/kinds/clusters/kubernetes/software.go +++ b/internal/operator/orbiter/kinds/clusters/kubernetes/software.go @@ -226,7 +226,8 @@ func softwareContains(this common.Software, that common.Software) bool { contains(this.Nginx, that.Nginx) && contains(this.Hostname, that.Hostname) && sysctl.Contains(this.Sysctl, that.Sysctl) && - contains(this.Health, that.Health) + contains(this.Health, that.Health) && + contains(this.Kernel, that.Kernel) } func contains(this, that common.Package) bool { @@ -243,11 +244,11 @@ func softwareDefines(this common.Software, that common.Software) bool { defines(this.Nginx, that.Nginx) && defines(this.Hostname, that.Hostname) && defines(this.Sysctl, that.Sysctl) && - defines(this.Health, that.Health) + defines(this.Health, that.Health) && + defines(this.Kernel, that.Kernel) } func defines(this, that common.Package) bool { zeroPkg := common.Package{} - defines := common.PackageEquals(that, zeroPkg) || !common.PackageEquals(this, zeroPkg) - return defines + return common.PackageEquals(that, zeroPkg) || !common.PackageEquals(this, zeroPkg) }