mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
Add optional privileged mode to NBRoutingPeerSpec (#92)
Introduced a new optional boolean field `Privileged` in the `NBRoutingPeerSpec` to allow deployments to specify if containers should run in privileged mode. Updated the CRD, Helm templates, and controller logic to support this feature. A new function `buildSecurityContext` was added to handle the creation of the appropriate security context based on the `Privileged` setting. Tests were updated to cover scenarios where privileged mode is enabled, disabled, or unspecified. This change allows more granular control over container security settings, potentially increasing compatibility with certain workloads that require elevated privileges. see https://github.com/netbirdio/kubernetes-operator/issues/90 **Note:** I am not a Go developer and have no experience with this architecture. I may have overlooked some things.
This commit is contained in:
@@ -539,6 +539,11 @@ func (in *NBRoutingPeerSpec) DeepCopyInto(out *NBRoutingPeerSpec) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Privileged != nil {
|
||||
in, out := &in.Privileged, &out.Privileged
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NBRoutingPeerSpec.
|
||||
|
||||
Reference in New Issue
Block a user