mirror of
https://github.com/netbirdio/kubernetes-operator.git
synced 2026-05-22 17:11:40 -07:00
Remove pod label overwriting (#87)
Pod labels are being set in line 242, and the`podLabels` variable already contains the extra `"app.kubernetes.io/name": "netbird-router"` label, so lines 244-246 are effectively just overwriting any labels that have been set in the crd. This is blocking us from using this crd because we need a label disabling istio injection for the peer to work correctly.
This commit is contained in:
@@ -241,9 +241,6 @@ func (r *NBRoutingPeerReconciler) handleDeployment(ctx context.Context, req ctrl
|
||||
updatedDeployment.Spec.Template.Spec.NodeSelector = nbrp.Spec.NodeSelector
|
||||
updatedDeployment.Spec.Template.ObjectMeta.Labels = podLabels
|
||||
updatedDeployment.Spec.Template.Spec.Volumes = nbrp.Spec.Volumes
|
||||
updatedDeployment.Spec.Template.ObjectMeta.Labels = map[string]string{
|
||||
"app.kubernetes.io/name": "netbird-router",
|
||||
}
|
||||
if len(updatedDeployment.Spec.Template.Spec.Containers) != 1 {
|
||||
updatedDeployment.Spec.Template.Spec.Containers = []corev1.Container{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user