Skip to content

Commit 9f20605

Browse files
authored
rename commonlogk8sauditv2 to commonlogk8saudit (#662)
1 parent 9c104c0 commit 9f20605

62 files changed

Lines changed: 572 additions & 572 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.

pkg/task/inspection/commonlogk8sauditv2/contract/fieldset.go renamed to pkg/task/inspection/commonlogk8saudit/contract/fieldset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package commonlogk8sauditv2_contract
15+
package commonlogk8saudit_contract
1616

1717
import (
1818
"github.com/GoogleCloudPlatform/khi/pkg/common/structured"

pkg/task/inspection/commonlogk8sauditv2/contract/inventory.go renamed to pkg/task/inspection/commonlogk8saudit/contract/inventory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package commonlogk8sauditv2_contract
15+
package commonlogk8saudit_contract
1616

1717
import (
1818
inspectiontaskbase "github.com/GoogleCloudPlatform/khi/pkg/core/inspection/taskbase"

pkg/task/inspection/commonlogk8sauditv2/contract/manifestmapper.go renamed to pkg/task/inspection/commonlogk8saudit/contract/manifestmapper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package commonlogk8sauditv2_contract
15+
package commonlogk8saudit_contract
1616

1717
import (
1818
"context"

pkg/task/inspection/commonlogk8sauditv2/contract/taskid.go renamed to pkg/task/inspection/commonlogk8saudit/contract/taskid.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package commonlogk8sauditv2_contract
15+
package commonlogk8saudit_contract
1616

1717
import (
1818
"github.com/GoogleCloudPlatform/khi/pkg/common/patternfinder"
@@ -23,7 +23,7 @@ import (
2323
)
2424

2525
// TaskIDPrefix is the prefix for all task IDs in this package.
26-
var TaskIDPrefix = "khi.google.com/k8s-common-auditlog-v2/"
26+
var TaskIDPrefix = "khi.google.com/k8s-common-auditlog/"
2727

2828
// K8sAuditLogProviderRef is the task reference for the task to fetch k8s audit log.
2929
// The actual implementation for this reference must provide log array with the K8sAuditLogFieldSet.

pkg/task/inspection/commonlogk8sauditv2/contract/type.go renamed to pkg/task/inspection/commonlogk8saudit/contract/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package commonlogk8sauditv2_contract
15+
package commonlogk8saudit_contract
1616

1717
import (
1818
"fmt"

pkg/task/inspection/commonlogk8sauditv2/impl/common_task.go renamed to pkg/task/inspection/commonlogk8saudit/impl/common_task.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package commonlogk8sauditv2_impl
15+
package commonlogk8saudit_impl
1616

1717
import (
1818
inspectiontaskbase "github.com/GoogleCloudPlatform/khi/pkg/core/inspection/taskbase"
19-
commonlogk8sauditv2_contract "github.com/GoogleCloudPlatform/khi/pkg/task/inspection/commonlogk8sauditv2/contract"
19+
commonlogk8saudit_contract "github.com/GoogleCloudPlatform/khi/pkg/task/inspection/commonlogk8saudit/contract"
2020
)
2121

2222
// LogSorterTask is the task to sort logs by time.
2323
var LogSorterTask = inspectiontaskbase.NewLogSorterByTimeTask(
24-
commonlogk8sauditv2_contract.LogSorterTaskID,
25-
commonlogk8sauditv2_contract.SuccessLogFilterTaskID.Ref(),
24+
commonlogk8saudit_contract.LogSorterTaskID,
25+
commonlogk8saudit_contract.SuccessLogFilterTaskID.Ref(),
2626
)

pkg/task/inspection/commonlogk8sauditv2/impl/conditionmapper_task.go renamed to pkg/task/inspection/commonlogk8saudit/impl/conditionmapper_task.go

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package commonlogk8sauditv2_impl
15+
package commonlogk8saudit_impl
1616

1717
import (
1818
"context"
@@ -27,12 +27,12 @@ import (
2727
"github.com/GoogleCloudPlatform/khi/pkg/model/history"
2828
"github.com/GoogleCloudPlatform/khi/pkg/model/history/resourcepath"
2929
"github.com/GoogleCloudPlatform/khi/pkg/model/log"
30-
commonlogk8sauditv2_contract "github.com/GoogleCloudPlatform/khi/pkg/task/inspection/commonlogk8sauditv2/contract"
30+
commonlogk8saudit_contract "github.com/GoogleCloudPlatform/khi/pkg/task/inspection/commonlogk8saudit/contract"
3131
)
3232

3333
// ConditionLogToTimelineMapperTask is a ManifestLogToTimelineMapper task that tracks and records the history of Kubernetes resource conditions.
3434
// It analyzes status.conditions fields in audit logs to generate revisions for each condition type (e.g., Ready, Scheduled).
35-
var ConditionLogToTimelineMapperTask = commonlogk8sauditv2_contract.NewManifestLogToTimelineMapper[*conditionLogToTimelineMapperTaskState](&conditionLogToTimelineMapperTaskSetting{
35+
var ConditionLogToTimelineMapperTask = commonlogk8saudit_contract.NewManifestLogToTimelineMapper[*conditionLogToTimelineMapperTaskState](&conditionLogToTimelineMapperTaskSetting{
3636
minimumDeltaTimeToCreateInferredCreationRevision: 10 * time.Second,
3737
})
3838

@@ -48,8 +48,8 @@ type conditionLogToTimelineMapperTaskSetting struct {
4848
minimumDeltaTimeToCreateInferredCreationRevision time.Duration
4949
}
5050

51-
// Process implements commonlogk8sauditv2_contract.ManifestLogToTimelineMapperTaskSetting.
52-
func (c *conditionLogToTimelineMapperTaskSetting) Process(ctx context.Context, passIndex int, event commonlogk8sauditv2_contract.ResourceChangeEvent, cs *history.ChangeSet, builder *history.Builder, prevResource *conditionLogToTimelineMapperTaskState) (*conditionLogToTimelineMapperTaskState, error) {
51+
// Process implements commonlogk8saudit_contract.ManifestLogToTimelineMapperTaskSetting.
52+
func (c *conditionLogToTimelineMapperTaskSetting) Process(ctx context.Context, passIndex int, event commonlogk8saudit_contract.ResourceChangeEvent, cs *history.ChangeSet, builder *history.Builder, prevResource *conditionLogToTimelineMapperTaskState) (*conditionLogToTimelineMapperTaskState, error) {
5353
if event.EventTargetBodyReader == nil {
5454
return prevResource, nil
5555
}
@@ -63,17 +63,17 @@ func (c *conditionLogToTimelineMapperTaskSetting) Process(ctx context.Context, p
6363
}
6464
}
6565

66-
// TaskID implements commonlogk8sauditv2_contract.ManifestLogToTimelineMapperTaskSetting.
66+
// TaskID implements commonlogk8saudit_contract.ManifestLogToTimelineMapperTaskSetting.
6767
func (c *conditionLogToTimelineMapperTaskSetting) TaskID() taskid.TaskImplementationID[struct{}] {
68-
return commonlogk8sauditv2_contract.ConditionLogToTimelineMapperTaskID
68+
return commonlogk8saudit_contract.ConditionLogToTimelineMapperTaskID
6969
}
7070

71-
// ResourcePairs implements commonlogk8sauditv2_contract.ManifestLogToTimelineMapperTaskSetting.
72-
func (c *conditionLogToTimelineMapperTaskSetting) ResourcePairs(ctx context.Context, groupedLogs commonlogk8sauditv2_contract.ResourceManifestLogGroupMap) ([]commonlogk8sauditv2_contract.ResourcePair, error) {
73-
result := []commonlogk8sauditv2_contract.ResourcePair{}
71+
// ResourcePairs implements commonlogk8saudit_contract.ManifestLogToTimelineMapperTaskSetting.
72+
func (c *conditionLogToTimelineMapperTaskSetting) ResourcePairs(ctx context.Context, groupedLogs commonlogk8saudit_contract.ResourceManifestLogGroupMap) ([]commonlogk8saudit_contract.ResourcePair, error) {
73+
result := []commonlogk8saudit_contract.ResourcePair{}
7474
for _, group := range groupedLogs {
75-
if group.Resource.Type() == commonlogk8sauditv2_contract.Resource {
76-
result = append(result, commonlogk8sauditv2_contract.ResourcePair{
75+
if group.Resource.Type() == commonlogk8saudit_contract.Resource {
76+
result = append(result, commonlogk8saudit_contract.ResourcePair{
7777
TargetGroup: group.Resource,
7878
})
7979
}
@@ -83,15 +83,15 @@ func (c *conditionLogToTimelineMapperTaskSetting) ResourcePairs(ctx context.Cont
8383

8484
// processFirstPass collects all available condition types from the log.
8585
// This is necessary because some conditions might appear later in the history, and we need to know about them upfront to track their state correctly.
86-
func (c *conditionLogToTimelineMapperTaskSetting) processFirstPass(ctx context.Context, event commonlogk8sauditv2_contract.ResourceChangeEvent, cs *history.ChangeSet, builder *history.Builder, state *conditionLogToTimelineMapperTaskState) (*conditionLogToTimelineMapperTaskState, error) {
86+
func (c *conditionLogToTimelineMapperTaskSetting) processFirstPass(ctx context.Context, event commonlogk8saudit_contract.ResourceChangeEvent, cs *history.ChangeSet, builder *history.Builder, state *conditionLogToTimelineMapperTaskState) (*conditionLogToTimelineMapperTaskState, error) {
8787
if state == nil {
8888
state = &conditionLogToTimelineMapperTaskState{
8989
AvailableTypes: map[string]struct{}{},
9090
ConditionWalkers: map[string]*conditionWalker{},
9191
}
9292
}
9393
commonFieldSet := log.MustGetFieldSet(event.Log, &log.CommonFieldSet{})
94-
k8sFieldSet := log.MustGetFieldSet(event.Log, &commonlogk8sauditv2_contract.K8sAuditLogFieldSet{})
94+
k8sFieldSet := log.MustGetFieldSet(event.Log, &commonlogk8saudit_contract.K8sAuditLogFieldSet{})
9595
ownerPath := resourcepath.ResourcePath{
9696
Path: event.EventTargetResource.ResourcePathString(),
9797
ParentRelationship: enum.RelationshipChild,
@@ -123,9 +123,9 @@ func (c *conditionLogToTimelineMapperTaskSetting) processFirstPass(ctx context.C
123123

124124
// processSecondPass generates revisions for each condition type based on the collected available types.
125125
// It handles standard updates, inferred creations (when creation time is missing from the log), and deletions.
126-
func (c *conditionLogToTimelineMapperTaskSetting) processSecondPass(ctx context.Context, event commonlogk8sauditv2_contract.ResourceChangeEvent, cs *history.ChangeSet, builder *history.Builder, state *conditionLogToTimelineMapperTaskState) (*conditionLogToTimelineMapperTaskState, error) {
126+
func (c *conditionLogToTimelineMapperTaskSetting) processSecondPass(ctx context.Context, event commonlogk8saudit_contract.ResourceChangeEvent, cs *history.ChangeSet, builder *history.Builder, state *conditionLogToTimelineMapperTaskState) (*conditionLogToTimelineMapperTaskState, error) {
127127
commonFieldSet := log.MustGetFieldSet(event.Log, &log.CommonFieldSet{})
128-
k8sFieldSet := log.MustGetFieldSet(event.Log, &commonlogk8sauditv2_contract.K8sAuditLogFieldSet{})
128+
k8sFieldSet := log.MustGetFieldSet(event.Log, &commonlogk8saudit_contract.K8sAuditLogFieldSet{})
129129
ownerPath := resourcepath.ResourcePath{
130130
Path: event.EventTargetResource.ResourcePathString(),
131131
ParentRelationship: enum.RelationshipChild,
@@ -147,7 +147,7 @@ func (c *conditionLogToTimelineMapperTaskSetting) processSecondPass(ctx context.
147147
}
148148
slices.Sort(sortedKeys)
149149

150-
if event.EventType == commonlogk8sauditv2_contract.ChangeEventTypeTargetCreation {
150+
if event.EventType == commonlogk8saudit_contract.ChangeEventTypeTargetCreation {
151151
creationTime, found := GetCreationTimestamp(event.EventTargetBodyReader)
152152
if found {
153153
if commonFieldSet.Timestamp.Sub(creationTime) > c.minimumDeltaTimeToCreateInferredCreationRevision {
@@ -175,7 +175,7 @@ func (c *conditionLogToTimelineMapperTaskSetting) processSecondPass(ctx context.
175175
walker.CheckAndRecord(commonFieldSet, k8sFieldSet, currentConditions[key], cs)
176176
}
177177

178-
if event.EventType == commonlogk8sauditv2_contract.ChangeEventTypeTargetDeletion {
178+
if event.EventType == commonlogk8saudit_contract.ChangeEventTypeTargetDeletion {
179179
for _, key := range sortedKeys {
180180
walker := state.ConditionWalkers[key]
181181
if walker == nil {
@@ -198,27 +198,27 @@ func (c *conditionLogToTimelineMapperTaskSetting) processSecondPass(ctx context.
198198
return state, nil
199199
}
200200

201-
// Dependencies implements commonlogk8sauditv2_contract.ManifestLogToTimelineMapperTaskSetting.
201+
// Dependencies implements commonlogk8saudit_contract.ManifestLogToTimelineMapperTaskSetting.
202202
func (c *conditionLogToTimelineMapperTaskSetting) Dependencies() []taskid.UntypedTaskReference {
203203
return []taskid.UntypedTaskReference{}
204204
}
205205

206-
// PassCount implements commonlogk8sauditv2_contract.ManifestLogToTimelineMapperTaskSetting.
206+
// PassCount implements commonlogk8saudit_contract.ManifestLogToTimelineMapperTaskSetting.
207207
func (c *conditionLogToTimelineMapperTaskSetting) PassCount() int {
208208
return 2
209209
}
210210

211-
// GroupedLogTask implements commonlogk8sauditv2_contract.ManifestLogToTimelineMapperTaskSetting.
212-
func (c *conditionLogToTimelineMapperTaskSetting) GroupedLogTask() taskid.TaskReference[commonlogk8sauditv2_contract.ResourceManifestLogGroupMap] {
213-
return commonlogk8sauditv2_contract.ResourceLifetimeTrackerTaskID.Ref()
211+
// GroupedLogTask implements commonlogk8saudit_contract.ManifestLogToTimelineMapperTaskSetting.
212+
func (c *conditionLogToTimelineMapperTaskSetting) GroupedLogTask() taskid.TaskReference[commonlogk8saudit_contract.ResourceManifestLogGroupMap] {
213+
return commonlogk8saudit_contract.ResourceLifetimeTrackerTaskID.Ref()
214214
}
215215

216-
// LogIngesterTask implements commonlogk8sauditv2_contract.ManifestLogToTimelineMapperTaskSetting.
216+
// LogIngesterTask implements commonlogk8saudit_contract.ManifestLogToTimelineMapperTaskSetting.
217217
func (c *conditionLogToTimelineMapperTaskSetting) LogIngesterTask() taskid.TaskReference[[]*log.Log] {
218-
return commonlogk8sauditv2_contract.K8sAuditLogIngesterTaskID.Ref()
218+
return commonlogk8saudit_contract.K8sAuditLogIngesterTaskID.Ref()
219219
}
220220

221-
var _ commonlogk8sauditv2_contract.ManifestLogToTimelineMapperTaskSetting[*conditionLogToTimelineMapperTaskState] = (*conditionLogToTimelineMapperTaskSetting)(nil)
221+
var _ commonlogk8saudit_contract.ManifestLogToTimelineMapperTaskSetting[*conditionLogToTimelineMapperTaskState] = (*conditionLogToTimelineMapperTaskSetting)(nil)
222222

223223
// conditionStateToRevisionState converts a Kubernetes condition status string ("True", "False", etc.) to a KHI RevisionState enum.
224224
func conditionStateToRevisionState(conditionState string) enum.RevisionState {
@@ -268,15 +268,15 @@ func newConditionWalker(parentResource resourcepath.ResourcePath, stateType stri
268268
}
269269

270270
// checkLastTransitionTimes memorizes the last transition time of the condition. This value is used for complementing values for logs without the full status information.
271-
func (c *conditionWalker) checkLastTransitionTimes(commonLog *log.CommonFieldSet, k8sAuditLog *commonlogk8sauditv2_contract.K8sAuditLogFieldSet, condition *model.K8sResourceStatusCondition) {
271+
func (c *conditionWalker) checkLastTransitionTimes(commonLog *log.CommonFieldSet, k8sAuditLog *commonlogk8saudit_contract.K8sAuditLogFieldSet, condition *model.K8sResourceStatusCondition) {
272272
if condition != nil && condition.Status != "" && condition.LastTransitionTime != "" {
273273
c.lastTransitionStates[condition.LastTransitionTime] = condition
274274
}
275275
}
276276

277277
// CheckAndRecord compares the current condition with the previous state and records a revision if there is a significant change.
278278
// It tracks changes in Status, LastTransitionTime, and LastHeartbeatTime (ProbeLikeTime).
279-
func (c *conditionWalker) CheckAndRecord(commonLog *log.CommonFieldSet, k8sAuditLog *commonlogk8sauditv2_contract.K8sAuditLogFieldSet, condition *model.K8sResourceStatusCondition, cs *history.ChangeSet) {
279+
func (c *conditionWalker) CheckAndRecord(commonLog *log.CommonFieldSet, k8sAuditLog *commonlogk8saudit_contract.K8sAuditLogFieldSet, condition *model.K8sResourceStatusCondition, cs *history.ChangeSet) {
280280
if condition == nil {
281281
if c.lastStatus != "n/a" {
282282
cs.AddRevision(c.conditionPath(), &history.StagingResourceRevision{

pkg/task/inspection/commonlogk8sauditv2/impl/conditionmapper_task_test.go renamed to pkg/task/inspection/commonlogk8saudit/impl/conditionmapper_task_test.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package commonlogk8sauditv2_impl
15+
package commonlogk8saudit_impl
1616

1717
import (
1818
"context"
@@ -24,7 +24,7 @@ import (
2424
"github.com/GoogleCloudPlatform/khi/pkg/model/history"
2525
"github.com/GoogleCloudPlatform/khi/pkg/model/history/resourcepath"
2626
"github.com/GoogleCloudPlatform/khi/pkg/model/log"
27-
commonlogk8sauditv2_contract "github.com/GoogleCloudPlatform/khi/pkg/task/inspection/commonlogk8sauditv2/contract"
27+
commonlogk8saudit_contract "github.com/GoogleCloudPlatform/khi/pkg/task/inspection/commonlogk8saudit/contract"
2828
"github.com/GoogleCloudPlatform/khi/pkg/testutil"
2929
"github.com/GoogleCloudPlatform/khi/pkg/testutil/testchangeset"
3030
"github.com/google/go-cmp/cmp"
@@ -41,7 +41,7 @@ func TestConditionWalker(t *testing.T) {
4141
commonFieldSet := &log.CommonFieldSet{
4242
Timestamp: baseTime,
4343
}
44-
k8sFieldSet := &commonlogk8sauditv2_contract.K8sAuditLogFieldSet{
44+
k8sFieldSet := &commonlogk8saudit_contract.K8sAuditLogFieldSet{
4545
K8sOperation: &model.KubernetesObjectOperation{
4646
Verb: enum.RevisionVerbUpdate,
4747
},
@@ -252,7 +252,7 @@ func TestConditionLogToTimelineMapperTask_Process(t *testing.T) {
252252
name string
253253
pass int
254254
yaml string
255-
eventType commonlogk8sauditv2_contract.ChangeEventType
255+
eventType commonlogk8saudit_contract.ChangeEventType
256256
operation enum.RevisionVerb
257257
timestamp time.Time
258258
initialState *conditionLogToTimelineMapperTaskState
@@ -269,7 +269,7 @@ status:
269269
status: "True"
270270
lastTransitionTime: "2024-01-01T00:00:00Z"
271271
`,
272-
eventType: commonlogk8sauditv2_contract.ChangeEventTypeTargetModification,
272+
eventType: commonlogk8saudit_contract.ChangeEventTypeTargetModification,
273273
operation: enum.RevisionVerbUpdate,
274274
timestamp: time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC),
275275
initialState: &conditionLogToTimelineMapperTaskState{
@@ -304,7 +304,7 @@ status:
304304
- type: Ready
305305
status: "True"
306306
`,
307-
eventType: commonlogk8sauditv2_contract.ChangeEventTypeTargetModification,
307+
eventType: commonlogk8saudit_contract.ChangeEventTypeTargetModification,
308308
operation: enum.RevisionVerbUpdate,
309309
timestamp: time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC),
310310
initialState: nil,
@@ -336,7 +336,7 @@ status:
336336
- type: Scheduled
337337
status: "True"
338338
`,
339-
eventType: commonlogk8sauditv2_contract.ChangeEventTypeTargetModification,
339+
eventType: commonlogk8saudit_contract.ChangeEventTypeTargetModification,
340340
operation: enum.RevisionVerbUpdate,
341341
timestamp: time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC),
342342
initialState: &conditionLogToTimelineMapperTaskState{
@@ -376,7 +376,7 @@ status:
376376
status: "True"
377377
lastTransitionTime: "2024-01-01T00:00:00Z"
378378
`,
379-
eventType: commonlogk8sauditv2_contract.ChangeEventTypeTargetModification,
379+
eventType: commonlogk8saudit_contract.ChangeEventTypeTargetModification,
380380
operation: enum.RevisionVerbUpdate,
381381
timestamp: time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC),
382382
initialState: &conditionLogToTimelineMapperTaskState{
@@ -418,7 +418,7 @@ status:
418418
- type: Ready
419419
lastProbeTime: "2024-01-01T00:00:00Z"
420420
`,
421-
eventType: commonlogk8sauditv2_contract.ChangeEventTypeTargetModification,
421+
eventType: commonlogk8saudit_contract.ChangeEventTypeTargetModification,
422422
operation: enum.RevisionVerbUpdate,
423423
timestamp: time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC),
424424
initialState: &conditionLogToTimelineMapperTaskState{
@@ -494,7 +494,7 @@ metadata:
494494
status:
495495
conditions: []
496496
`,
497-
eventType: commonlogk8sauditv2_contract.ChangeEventTypeTargetCreation,
497+
eventType: commonlogk8saudit_contract.ChangeEventTypeTargetCreation,
498498
operation: enum.RevisionVerbCreate,
499499
timestamp: time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC),
500500
initialState: &conditionLogToTimelineMapperTaskState{
@@ -534,7 +534,7 @@ status:
534534
status:
535535
conditions: []
536536
`,
537-
eventType: commonlogk8sauditv2_contract.ChangeEventTypeTargetDeletion,
537+
eventType: commonlogk8saudit_contract.ChangeEventTypeTargetDeletion,
538538
operation: enum.RevisionVerbDelete,
539539
timestamp: time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC),
540540
initialState: &conditionLogToTimelineMapperTaskState{
@@ -574,19 +574,19 @@ status:
574574
reader := mustParseYAML(t, tc.yaml)
575575
l := log.NewLogWithFieldSetsForTest(
576576
&log.CommonFieldSet{},
577-
&commonlogk8sauditv2_contract.K8sAuditLogFieldSet{},
577+
&commonlogk8saudit_contract.K8sAuditLogFieldSet{},
578578
)
579579
commonFieldSet := log.MustGetFieldSet(l, &log.CommonFieldSet{})
580580
commonFieldSet.Timestamp = tc.timestamp
581-
k8sFieldSet := log.MustGetFieldSet(l, &commonlogk8sauditv2_contract.K8sAuditLogFieldSet{})
581+
k8sFieldSet := log.MustGetFieldSet(l, &commonlogk8saudit_contract.K8sAuditLogFieldSet{})
582582
k8sFieldSet.K8sOperation = &model.KubernetesObjectOperation{Verb: tc.operation}
583583
k8sFieldSet.Principal = "user-1"
584584

585-
event := commonlogk8sauditv2_contract.ResourceChangeEvent{
585+
event := commonlogk8saudit_contract.ResourceChangeEvent{
586586
Log: l,
587587
EventType: tc.eventType,
588588
EventTargetBodyReader: reader,
589-
EventTargetResource: &commonlogk8sauditv2_contract.ResourceIdentity{
589+
EventTargetResource: &commonlogk8saudit_contract.ResourceIdentity{
590590
APIVersion: "core/v1",
591591
Kind: "pod",
592592
Namespace: "default",

0 commit comments

Comments
 (0)