Add optional Volume mounting for Client containers

This commit is contained in:
M Essam Hamed
2025-08-10 10:25:13 +03:00
committed by M. Essam
parent 2606b87173
commit 20b3ba60ba
8 changed files with 3743 additions and 3 deletions
+4
View File
@@ -20,6 +20,10 @@ type NBRoutingPeerSpec struct {
NodeSelector map[string]string `json:"nodeSelector"`
// +optional
Tolerations []corev1.Toleration `json:"tolerations"`
// +optional
Volumes []corev1.Volume `json:"volumes"`
// +optional
VolumeMounts []corev1.VolumeMount `json:"volumeMounts"`
}
// NBRoutingPeerStatus defines the observed state of NBRoutingPeer.
+6
View File
@@ -36,6 +36,12 @@ type NBSetupKeySpec struct {
SecretKeyRef corev1.SecretKeySelector `json:"secretKeyRef"`
// ManagementURL optional, override operator management URL
ManagementURL string `json:"managementURL,omitempty"`
// Volumes optional, additional volumes for NetBird container
// +optional
Volumes []corev1.Volume `json:"volumes,omitempty"`
// VolumeMounts optional, additional volumeMounts for NetBird container
// +optional
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
}
// NBSetupKeyStatus defines the observed state of NBSetupKey.
+28
View File
@@ -525,6 +525,20 @@ func (in *NBRoutingPeerSpec) DeepCopyInto(out *NBRoutingPeerSpec) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Volumes != nil {
in, out := &in.Volumes, &out.Volumes
*out = make([]corev1.Volume, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.VolumeMounts != nil {
in, out := &in.VolumeMounts, &out.VolumeMounts
*out = make([]corev1.VolumeMount, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NBRoutingPeerSpec.
@@ -637,6 +651,20 @@ func (in *NBSetupKeyList) DeepCopyObject() runtime.Object {
func (in *NBSetupKeySpec) DeepCopyInto(out *NBSetupKeySpec) {
*out = *in
in.SecretKeyRef.DeepCopyInto(&out.SecretKeyRef)
if in.Volumes != nil {
in, out := &in.Volumes, &out.Volumes
*out = make([]corev1.Volume, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.VolumeMounts != nil {
in, out := &in.VolumeMounts, &out.VolumeMounts
*out = make([]corev1.VolumeMount, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NBSetupKeySpec.