-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MEDIUM: add transformer functions to all K8s events
For Ingress: remove duplicates in tls and rules For all objects: remove metadata.ManagedFields For Ingress: in informers, discard events if the resourceVersion has already been processed This will also allow to have all k8s events in Elastic.
- Loading branch information
1 parent
c5f940d
commit 1980ba2
Showing
47 changed files
with
1,490 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,4 @@ allowed: | |
- crd | ||
- linter | ||
- linters | ||
- tls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2019 HAProxy Technologies LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package k8s | ||
|
||
import ( | ||
k8smeta "github.com/haproxytech/kubernetes-ingress/pkg/k8s/meta" | ||
k8ssync "github.com/haproxytech/kubernetes-ingress/pkg/k8s/sync" | ||
"k8s.io/apimachinery/pkg/types" | ||
) | ||
|
||
func ToSyncDataEvent(meta k8smeta.MetaInfoer, data interface{}, uid types.UID, resourceVersion string) k8ssync.SyncDataEvent { | ||
return k8ssync.SyncDataEvent{ | ||
SyncType: meta.GetType(), | ||
Namespace: meta.GetNamespace(), | ||
Name: meta.GetName(), | ||
Data: data, | ||
UID: uid, | ||
ResourceVersion: resourceVersion, | ||
} | ||
} |
Oops, something went wrong.