Skip to content

Commit

Permalink
remove apiversion
Browse files Browse the repository at this point in the history
  • Loading branch information
dwertent committed Jan 6, 2022
1 parent 6af31cc commit 42ea42a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions objectsenvelopes/regoresponsevectorobject.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
// relatedObjects []IMetadata - includes related objects that need to be shown together with failed object
// e.g subjects will have in relatedObjects - role + rolebinding

const RegoAttackVectorGroup string = "regoAttackVector"
const RegoAttackVectorVersion string = "v1"
// const RegoAttackVectorGroup string = "regoAttackVector"
// const RegoAttackVectorVersion string = "v1"

const RelatedObjectsKey string = "relatedObjects"
const TypeRegoResponseVectorObject workloadinterface.ObjectType = "regoResponse"
Expand Down
3 changes: 1 addition & 2 deletions reporthandling/regoresourcesaggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package reporthandling
import (
"bytes"
"encoding/gob"
"fmt"
"strings"

"github.com/armosec/k8s-interface/k8sinterface"
Expand Down Expand Up @@ -48,7 +47,7 @@ func AggregateResourcesBySubjects(k8sObjects []workloadinterface.IMetadata) ([]w
if err != nil {
return aggregatedK8sObjects, err
}
subjectCopy["apiVersion"] = fmt.Sprintf("%s/%s", objectsenvelopes.RegoAttackVectorGroup, objectsenvelopes.RegoAttackVectorVersion)
// subjectCopy["apiVersion"] = fmt.Sprintf("%s/%s", objectsenvelopes.RegoAttackVectorGroup, objectsenvelopes.RegoAttackVectorVersion)
subjectCopy[objectsenvelopes.RelatedObjectsKey] = []map[string]interface{}{bindingWorkload.GetObject(), roleWorkload.GetObject()}
newObj := objectsenvelopes.NewRegoResponseVectorObject(subjectCopy)
aggregatedK8sObjects = append(aggregatedK8sObjects, newObj)
Expand Down

0 comments on commit 42ea42a

Please sign in to comment.