mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-26 04:54:36 +00:00
Add OwnerReferences to DaemonSet
This commit is contained in:
@@ -949,11 +949,20 @@ func (provider *Provider) ApplyMizuTapperDaemonSet(ctx context.Context, namespac
|
|||||||
})
|
})
|
||||||
podTemplate.WithSpec(podSpec)
|
podTemplate.WithSpec(podSpec)
|
||||||
|
|
||||||
|
ownerReferences := applyconfmeta.OwnerReference()
|
||||||
|
// ownerReferences.WithAPIVersion()
|
||||||
|
ownerReferences.WithKind("DaemonSet")
|
||||||
|
ownerReferences.WithName(daemonSetName)
|
||||||
|
// ownerReferences.WithUID()
|
||||||
|
// ownerReferences.WithController()
|
||||||
|
// ownerReferences.WithBlockOwnerDeletion()
|
||||||
|
|
||||||
labelSelector := applyconfmeta.LabelSelector()
|
labelSelector := applyconfmeta.LabelSelector()
|
||||||
labelSelector.WithMatchLabels(map[string]string{"app": tapperPodName})
|
labelSelector.WithMatchLabels(map[string]string{"app": tapperPodName})
|
||||||
|
|
||||||
daemonSet := applyconfapp.DaemonSet(daemonSetName, namespace)
|
daemonSet := applyconfapp.DaemonSet(daemonSetName, namespace)
|
||||||
daemonSet.
|
daemonSet.
|
||||||
|
WithOwnerReferences(ownerReferences).
|
||||||
WithLabels(map[string]string{
|
WithLabels(map[string]string{
|
||||||
LabelManagedBy: provider.managedBy,
|
LabelManagedBy: provider.managedBy,
|
||||||
LabelCreatedBy: provider.createdBy,
|
LabelCreatedBy: provider.createdBy,
|
||||||
|
Reference in New Issue
Block a user