mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-25 20:46:13 +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)
|
||||
|
||||
ownerReferences := applyconfmeta.OwnerReference()
|
||||
// ownerReferences.WithAPIVersion()
|
||||
ownerReferences.WithKind("DaemonSet")
|
||||
ownerReferences.WithName(daemonSetName)
|
||||
// ownerReferences.WithUID()
|
||||
// ownerReferences.WithController()
|
||||
// ownerReferences.WithBlockOwnerDeletion()
|
||||
|
||||
labelSelector := applyconfmeta.LabelSelector()
|
||||
labelSelector.WithMatchLabels(map[string]string{"app": tapperPodName})
|
||||
|
||||
daemonSet := applyconfapp.DaemonSet(daemonSetName, namespace)
|
||||
daemonSet.
|
||||
WithOwnerReferences(ownerReferences).
|
||||
WithLabels(map[string]string{
|
||||
LabelManagedBy: provider.managedBy,
|
||||
LabelCreatedBy: provider.createdBy,
|
||||
|
Reference in New Issue
Block a user