diff --git a/api/operator/v1/vlagent_types.go b/api/operator/v1/vlagent_types.go
index f9d0b64b2..dd94d3c6b 100644
--- a/api/operator/v1/vlagent_types.go
+++ b/api/operator/v1/vlagent_types.go
@@ -64,6 +64,9 @@ type VLAgentSpec struct {
// PodDisruptionBudget created by operator
// +optional
PodDisruptionBudget *vmv1beta1.EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *vmv1beta1.EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// Storage configures storage for StatefulSet
// +optional
Storage *vmv1beta1.StorageSpec `json:"storage,omitempty"`
diff --git a/api/operator/v1/vlcluster_types.go b/api/operator/v1/vlcluster_types.go
index 58eec8887..763c3c6c0 100644
--- a/api/operator/v1/vlcluster_types.go
+++ b/api/operator/v1/vlcluster_types.go
@@ -253,6 +253,9 @@ type VLInsert struct {
// Configures vertical pod autoscaling.
// +optional
VPA *vmv1beta1.EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *vmv1beta1.EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// SyslogSpec defines syslog listener configuration
// +optional
SyslogSpec *SyslogServerSpec `json:"syslogSpec,omitempty"`
@@ -440,6 +443,9 @@ type VLSelect struct {
// Configures vertical pod autoscaling.
// +optional
VPA *vmv1beta1.EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *vmv1beta1.EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// UpdateStrategy - overrides default update strategy.
// +kubebuilder:validation:Enum=Recreate;RollingUpdate
@@ -567,6 +573,9 @@ type VLStorage struct {
// Configures vertical pod autoscaling.
// +optional
VPA *vmv1beta1.EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *vmv1beta1.EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// StorageDataPath - path to storage data
// +optional
diff --git a/api/operator/v1/vlsingle_types.go b/api/operator/v1/vlsingle_types.go
index 4b8bed8c8..db937ad58 100644
--- a/api/operator/v1/vlsingle_types.go
+++ b/api/operator/v1/vlsingle_types.go
@@ -115,6 +115,9 @@ type VLSingleSpec struct {
// Configures vertical pod autoscaling.
// +optional
VPA *vmv1beta1.EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *vmv1beta1.EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
}
// VLSingleStatus defines the observed state of VLSingle
diff --git a/api/operator/v1/vmanomaly_types.go b/api/operator/v1/vmanomaly_types.go
index 2a3920872..0b0667a8f 100644
--- a/api/operator/v1/vmanomaly_types.go
+++ b/api/operator/v1/vmanomaly_types.go
@@ -64,6 +64,9 @@ type VMAnomalySpec struct {
// VPA defines configuration for the VerticalPodAutoscaler.
// +optional
VPA *vmv1beta1.EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *vmv1beta1.EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// ConfigRawYaml - raw configuration for anomaly,
// it helps it to start without secret.
// priority -> hardcoded ConfigRaw -> ConfigRaw, provided by user -> ConfigSecret.
diff --git a/api/operator/v1/vtcluster_types.go b/api/operator/v1/vtcluster_types.go
index 1c3c8d647..e7277c0ff 100644
--- a/api/operator/v1/vtcluster_types.go
+++ b/api/operator/v1/vtcluster_types.go
@@ -248,6 +248,9 @@ type VTInsert struct {
// Configures vertical pod autoscaling.
// +optional
VPA *vmv1beta1.EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *vmv1beta1.EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// UpdateStrategy - overrides default update strategy.
// +kubebuilder:validation:Enum=Recreate;RollingUpdate
@@ -347,6 +350,9 @@ type VTSelect struct {
// Configures vertical pod autoscaling.
// +optional
VPA *vmv1beta1.EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *vmv1beta1.EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// UpdateStrategy - overrides default update strategy.
// +kubebuilder:validation:Enum=Recreate;RollingUpdate
@@ -477,6 +483,9 @@ type VTStorage struct {
// Configures vertical pod autoscaling.
// +optional
VPA *vmv1beta1.EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *vmv1beta1.EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// StorageDataPath - path to storage data
// +optional
diff --git a/api/operator/v1/vtsingle_types.go b/api/operator/v1/vtsingle_types.go
index 397744780..5881601d3 100644
--- a/api/operator/v1/vtsingle_types.go
+++ b/api/operator/v1/vtsingle_types.go
@@ -109,6 +109,9 @@ type VTSingleSpec struct {
// Configures vertical pod autoscaling.
// +optional
VPA *vmv1beta1.EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *vmv1beta1.EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
}
// VTSingleStatus defines the observed state of VTSingle
diff --git a/api/operator/v1/zz_generated.deepcopy.go b/api/operator/v1/zz_generated.deepcopy.go
index 92b917927..c764f86ff 100644
--- a/api/operator/v1/zz_generated.deepcopy.go
+++ b/api/operator/v1/zz_generated.deepcopy.go
@@ -461,6 +461,11 @@ func (in *VLAgentSpec) DeepCopyInto(out *VLAgentSpec) {
*out = new(v1beta1.EmbeddedPodDisruptionBudgetSpec)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(v1beta1.EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.Storage != nil {
in, out := &in.Storage, &out.Storage
*out = new(v1beta1.StorageSpec)
@@ -692,6 +697,11 @@ func (in *VLInsert) DeepCopyInto(out *VLInsert) {
*out = new(v1beta1.EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(v1beta1.EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.SyslogSpec != nil {
in, out := &in.SyslogSpec, &out.SyslogSpec
*out = new(SyslogServerSpec)
@@ -753,6 +763,11 @@ func (in *VLSelect) DeepCopyInto(out *VLSelect) {
*out = new(v1beta1.EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(v1beta1.EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.UpdateStrategy != nil {
in, out := &in.UpdateStrategy, &out.UpdateStrategy
*out = new(appsv1.DeploymentStrategyType)
@@ -885,6 +900,11 @@ func (in *VLSingleSpec) DeepCopyInto(out *VLSingleSpec) {
*out = new(v1beta1.EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(v1beta1.EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLSingleSpec.
@@ -958,6 +978,11 @@ func (in *VLStorage) DeepCopyInto(out *VLStorage) {
*out = new(v1beta1.EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(v1beta1.EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.Storage != nil {
in, out := &in.Storage, &out.Storage
*out = new(v1beta1.StorageSpec)
@@ -1312,6 +1337,11 @@ func (in *VMAnomalySpec) DeepCopyInto(out *VMAnomalySpec) {
*out = new(v1beta1.EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(v1beta1.EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.ConfigSecret != nil {
in, out := &in.ConfigSecret, &out.ConfigSecret
*out = new(corev1.SecretKeySelector)
@@ -1601,6 +1631,11 @@ func (in *VTInsert) DeepCopyInto(out *VTInsert) {
*out = new(v1beta1.EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(v1beta1.EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.UpdateStrategy != nil {
in, out := &in.UpdateStrategy, &out.UpdateStrategy
*out = new(appsv1.DeploymentStrategyType)
@@ -1657,6 +1692,11 @@ func (in *VTSelect) DeepCopyInto(out *VTSelect) {
*out = new(v1beta1.EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(v1beta1.EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.UpdateStrategy != nil {
in, out := &in.UpdateStrategy, &out.UpdateStrategy
*out = new(appsv1.DeploymentStrategyType)
@@ -1779,6 +1819,11 @@ func (in *VTSingleSpec) DeepCopyInto(out *VTSingleSpec) {
*out = new(v1beta1.EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(v1beta1.EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VTSingleSpec.
@@ -1852,6 +1897,11 @@ func (in *VTStorage) DeepCopyInto(out *VTStorage) {
*out = new(v1beta1.EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(v1beta1.EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.Storage != nil {
in, out := &in.Storage, &out.Storage
*out = new(v1beta1.StorageSpec)
diff --git a/api/operator/v1beta1/vmagent_types.go b/api/operator/v1beta1/vmagent_types.go
index 28c36ba0a..83deaa8a2 100644
--- a/api/operator/v1beta1/vmagent_types.go
+++ b/api/operator/v1beta1/vmagent_types.go
@@ -79,6 +79,9 @@ type VMAgentSpec struct {
// PodDisruptionBudget created by operator
// +optional
PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// DaemonSetMode enables DaemonSet deployment mode instead of Deployment.
// Supports only VMPodScrape
// Cannot be used with statefulMode
diff --git a/api/operator/v1beta1/vmalert_types.go b/api/operator/v1beta1/vmalert_types.go
index dc7beb661..5eb14ae55 100644
--- a/api/operator/v1beta1/vmalert_types.go
+++ b/api/operator/v1beta1/vmalert_types.go
@@ -138,6 +138,9 @@ type VMAlertSpec struct {
// Configures vertical pod autoscaling.
// +optional
VPA *EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// License allows to configure license key to be used for enterprise features.
// Using license key is supported starting from VictoriaMetrics v1.94.0.
// See [here](https://docs.victoriametrics.com/victoriametrics/enterprise/)
diff --git a/api/operator/v1beta1/vmalertmanager_types.go b/api/operator/v1beta1/vmalertmanager_types.go
index 383cfb338..73e12f3c1 100644
--- a/api/operator/v1beta1/vmalertmanager_types.go
+++ b/api/operator/v1beta1/vmalertmanager_types.go
@@ -139,6 +139,9 @@ type VMAlertmanagerSpec struct {
// PodDisruptionBudget created by operator
// +optional
PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// SelectAllByDefault changes default behavior for empty CRD selectors, such ConfigSelector.
// with selectAllByDefault: true and undefined ConfigSelector and ConfigNamespaceSelector
// Operator selects all exist alertManagerConfigs
diff --git a/api/operator/v1beta1/vmauth_types.go b/api/operator/v1beta1/vmauth_types.go
index 152e306ea..e361e4d94 100644
--- a/api/operator/v1beta1/vmauth_types.go
+++ b/api/operator/v1beta1/vmauth_types.go
@@ -75,6 +75,9 @@ type VMAuthSpec struct {
// PodDisruptionBudget created by operator
// +optional
PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty" yaml:"podDisruptionBudget,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *EmbeddedNetworkPolicy `json:"networkPolicy,omitempty" yaml:"networkPolicy,omitempty"`
// Ingress enables ingress configuration for VMAuth.
Ingress *EmbeddedIngress `json:"ingress,omitempty"`
// HTTPRoute enables httproute configuration for VMAuth.
diff --git a/api/operator/v1beta1/vmcluster_types.go b/api/operator/v1beta1/vmcluster_types.go
index 7453a0a07..42b6ec52d 100644
--- a/api/operator/v1beta1/vmcluster_types.go
+++ b/api/operator/v1beta1/vmcluster_types.go
@@ -383,6 +383,9 @@ type VMSelect struct {
// Configures vertical pod autoscaling.
// +optional
VPA *EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// RollingUpdateStrategy defines strategy for application updates
// Default is OnDelete, in this case operator handles update process
@@ -466,6 +469,9 @@ type VMInsert struct {
// Configures vertical pod autoscaling.
// +optional
VPA *EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// Discovery overrides the cluster-level discovery config for vminsert.
// +optional
@@ -554,6 +560,9 @@ type VMStorage struct {
// PodDisruptionBudget created by operator
// +optional
PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// MaintenanceInsertNodeIDs - excludes given node ids from insert requests routing, must contain pod suffixes - for pod-0, id will be 0 and etc.
// lets say, you have pod-0, pod-1, pod-2, pod-3. to exclude pod-0 and pod-3 from insert routing, define nodeIDs: [0,3].
// Useful at storage expanding, when you want to rebalance some data at cluster.
@@ -1117,6 +1126,9 @@ type VMAuthLoadBalancerSpec struct {
// PodDisruptionBudget created by operator
// +optional
PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
// UpdateStrategy - overrides default update strategy.
// +kubebuilder:validation:Enum=Recreate;RollingUpdate
diff --git a/api/operator/v1beta1/vmextra_types.go b/api/operator/v1beta1/vmextra_types.go
index d746ed488..3653a4fa4 100644
--- a/api/operator/v1beta1/vmextra_types.go
+++ b/api/operator/v1beta1/vmextra_types.go
@@ -18,6 +18,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/util/intstr"
@@ -535,6 +536,17 @@ func (cr *EmbeddedVPA) Validate() error {
return nil
}
+// EmbeddedNetworkPolicy defines configuration for a NetworkPolicy protecting pods owned by the CR.
+type EmbeddedNetworkPolicy struct {
+ // Ingress defines the list of ingress rules applied to pods selected by this CR.
+ // Each rule allows traffic which matches both the from and ports sections.
+ // +optional
+ Ingress []networkingv1.NetworkPolicyIngressRule `json:"ingress,omitempty"`
+ // Egress defines the list of egress rules applied to pods selected by this CR.
+ // +optional
+ Egress []networkingv1.NetworkPolicyEgressRule `json:"egress,omitempty"`
+}
+
// DiscoverySelector can be used at CRD components discovery
type DiscoverySelector struct {
Namespace *NamespaceSelector `json:"namespaceSelector,omitempty"`
diff --git a/api/operator/v1beta1/vmsingle_types.go b/api/operator/v1beta1/vmsingle_types.go
index a3b219eab..85b3373ab 100644
--- a/api/operator/v1beta1/vmsingle_types.go
+++ b/api/operator/v1beta1/vmsingle_types.go
@@ -110,6 +110,9 @@ type VMSingleSpec struct {
// +optional
VPA *EmbeddedVPA `json:"vpa,omitempty"`
+ // NetworkPolicy defines network access rules for pods created by this CR.
+ // +optional
+ NetworkPolicy *EmbeddedNetworkPolicy `json:"networkPolicy,omitempty"`
CommonRelabelParams `json:",inline,omitempty"`
CommonScrapeParams `json:",inline,omitempty"`
CommonConfigReloaderParams `json:",inline,omitempty"`
diff --git a/api/operator/v1beta1/zz_generated.deepcopy.go b/api/operator/v1beta1/zz_generated.deepcopy.go
index bab53d6f6..4413cabf8 100644
--- a/api/operator/v1beta1/zz_generated.deepcopy.go
+++ b/api/operator/v1beta1/zz_generated.deepcopy.go
@@ -1425,6 +1425,35 @@ func (in *EmbeddedIngress) DeepCopy() *EmbeddedIngress {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *EmbeddedNetworkPolicy) DeepCopyInto(out *EmbeddedNetworkPolicy) {
+ *out = *in
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]networkingv1.NetworkPolicyIngressRule, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Egress != nil {
+ in, out := &in.Egress, &out.Egress
+ *out = make([]networkingv1.NetworkPolicyEgressRule, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddedNetworkPolicy.
+func (in *EmbeddedNetworkPolicy) DeepCopy() *EmbeddedNetworkPolicy {
+ if in == nil {
+ return nil
+ }
+ out := new(EmbeddedNetworkPolicy)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EmbeddedObjectMetadata) DeepCopyInto(out *EmbeddedObjectMetadata) {
*out = *in
@@ -4866,6 +4895,11 @@ func (in *VMAgentSpec) DeepCopyInto(out *VMAgentSpec) {
*out = new(EmbeddedPodDisruptionBudgetSpec)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.DaemonSetUpdateStrategy != nil {
in, out := &in.DaemonSetUpdateStrategy, &out.DaemonSetUpdateStrategy
*out = new(appsv1.DaemonSetUpdateStrategyType)
@@ -5196,6 +5230,11 @@ func (in *VMAlertSpec) DeepCopyInto(out *VMAlertSpec) {
*out = new(EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.License != nil {
in, out := &in.License, &out.License
*out = new(License)
@@ -5506,6 +5545,11 @@ func (in *VMAlertmanagerSpec) DeepCopyInto(out *VMAlertmanagerSpec) {
*out = new(EmbeddedPodDisruptionBudgetSpec)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.ConfigSelector != nil {
in, out := &in.ConfigSelector, &out.ConfigSelector
*out = new(metav1.LabelSelector)
@@ -5741,6 +5785,11 @@ func (in *VMAuthLoadBalancerSpec) DeepCopyInto(out *VMAuthLoadBalancerSpec) {
*out = new(EmbeddedPodDisruptionBudgetSpec)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.UpdateStrategy != nil {
in, out := &in.UpdateStrategy, &out.UpdateStrategy
*out = new(appsv1.DeploymentStrategyType)
@@ -5813,6 +5862,11 @@ func (in *VMAuthSpec) DeepCopyInto(out *VMAuthSpec) {
*out = new(EmbeddedPodDisruptionBudgetSpec)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.Ingress != nil {
in, out := &in.Ingress, &out.Ingress
*out = new(EmbeddedIngress)
@@ -6250,6 +6304,11 @@ func (in *VMInsert) DeepCopyInto(out *VMInsert) {
*out = new(EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.Discovery != nil {
in, out := &in.Discovery, &out.Discovery
*out = new(VMClusterDiscovery)
@@ -7136,6 +7195,11 @@ func (in *VMSelect) DeepCopyInto(out *VMSelect) {
*out = new(EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.RollingUpdateStrategyBehavior != nil {
in, out := &in.RollingUpdateStrategyBehavior, &out.RollingUpdateStrategyBehavior
*out = new(StatefulSetUpdateStrategyBehavior)
@@ -7397,6 +7461,11 @@ func (in *VMSingleSpec) DeepCopyInto(out *VMSingleSpec) {
*out = new(EmbeddedVPA)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
in.CommonRelabelParams.DeepCopyInto(&out.CommonRelabelParams)
in.CommonScrapeParams.DeepCopyInto(&out.CommonScrapeParams)
in.CommonConfigReloaderParams.DeepCopyInto(&out.CommonConfigReloaderParams)
@@ -7581,6 +7650,11 @@ func (in *VMStorage) DeepCopyInto(out *VMStorage) {
*out = new(EmbeddedPodDisruptionBudgetSpec)
(*in).DeepCopyInto(*out)
}
+ if in.NetworkPolicy != nil {
+ in, out := &in.NetworkPolicy, &out.NetworkPolicy
+ *out = new(EmbeddedNetworkPolicy)
+ (*in).DeepCopyInto(*out)
+ }
if in.MaintenanceInsertNodeIDs != nil {
in, out := &in.MaintenanceInsertNodeIDs, &out.MaintenanceInsertNodeIDs
*out = make([]int32, len(*in))
diff --git a/config/crd/overlay/crd.descriptionless.yaml b/config/crd/overlay/crd.descriptionless.yaml
index d79b23945..93df04a37 100644
--- a/config/crd/overlay/crd.descriptionless.yaml
+++ b/config/crd/overlay/crd.descriptionless.yaml
@@ -444,6 +444,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -1601,6 +1786,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -2218,6 +2588,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -3111,6 +3666,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -3889,6 +4629,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -5583,6 +6508,191 @@ spec:
type: integer
minScrapeInterval:
type: string
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeScrapeNamespaceSelector:
properties:
matchExpressions:
@@ -11038,6 +12148,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -12201,6 +13496,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -13678,6 +15158,191 @@ spec:
- url
type: object
type: object
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -15677,6 +17342,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -16849,6 +18699,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -17399,6 +19434,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -18473,6 +20693,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -22186,6 +24591,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -43700,6 +46290,191 @@ spec:
type: integer
minScrapeInterval:
type: string
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeScrapeNamespaceSelector:
properties:
matchExpressions:
@@ -46791,6 +49566,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -47355,6 +50315,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -48250,6 +51395,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -48914,6 +52244,191 @@ spec:
minReadySeconds:
format: int32
type: integer
+ networkPolicy:
+ properties:
+ egress:
+ items:
+ properties:
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ items:
+ properties:
+ from:
+ items:
+ properties:
+ ipBlock:
+ properties:
+ cidr:
+ type: string
+ except:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ properties:
+ matchExpressions:
+ items:
+ properties:
+ key:
+ type: string
+ operator:
+ type: string
+ values:
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ items:
+ properties:
+ endPort:
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ protocol:
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
diff --git a/config/crd/overlay/crd.yaml b/config/crd/overlay/crd.yaml
index 665aefa6f..459fd154f 100644
--- a/config/crd/overlay/crd.yaml
+++ b/config/crd/overlay/crd.yaml
@@ -921,6 +921,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods created
+ by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied to
+ pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -3201,6 +3588,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods
+ created by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied
+ to pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -4404,6 +5178,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods
+ created by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied
+ to pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -6108,6 +7269,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods
+ created by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied
+ to pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -7543,6 +9091,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods created
+ by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied to
+ pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -10913,6 +12848,393 @@ spec:
MinScrapeInterval allows limiting minimal scrape interval for VMServiceScrape, VMPodScrape and other scrapes
If interval is lower than defined limit, `minScrapeInterval` will be used.
type: string
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods created
+ by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied to
+ pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeScrapeNamespaceSelector:
description: |-
NodeScrapeNamespaceSelector defines Namespaces to be selected for VMNodeScrape discovery.
@@ -21352,6 +23674,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods created
+ by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied to
+ pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -23651,6 +26360,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods created
+ by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied to
+ pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -26532,6 +29628,393 @@ spec:
- url
type: object
type: object
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods created
+ by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied to
+ pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -30445,6 +33928,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods created
+ by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied to
+ pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -32651,6 +36521,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods
+ created by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied
+ to pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -33732,6 +37989,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods
+ created by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied
+ to pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -35893,6 +40537,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods
+ created by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied
+ to pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -43512,6 +48543,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for
+ pods created by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied
+ to pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port
+ to allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list
+ of label selector requirements. The
+ requirements are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key
+ that the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list
+ of label selector requirements. The
+ requirements are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key
+ that the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list
+ of label selector requirements. The
+ requirements are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key
+ that the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list
+ of label selector requirements. The
+ requirements are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key
+ that the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port
+ to allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -86890,6 +92308,393 @@ spec:
MinScrapeInterval allows limiting minimal scrape interval for VMServiceScrape, VMPodScrape and other scrapes
If interval is lower than defined limit, `minScrapeInterval` will be used.
type: string
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods created
+ by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied to
+ pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeScrapeNamespaceSelector:
description: |-
NodeScrapeNamespaceSelector defines Namespaces to be selected for VMNodeScrape discovery.
@@ -92744,6 +98549,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods
+ created by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied
+ to pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -93841,6 +100033,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods
+ created by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied
+ to pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -95552,6 +102131,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods
+ created by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied
+ to pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of
+ label selector requirements. The requirements
+ are ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to
+ allow traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
@@ -96817,6 +103783,393 @@ spec:
Has no effect for VLogs and VMSingle
format: int32
type: integer
+ networkPolicy:
+ description: NetworkPolicy defines network access rules for pods created
+ by this CR.
+ properties:
+ egress:
+ description: Egress defines the list of egress rules applied to
+ pods selected by this CR.
+ items:
+ description: |-
+ NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
+ This type is beta-level in 1.8
+ properties:
+ ports:
+ description: |-
+ ports is a list of destination ports for outgoing traffic.
+ Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ to:
+ description: |-
+ to is a list of destinations for outgoing traffic of pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all destinations (traffic not restricted by
+ destination). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the to list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ ingress:
+ description: |-
+ Ingress defines the list of ingress rules applied to pods selected by this CR.
+ Each rule allows traffic which matches both the from and ports sections.
+ items:
+ description: |-
+ NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+ matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+ properties:
+ from:
+ description: |-
+ from is a list of sources which should be able to access the pods selected for this rule.
+ Items in this list are combined using a logical OR operation. If this field is
+ empty or missing, this rule matches all sources (traffic not restricted by
+ source). If this field is present and contains at least one item, this rule
+ allows traffic only if the traffic matches at least one item in the from list.
+ items:
+ description: |-
+ NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of
+ fields are allowed
+ properties:
+ ipBlock:
+ description: |-
+ ipBlock defines policy on a particular IPBlock. If this field is set then
+ neither of the other fields can be.
+ properties:
+ cidr:
+ description: |-
+ cidr is a string representing the IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ type: string
+ except:
+ description: |-
+ except is a slice of CIDRs that should not be included within an IPBlock
+ Valid examples are "192.168.1.0/24" or "2001:db8::/64"
+ Except values will be rejected if they are outside the cidr range
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - cidr
+ type: object
+ namespaceSelector:
+ description: |-
+ namespaceSelector selects namespaces using cluster-scoped labels. This field follows
+ standard label selector semantics; if present but empty, it selects all namespaces.
+
+ If podSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the namespaces selected by namespaceSelector.
+ Otherwise it selects all pods in the namespaces selected by namespaceSelector.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podSelector:
+ description: |-
+ podSelector is a label selector which selects pods. This field follows standard label
+ selector semantics; if present but empty, it selects all pods.
+
+ If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
+ the pods matching podSelector in the Namespaces selected by NamespaceSelector.
+ Otherwise it selects the pods matching podSelector in the policy's own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ ports:
+ description: |-
+ ports is a list of ports which should be made accessible on the pods selected for
+ this rule. Each item in this list is combined using a logical OR. If this field is
+ empty or missing, this rule matches all ports (traffic not restricted by port).
+ If this field is present and contains at least one item, then this rule allows
+ traffic only if the traffic matches at least one port in the list.
+ items:
+ description: NetworkPolicyPort describes a port to allow
+ traffic on
+ properties:
+ endPort:
+ description: |-
+ endPort indicates that the range of ports from port to endPort if set, inclusive,
+ should be allowed by the policy. This field cannot be defined if the port field
+ is not defined or if the port field is defined as a named (string) port.
+ The endPort must be equal or greater than port.
+ format: int32
+ type: integer
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ port represents the port on the given protocol. This can either be a numerical or named
+ port on a pod. If this field is not provided, this matches all port names and
+ numbers.
+ If present, only traffic on the specified protocol AND port will be matched.
+ x-kubernetes-int-or-string: true
+ protocol:
+ description: |-
+ protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
+ If not specified, this field defaults to TCP.
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ type: object
+ type: array
+ type: object
nodeSelector:
additionalProperties:
type: string
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index e9eb3c6b2..e83316bd3 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -15,6 +15,7 @@ aliases:
* Dependency: [vmoperator](https://docs.victoriametrics.com/operator/): Updated default versions for VL apps to [v1.52.0](https://github.com/VictoriaMetrics/VictoriaLogs/releases/tag/v1.52.0).
+* FEATURE: [vmoperator](https://docs.victoriametrics.com/operator/): add `networkPolicy` field to all supported CRDs (`VMSingle`, `VMAgent`, `VMAlert`, `VMAlertmanager`, `VMAuth`, `VLSingle`, `VLAgent`, `VTSingle`, `VMAnomaly`, and all cluster sub-components). When set, the operator creates and manages a `NetworkPolicy` resource that restricts ingress/egress to the component's pods. See [#2977](https://github.com/VictoriaMetrics/helm-charts/issues/2977).
* FEATURE: [vlagent](https://docs.victoriametrics.com/operator/resources/vlagent/): add `basicAuth` field support to `remoteWrite` entries. See [#2371](https://github.com/VictoriaMetrics/operator/issues/2371).
* FEATURE: [vmuser](https://docs.victoriametrics.com/operator/resources/vmuser/): add `defaultVMAccessClaim` field to `spec.jwt`, mapped to vmauth's `jwt.default_vm_access_claim`. It lets a `VMUser` accept JWTs that don't carry a `vm_access` claim, matching `vmauth` v1.147.0+ behavior. See [#2375](https://github.com/VictoriaMetrics/operator/issues/2375).
diff --git a/docs/api.md b/docs/api.md
index 3772202ce..1b3a0cf79 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -234,6 +234,7 @@ Appears in: [VLAgent](#vlagent)
| logLevel#
_string_ | _(Optional)_
LogLevel for VLAgent to be configured with.
INFO, WARN, ERROR, FATAL, PANIC |
| managedMetadata#
_[ManagedObjectsMetadata](#managedobjectsmetadata)_ | _(Required)_
ManagedMetadata defines metadata that will be added to the all objects
created by operator for the given CustomResource |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| persistentVolumeClaimRetentionPolicy#
_[StatefulSetPersistentVolumeClaimRetentionPolicy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#statefulsetpersistentvolumeclaimretentionpolicy-v1-apps)_ | _(Optional)_
PersistentVolumeClaimRetentionPolicy allows configuration of PVC retention policy |
@@ -335,6 +336,7 @@ Appears in: [VLClusterSpec](#vlclusterspec)
| logFormat#
_string_ | _(Optional)_
LogFormat for VLSelect to be configured with.
default or json |
| logLevel#
_string_ | _(Optional)_
LogLevel for VLSelect to be configured with. |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| podDisruptionBudget#
_[EmbeddedPodDisruptionBudgetSpec](#embeddedpoddisruptionbudgetspec)_ | _(Optional)_
PodDisruptionBudget created by operator |
@@ -398,6 +400,7 @@ Appears in: [VLClusterSpec](#vlclusterspec)
| logFormat#
_string_ | _(Optional)_
LogFormat for VLSelect to be configured with.
default or json |
| logLevel#
_string_ | _(Optional)_
LogLevel for VLSelect to be configured with. |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| podDisruptionBudget#
_[EmbeddedPodDisruptionBudgetSpec](#embeddedpoddisruptionbudgetspec)_ | _(Optional)_
PodDisruptionBudget created by operator |
@@ -475,6 +478,7 @@ Appears in: [VLSingle](#vlsingle)
| logNewStreams#
_boolean_ | _(Required)_
LogNewStreams Whether to log creation of new streams; this can be useful for debugging of high cardinality issues with log streams; see https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields |
| managedMetadata#
_[ManagedObjectsMetadata](#managedobjectsmetadata)_ | _(Required)_
ManagedMetadata defines metadata that will be added to the all objects
created by operator for the given CustomResource |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| podMetadata#
_[EmbeddedObjectMetadata](#embeddedobjectmetadata)_ | _(Optional)_
PodMetadata configures Labels and Annotations which are propagated to the VLSingle pods. |
@@ -547,6 +551,7 @@ Appears in: [VLClusterSpec](#vlclusterspec)
| maintenanceInsertNodeIDs#
_integer array_ | _(Optional)_
MaintenanceInsertNodeIDs - excludes given node ids from insert requests routing, must contain pod suffixes - for pod-0, id will be 0 and etc.
lets say, you have pod-0, pod-1, pod-2, pod-3. to exclude pod-0 and pod-3 from insert routing, define nodeIDs: [0,3].
Useful at storage expanding, when you want to rebalance some data at cluster. |
| maintenanceSelectNodeIDs#
_integer array_ | _(Optional)_
MaintenanceSelectNodeIDs - excludes given node ids from select requests routing, must contain pod suffixes - for pod-0, id will be 0 and etc. |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| persistentVolumeClaimRetentionPolicy#
_[StatefulSetPersistentVolumeClaimRetentionPolicy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#statefulsetpersistentvolumeclaimretentionpolicy-v1-apps)_ | _(Optional)_
PersistentVolumeClaimRetentionPolicy allows configuration of PVC retention policy |
@@ -750,6 +755,7 @@ Appears in: [VMAnomaly](#vmanomaly)
| managedMetadata#
_[ManagedObjectsMetadata](#managedobjectsmetadata)_ | _(Required)_
ManagedMetadata defines metadata that will be added to the all objects
created by operator for the given CustomResource |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
| monitoring#
_[VMAnomalyMonitoringSpec](#vmanomalymonitoringspec)_ | _(Required)_
Monitoring configures how expose anomaly metrics
See https://docs.victoriametrics.com/anomaly-detection/components/monitoring/ |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| persistentVolumeClaimRetentionPolicy#
_[StatefulSetPersistentVolumeClaimRetentionPolicy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#statefulsetpersistentvolumeclaimretentionpolicy-v1-apps)_ | _(Optional)_
PersistentVolumeClaimRetentionPolicy allows configuration of PVC retention policy |
@@ -880,6 +886,7 @@ Appears in: [VTClusterSpec](#vtclusterspec)
| logFormat#
_string_ | _(Optional)_
LogFormat for VTInsert to be configured with.
default or json |
| logLevel#
_string_ | _(Optional)_
LogLevel for VTInsert to be configured with. |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| podDisruptionBudget#
_[EmbeddedPodDisruptionBudgetSpec](#embeddedpoddisruptionbudgetspec)_ | _(Optional)_
PodDisruptionBudget created by operator |
@@ -942,6 +949,7 @@ Appears in: [VTClusterSpec](#vtclusterspec)
| logFormat#
_string_ | _(Optional)_
LogFormat for VTSelect to be configured with.
default or json |
| logLevel#
_string_ | _(Optional)_
LogLevel for VTSelect to be configured with. |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| podDisruptionBudget#
_[EmbeddedPodDisruptionBudgetSpec](#embeddedpoddisruptionbudgetspec)_ | _(Optional)_
PodDisruptionBudget created by operator |
@@ -1018,6 +1026,7 @@ Appears in: [VTSingle](#vtsingle)
| logNewStreams#
_boolean_ | _(Required)_
LogNewStreams Whether to log creation of new streams; this can be useful for debugging of high cardinality issues with log streams;
see https://docs.victoriametrics.com/victoriatraces/#configure-victoriatraces |
| managedMetadata#
_[ManagedObjectsMetadata](#managedobjectsmetadata)_ | _(Required)_
ManagedMetadata defines metadata that will be added to the all objects
created by operator for the given CustomResource |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| podMetadata#
_[EmbeddedObjectMetadata](#embeddedobjectmetadata)_ | _(Optional)_
PodMetadata configures Labels and Annotations which are propagated to the VTSingle pods. |
@@ -1089,6 +1098,7 @@ Appears in: [VTClusterSpec](#vtclusterspec)
| maintenanceInsertNodeIDs#
_integer array_ | _(Optional)_
MaintenanceInsertNodeIDs - excludes given node ids from insert requests routing, must contain pod suffixes - for pod-0, id will be 0 and etc.
lets say, you have pod-0, pod-1, pod-2, pod-3. to exclude pod-0 and pod-3 from insert routing, define nodeIDs: [0,3].
Useful at storage expanding, when you want to rebalance some data at cluster. |
| maintenanceSelectNodeIDs#
_integer array_ | _(Optional)_
MaintenanceSelectNodeIDs - excludes given node ids from select requests routing, must contain pod suffixes - for pod-0, id will be 0 and etc. |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| persistentVolumeClaimRetentionPolicy#
_[StatefulSetPersistentVolumeClaimRetentionPolicy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#statefulsetpersistentvolumeclaimretentionpolicy-v1-apps)_ | _(Optional)_
PersistentVolumeClaimRetentionPolicy allows configuration of PVC retention policy |
@@ -2005,6 +2015,17 @@ Appears in: [VMAuthSpec](#vmauthspec)
| tlsHosts#
_string array_ | _(Required)_
TlsHosts configures TLS access for ingress, tlsSecretName must be defined for it. |
| tlsSecretName#
_string_ | _(Optional)_
TlsSecretName defines secretname at the VMAuth namespace with cert and key
https://kubernetes.io/docs/concepts/services-networking/ingress/#tls |
+#### EmbeddedNetworkPolicy
+
+EmbeddedNetworkPolicy defines configuration for a NetworkPolicy protecting pods owned by the CR.
+
+Appears in: [VLAgentSpec](#vlagentspec), [VLInsert](#vlinsert), [VLSelect](#vlselect), [VLSingleSpec](#vlsinglespec), [VLStorage](#vlstorage), [VMAgentSpec](#vmagentspec), [VMAlertSpec](#vmalertspec), [VMAlertmanagerSpec](#vmalertmanagerspec), [VMAnomalySpec](#vmanomalyspec), [VMAuthLoadBalancerSpec](#vmauthloadbalancerspec), [VMAuthSpec](#vmauthspec), [VMInsert](#vminsert), [VMSelect](#vmselect), [VMSingleSpec](#vmsinglespec), [VMStorage](#vmstorage), [VTInsert](#vtinsert), [VTSelect](#vtselect), [VTSingleSpec](#vtsinglespec), [VTStorage](#vtstorage)
+
+| Field | Description |
+| --- | --- |
+| egress#
_[NetworkPolicyEgressRule](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#networkpolicyegressrule-v1-networking) array_ | _(Optional)_
Egress defines the list of egress rules applied to pods selected by this CR. |
+| ingress#
_[NetworkPolicyIngressRule](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#networkpolicyingressrule-v1-networking) array_ | _(Optional)_
Ingress defines the list of ingress rules applied to pods selected by this CR.
Each rule allows traffic which matches both the from and ports sections. |
+
#### EmbeddedObjectMetadata
EmbeddedObjectMetadata contains a subset of the fields included in k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta
@@ -3760,6 +3781,7 @@ Appears in: [VMAgent](#vmagent)
| maxScrapeInterval#
_string_ | _(Required)_
MaxScrapeInterval allows limiting maximum scrape interval for VMServiceScrape, VMPodScrape and other scrapes
If interval is higher than defined limit, `maxScrapeInterval` will be used. |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
| minScrapeInterval#
_string_ | _(Required)_
MinScrapeInterval allows limiting minimal scrape interval for VMServiceScrape, VMPodScrape and other scrapes
If interval is lower than defined limit, `minScrapeInterval` will be used. |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeScrapeNamespaceSelector#
_[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#labelselector-v1-meta)_ | _(Optional)_
NodeScrapeNamespaceSelector defines Namespaces to be selected for VMNodeScrape discovery.
Works in combination with Selector.
NamespaceSelector nil - only objects at VMAgent or VMSingle namespace.
Selector nil - only objects at NamespaceSelector namespaces.
If both nil - behaviour controlled by selectAllByDefault |
| nodeScrapeRelabelTemplate#
_[RelabelConfig](#relabelconfig) array_ | _(Optional)_
NodeScrapeRelabelTemplate defines relabel config, that will be added to each VMNodeScrape.
it's useful for adding specific labels to all targets |
| nodeScrapeSelector#
_[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#labelselector-v1-meta)_ | _(Optional)_
NodeScrapeSelector defines VMNodeScrape to be selected for scraping.
Works in combination with NamespaceSelector.
NamespaceSelector nil - only objects at VMAgent or VMSingle namespace.
Selector nil - only objects at NamespaceSelector namespaces.
If both nil - behaviour controlled by selectAllByDefault |
@@ -3943,6 +3965,7 @@ Appears in: [VMAlert](#vmalert)
| logLevel#
_string_ | _(Optional)_
LogLevel for VMAlert to be configured with. |
| managedMetadata#
_[ManagedObjectsMetadata](#managedobjectsmetadata)_ | _(Required)_
ManagedMetadata defines metadata that will be added to the all objects
created by operator for the given CustomResource |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| notifier#
_[VMAlertNotifierSpec](#vmalertnotifierspec)_ | _(Optional)_
Notifier prometheus alertmanager endpoint spec. Required at least one of notifier or notifiers when there are alerting rules. e.g. http://127.0.0.1:9093
If specified both notifier and notifiers, notifier will be added as last element to notifiers.
only one of notifier options could be chosen: notifierConfigRef or notifiers + notifier |
| notifierConfigRef#
_[SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#secretkeyselector-v1-core)_ | _(Optional)_
NotifierConfigRef reference for secret with notifier configuration for vmalert
only one of notifier options could be chosen: notifierConfigRef or notifiers + notifier |
@@ -4096,6 +4119,7 @@ Appears in: [VMAlertmanager](#vmalertmanager)
| logLevel#
_string_ | _(Optional)_
Log level for VMAlertmanager to be configured with. |
| managedMetadata#
_[ManagedObjectsMetadata](#managedobjectsmetadata)_ | _(Required)_
ManagedMetadata defines metadata that will be added to the all objects
created by operator for the given CustomResource |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| persistentVolumeClaimRetentionPolicy#
_[StatefulSetPersistentVolumeClaimRetentionPolicy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#statefulsetpersistentvolumeclaimretentionpolicy-v1-apps)_ | _(Optional)_
PersistentVolumeClaimRetentionPolicy allows configuration of PVC retention policy |
@@ -4224,6 +4248,7 @@ Appears in: [VMAuthLoadBalancer](#vmauthloadbalancer)
| logFormat#
_string_ | _(Optional)_
LogFormat for vmauth
default or json |
| logLevel#
_string_ | _(Optional)_
LogLevel for vmauth container. |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| podDisruptionBudget#
_[EmbeddedPodDisruptionBudgetSpec](#embeddedpoddisruptionbudgetspec)_ | _(Optional)_
PodDisruptionBudget created by operator |
@@ -4307,6 +4332,7 @@ Appears in: [VMAuth](#vmauth), [VMDistributedAuth](#vmdistributedauth)
| managedMetadata#
_[ManagedObjectsMetadata](#managedobjectsmetadata)_ | _(Required)_
ManagedMetadata defines metadata that will be added to the all objects
created by operator for the given CustomResource |
| max_concurrent_requests#
_integer_ | _(Optional)_
MaxConcurrentRequests defines max concurrent requests per user
300 is default value for vmauth |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| podDisruptionBudget#
_[EmbeddedPodDisruptionBudgetSpec](#embeddedpoddisruptionbudgetspec)_ | _(Optional)_
PodDisruptionBudget created by operator |
@@ -4486,6 +4512,7 @@ Appears in: [VMClusterSpec](#vmclusterspec)
| logFormat#
_string_ | _(Optional)_
LogFormat for VMInsert to be configured with.
default or json |
| logLevel#
_string_ | _(Optional)_
LogLevel for VMInsert to be configured with. |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| podDisruptionBudget#
_[EmbeddedPodDisruptionBudgetSpec](#embeddedpoddisruptionbudgetspec)_ | _(Optional)_
PodDisruptionBudget created by operator |
@@ -4854,6 +4881,7 @@ Appears in: [VMClusterSpec](#vmclusterspec)
| logFormat#
_string_ | _(Optional)_
LogFormat for VMSelect to be configured with.
default or json |
| logLevel#
_string_ | _(Optional)_
LogLevel for VMSelect to be configured with. |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| persistentVolumeClaimRetentionPolicy#
_[StatefulSetPersistentVolumeClaimRetentionPolicy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#statefulsetpersistentvolumeclaimretentionpolicy-v1-apps)_ | _(Optional)_
PersistentVolumeClaimRetentionPolicy allows configuration of PVC retention policy |
@@ -4985,6 +5013,7 @@ Appears in: [VMDistributedZoneSingle](#vmdistributedzonesingle), [VMSingle](#vms
| maxScrapeInterval#
_string_ | _(Required)_
MaxScrapeInterval allows limiting maximum scrape interval for VMServiceScrape, VMPodScrape and other scrapes
If interval is higher than defined limit, `maxScrapeInterval` will be used. |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
| minScrapeInterval#
_string_ | _(Required)_
MinScrapeInterval allows limiting minimal scrape interval for VMServiceScrape, VMPodScrape and other scrapes
If interval is lower than defined limit, `minScrapeInterval` will be used. |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeScrapeNamespaceSelector#
_[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#labelselector-v1-meta)_ | _(Optional)_
NodeScrapeNamespaceSelector defines Namespaces to be selected for VMNodeScrape discovery.
Works in combination with Selector.
NamespaceSelector nil - only objects at VMAgent or VMSingle namespace.
Selector nil - only objects at NamespaceSelector namespaces.
If both nil - behaviour controlled by selectAllByDefault |
| nodeScrapeRelabelTemplate#
_[RelabelConfig](#relabelconfig) array_ | _(Optional)_
NodeScrapeRelabelTemplate defines relabel config, that will be added to each VMNodeScrape.
it's useful for adding specific labels to all targets |
| nodeScrapeSelector#
_[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#labelselector-v1-meta)_ | _(Optional)_
NodeScrapeSelector defines VMNodeScrape to be selected for scraping.
Works in combination with NamespaceSelector.
NamespaceSelector nil - only objects at VMAgent or VMSingle namespace.
Selector nil - only objects at NamespaceSelector namespaces.
If both nil - behaviour controlled by selectAllByDefault |
@@ -5107,6 +5136,7 @@ Appears in: [VMClusterSpec](#vmclusterspec)
| maintenanceInsertNodeIDs#
_integer array_ | _(Optional)_
MaintenanceInsertNodeIDs - excludes given node ids from insert requests routing, must contain pod suffixes - for pod-0, id will be 0 and etc.
lets say, you have pod-0, pod-1, pod-2, pod-3. to exclude pod-0 and pod-3 from insert routing, define nodeIDs: [0,3].
Useful at storage expanding, when you want to rebalance some data at cluster. |
| maintenanceSelectNodeIDs#
_integer array_ | _(Optional)_
MaintenanceSelectNodeIDs - excludes given node ids from select requests routing, must contain pod suffixes - for pod-0, id will be 0 and etc. |
| minReadySeconds#
_integer_ | _(Optional)_
MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
if previous in healthy state
Has no effect for VLogs and VMSingle |
+| networkPolicy#
_[EmbeddedNetworkPolicy](#embeddednetworkpolicy)_ | _(Optional)_
NetworkPolicy defines network access rules for pods created by this CR. |
| nodeSelector#
_object (keys:string, values:string)_ | _(Optional)_
NodeSelector Define which Nodes the Pods are scheduled on. |
| paused#
_boolean_ | _(Optional)_
Paused If set to true all actions on the underlying managed objects are not
going to be performed, except for delete actions. |
| persistentVolumeClaimRetentionPolicy#
_[StatefulSetPersistentVolumeClaimRetentionPolicy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#statefulsetpersistentvolumeclaimretentionpolicy-v1-apps)_ | _(Optional)_
PersistentVolumeClaimRetentionPolicy allows configuration of PVC retention policy |
diff --git a/internal/controller/operator/factory/build/networkpolicy.go b/internal/controller/operator/factory/build/networkpolicy.go
new file mode 100644
index 000000000..60bb0e72e
--- /dev/null
+++ b/internal/controller/operator/factory/build/networkpolicy.go
@@ -0,0 +1,37 @@
+package build
+
+import (
+ networkingv1 "k8s.io/api/networking/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1"
+)
+
+// NetworkPolicy creates a NetworkPolicy for the given CRD.
+// The PodSelector is set to the CR's selector labels so it covers all pods owned by the CR.
+// PolicyTypes are inferred from the presence of Ingress/Egress rules in spec.
+func NetworkPolicy(cr builderOpts, spec *vmv1beta1.EmbeddedNetworkPolicy) *networkingv1.NetworkPolicy {
+ np := &networkingv1.NetworkPolicy{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: cr.PrefixedName(),
+ Namespace: cr.GetNamespace(),
+ Annotations: cr.FinalAnnotations(),
+ Labels: cr.FinalLabels(),
+ OwnerReferences: []metav1.OwnerReference{cr.AsOwner()},
+ },
+ Spec: networkingv1.NetworkPolicySpec{
+ PodSelector: metav1.LabelSelector{
+ MatchLabels: cr.SelectorLabels(),
+ },
+ },
+ }
+ if len(spec.Ingress) > 0 {
+ np.Spec.PolicyTypes = append(np.Spec.PolicyTypes, networkingv1.PolicyTypeIngress)
+ np.Spec.Ingress = spec.Ingress
+ }
+ if len(spec.Egress) > 0 {
+ np.Spec.PolicyTypes = append(np.Spec.PolicyTypes, networkingv1.PolicyTypeEgress)
+ np.Spec.Egress = spec.Egress
+ }
+ return np
+}
diff --git a/internal/controller/operator/factory/build/networkpolicy_test.go b/internal/controller/operator/factory/build/networkpolicy_test.go
new file mode 100644
index 000000000..ef19f58c9
--- /dev/null
+++ b/internal/controller/operator/factory/build/networkpolicy_test.go
@@ -0,0 +1,89 @@
+package build
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+ networkingv1 "k8s.io/api/networking/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1"
+)
+
+func TestNetworkPolicy(t *testing.T) {
+ cr := &vmv1beta1.VMSingle{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "test",
+ Namespace: "default",
+ },
+ }
+
+ type opts struct {
+ spec *vmv1beta1.EmbeddedNetworkPolicy
+ validate func(np *networkingv1.NetworkPolicy)
+ }
+
+ f := func(o opts) {
+ t.Helper()
+ np := NetworkPolicy(cr, o.spec)
+ assert.Equal(t, "vmsingle-test", np.Name)
+ assert.Equal(t, "default", np.Namespace)
+ assert.Equal(t, cr.SelectorLabels(), np.Spec.PodSelector.MatchLabels)
+ o.validate(np)
+ }
+
+ // no rules — no policy types
+ f(opts{
+ spec: &vmv1beta1.EmbeddedNetworkPolicy{},
+ validate: func(np *networkingv1.NetworkPolicy) {
+ assert.Empty(t, np.Spec.PolicyTypes)
+ assert.Empty(t, np.Spec.Ingress)
+ assert.Empty(t, np.Spec.Egress)
+ },
+ })
+
+ // ingress only
+ f(opts{
+ spec: &vmv1beta1.EmbeddedNetworkPolicy{
+ Ingress: []networkingv1.NetworkPolicyIngressRule{
+ {Ports: []networkingv1.NetworkPolicyPort{{}}},
+ },
+ },
+ validate: func(np *networkingv1.NetworkPolicy) {
+ assert.Equal(t, []networkingv1.PolicyType{networkingv1.PolicyTypeIngress}, np.Spec.PolicyTypes)
+ assert.Len(t, np.Spec.Ingress, 1)
+ assert.Empty(t, np.Spec.Egress)
+ },
+ })
+
+ // egress only
+ f(opts{
+ spec: &vmv1beta1.EmbeddedNetworkPolicy{
+ Egress: []networkingv1.NetworkPolicyEgressRule{
+ {Ports: []networkingv1.NetworkPolicyPort{{}}},
+ },
+ },
+ validate: func(np *networkingv1.NetworkPolicy) {
+ assert.Equal(t, []networkingv1.PolicyType{networkingv1.PolicyTypeEgress}, np.Spec.PolicyTypes)
+ assert.Empty(t, np.Spec.Ingress)
+ assert.Len(t, np.Spec.Egress, 1)
+ },
+ })
+
+ // ingress and egress
+ f(opts{
+ spec: &vmv1beta1.EmbeddedNetworkPolicy{
+ Ingress: []networkingv1.NetworkPolicyIngressRule{
+ {Ports: []networkingv1.NetworkPolicyPort{{}}},
+ },
+ Egress: []networkingv1.NetworkPolicyEgressRule{
+ {Ports: []networkingv1.NetworkPolicyPort{{}}},
+ },
+ },
+ validate: func(np *networkingv1.NetworkPolicy) {
+ assert.Equal(t, []networkingv1.PolicyType{networkingv1.PolicyTypeIngress, networkingv1.PolicyTypeEgress}, np.Spec.PolicyTypes)
+ assert.Len(t, np.Spec.Ingress, 1)
+ assert.Len(t, np.Spec.Egress, 1)
+ },
+ })
+}
diff --git a/internal/controller/operator/factory/finalize/cluster.go b/internal/controller/operator/factory/finalize/cluster.go
index 1594af6e9..24d0c8af7 100644
--- a/internal/controller/operator/factory/finalize/cluster.go
+++ b/internal/controller/operator/factory/finalize/cluster.go
@@ -162,21 +162,23 @@ func OnClusterLoadBalancerDelete(ctx context.Context, rclient client.Client, cr
// ChildCleaner cleans dependent resources for cluster CRs excluding ones
// which are listed in cleaner maps
type ChildCleaner struct {
- pdbs sets.Set[string]
- hpas sets.Set[string]
- vpas sets.Set[string]
- services sets.Set[string]
- scrapes sets.Set[string]
+ pdbs sets.Set[string]
+ hpas sets.Set[string]
+ vpas sets.Set[string]
+ services sets.Set[string]
+ scrapes sets.Set[string]
+ networkPolicies sets.Set[string]
}
// NewChildCleaner initializes ChildCleaner
func NewChildCleaner() *ChildCleaner {
return &ChildCleaner{
- pdbs: sets.New[string](),
- hpas: sets.New[string](),
- vpas: sets.New[string](),
- services: sets.New[string](),
- scrapes: sets.New[string](),
+ pdbs: sets.New[string](),
+ hpas: sets.New[string](),
+ vpas: sets.New[string](),
+ services: sets.New[string](),
+ scrapes: sets.New[string](),
+ networkPolicies: sets.New[string](),
}
}
@@ -195,6 +197,11 @@ func (cc *ChildCleaner) KeepVPA(v string) {
cc.vpas.Insert(v)
}
+// KeepNetworkPolicy adds given NetworkPolicy's name to a map of resource names to be excluded from deletion
+func (cc *ChildCleaner) KeepNetworkPolicy(v string) {
+ cc.networkPolicies.Insert(v)
+}
+
// KeepService adds given HorizontalPodAutoscaler's name to a map of resource names to be excluded from deletion
func (cc *ChildCleaner) KeepService(v string) {
cc.services.Insert(v)
@@ -217,6 +224,9 @@ func (cc *ChildCleaner) RemoveOrphaned(ctx context.Context, rclient client.Clien
if err := RemoveOrphanedVPAs(ctx, rclient, b, cc.vpas, true); err != nil {
return fmt.Errorf("cannot remove orphaned VPAs: %w", err)
}
+ if err := RemoveOrphanedNetworkPolicies(ctx, rclient, b, cc.networkPolicies, true); err != nil {
+ return fmt.Errorf("cannot remove orphaned NetworkPolicies: %w", err)
+ }
if err := RemoveOrphanedVMServiceScrapes(ctx, rclient, b, cc.scrapes, true); err != nil {
return fmt.Errorf("cannot remove orphaned vmservicescrapes: %w", err)
}
diff --git a/internal/controller/operator/factory/finalize/orphaned.go b/internal/controller/operator/factory/finalize/orphaned.go
index d32c14030..6085a1924 100644
--- a/internal/controller/operator/factory/finalize/orphaned.go
+++ b/internal/controller/operator/factory/finalize/orphaned.go
@@ -88,6 +88,16 @@ func RemoveOrphanedVPAs(ctx context.Context, rclient client.Client, cr crObject,
return removeOrphaned(ctx, rclient, cr, gvk, keepNames, shouldRemove)
}
+// RemoveOrphanedNetworkPolicies removes NetworkPolicies detached from given object
+func RemoveOrphanedNetworkPolicies(ctx context.Context, rclient client.Client, cr crObject, keepNames sets.Set[string], shouldRemove bool) error {
+ gvk := schema.GroupVersionKind{
+ Group: "networking.k8s.io",
+ Version: "v1",
+ Kind: "NetworkPolicy",
+ }
+ return removeOrphaned(ctx, rclient, cr, gvk, keepNames, shouldRemove)
+}
+
// RemoveOrphanedVMServiceScrapes removes VMServiceScrapes detached from given object
func RemoveOrphanedVMServiceScrapes(ctx context.Context, rclient client.Client, cr crObject, keepNames sets.Set[string], shouldRemove bool) error {
if build.IsControllerDisabled("VMServiceScrape") {
diff --git a/internal/controller/operator/factory/reconcile/networkpolicy.go b/internal/controller/operator/factory/reconcile/networkpolicy.go
new file mode 100644
index 000000000..0b850bc70
--- /dev/null
+++ b/internal/controller/operator/factory/reconcile/networkpolicy.go
@@ -0,0 +1,51 @@
+package reconcile
+
+import (
+ "context"
+ "fmt"
+ "strings"
+
+ networkingv1 "k8s.io/api/networking/v1"
+ k8serrors "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
+ "sigs.k8s.io/controller-runtime/pkg/client"
+
+ "github.com/VictoriaMetrics/operator/internal/controller/operator/factory/logger"
+)
+
+// NetworkPolicy creates or updates a NetworkPolicy
+func NetworkPolicy(ctx context.Context, rclient client.Client, newObj, prevObj *networkingv1.NetworkPolicy, owner *metav1.OwnerReference) error {
+ nsn := types.NamespacedName{Name: newObj.Name, Namespace: newObj.Namespace}
+ var prevMeta *metav1.ObjectMeta
+ if prevObj != nil {
+ prevMeta = &prevObj.ObjectMeta
+ }
+ removeFinalizer := true
+ return retryOnConflict(func() error {
+ var existingObj networkingv1.NetworkPolicy
+ if err := rclient.Get(ctx, nsn, &existingObj); err != nil {
+ if k8serrors.IsNotFound(err) {
+ logger.WithContext(ctx).Info(fmt.Sprintf("creating new NetworkPolicy=%s", nsn.String()))
+ return rclient.Create(ctx, newObj)
+ }
+ return fmt.Errorf("cannot get existing NetworkPolicy=%s: %w", nsn.String(), err)
+ }
+ if err := collectGarbage(ctx, rclient, &existingObj, removeFinalizer); err != nil {
+ return err
+ }
+ metaChanged, err := mergeMeta(&existingObj, newObj, prevMeta, owner, removeFinalizer)
+ if err != nil {
+ return err
+ }
+ logMessageMetadata := []string{fmt.Sprintf("name=%s, is_prev_nil=%t", nsn.String(), prevObj == nil)}
+ specDiff := diffDeepDerivative(newObj.Spec, existingObj.Spec, "spec")
+ needsUpdate := metaChanged || len(specDiff) > 0
+ if !needsUpdate {
+ return nil
+ }
+ existingObj.Spec = newObj.Spec
+ logger.WithContext(ctx).Info(fmt.Sprintf("updating NetworkPolicy %s", strings.Join(logMessageMetadata, ", ")), "spec_diff", specDiff)
+ return rclient.Update(ctx, &existingObj)
+ })
+}
diff --git a/internal/controller/operator/factory/reconcile/networkpolicy_test.go b/internal/controller/operator/factory/reconcile/networkpolicy_test.go
new file mode 100644
index 000000000..24bb2ecfa
--- /dev/null
+++ b/internal/controller/operator/factory/reconcile/networkpolicy_test.go
@@ -0,0 +1,92 @@
+package reconcile
+
+import (
+ "context"
+ "testing"
+ "testing/synctest"
+
+ "github.com/stretchr/testify/assert"
+ networkingv1 "k8s.io/api/networking/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/types"
+
+ "github.com/VictoriaMetrics/operator/internal/controller/operator/factory/k8stools"
+)
+
+func TestNetworkPolicyReconcile(t *testing.T) {
+ type opts struct {
+ new, prev *networkingv1.NetworkPolicy
+ predefinedObjects []runtime.Object
+ actions []k8stools.ClientAction
+ }
+
+ getNP := func(fns ...func(np *networkingv1.NetworkPolicy)) *networkingv1.NetworkPolicy {
+ np := &networkingv1.NetworkPolicy{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "test-np",
+ Namespace: "default",
+ },
+ Spec: networkingv1.NetworkPolicySpec{
+ PodSelector: metav1.LabelSelector{
+ MatchLabels: map[string]string{"app": "test"},
+ },
+ PolicyTypes: []networkingv1.PolicyType{networkingv1.PolicyTypeIngress},
+ Ingress: []networkingv1.NetworkPolicyIngressRule{
+ {Ports: []networkingv1.NetworkPolicyPort{{}}},
+ },
+ },
+ }
+ for _, fn := range fns {
+ fn(np)
+ }
+ return np
+ }
+
+ f := func(o opts) {
+ t.Helper()
+ ctx := context.Background()
+ cl := k8stools.GetTestClientWithActions(o.predefinedObjects)
+ synctest.Test(t, func(t *testing.T) {
+ assert.NoError(t, NetworkPolicy(ctx, cl, o.new, o.prev, nil))
+ assert.Equal(t, o.actions, cl.Actions)
+ })
+ }
+
+ nn := types.NamespacedName{Name: "test-np", Namespace: "default"}
+
+ // create
+ f(opts{
+ new: getNP(),
+ actions: []k8stools.ClientAction{
+ {Verb: "Get", Kind: "NetworkPolicy", Resource: nn},
+ {Verb: "Create", Kind: "NetworkPolicy", Resource: nn},
+ },
+ })
+
+ // no updates
+ f(opts{
+ new: getNP(),
+ prev: getNP(),
+ predefinedObjects: []runtime.Object{getNP()},
+ actions: []k8stools.ClientAction{
+ {Verb: "Get", Kind: "NetworkPolicy", Resource: nn},
+ },
+ })
+
+ // update spec — add egress
+ f(opts{
+ new: getNP(func(np *networkingv1.NetworkPolicy) {
+ np.Spec.PolicyTypes = append(np.Spec.PolicyTypes, networkingv1.PolicyTypeEgress)
+ np.Spec.Egress = []networkingv1.NetworkPolicyEgressRule{
+ {Ports: []networkingv1.NetworkPolicyPort{{}}},
+ }
+ }),
+ prev: getNP(),
+ predefinedObjects: []runtime.Object{getNP()},
+ actions: []k8stools.ClientAction{
+ {Verb: "Get", Kind: "NetworkPolicy", Resource: nn},
+ {Verb: "Update", Kind: "NetworkPolicy", Resource: nn},
+ },
+ })
+}
diff --git a/internal/controller/operator/factory/vlagent/vlagent.go b/internal/controller/operator/factory/vlagent/vlagent.go
index 93afb7de8..b0cf21870 100644
--- a/internal/controller/operator/factory/vlagent/vlagent.go
+++ b/internal/controller/operator/factory/vlagent/vlagent.go
@@ -12,6 +12,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -141,6 +142,15 @@ func CreateOrUpdate(ctx context.Context, cr *vmv1.VLAgent, rclient client.Client
if err := createOrUpdateVPA(ctx, rclient, cr, prevCR); err != nil {
return fmt.Errorf("cannot create or update vpa for vlagent: %w", err)
}
+ if cr.Spec.NetworkPolicy != nil {
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.NetworkPolicy != nil {
+ prevNP = build.NetworkPolicy(prevCR, prevCR.Spec.NetworkPolicy)
+ }
+ if err := reconcile.NetworkPolicy(ctx, rclient, build.NetworkPolicy(cr, cr.Spec.NetworkPolicy), prevNP, &owner); err != nil {
+ return fmt.Errorf("cannot update network policy for vlagent: %w", err)
+ }
+ }
return createOrUpdateDeploy(ctx, rclient, cr, prevCR)
}
@@ -769,6 +779,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1.VLAgent
if config.MustGetBaseConfig().VPAAPIEnabled && (cr.Spec.VPA == nil || cr.Spec.K8sCollector.Enabled) {
objsToRemove = append(objsToRemove, &vpav1.VerticalPodAutoscaler{ObjectMeta: objMeta})
}
+ if cr.Spec.NetworkPolicy == nil {
+ objsToRemove = append(objsToRemove, &networkingv1.NetworkPolicy{ObjectMeta: objMeta})
+ }
if !cr.IsOwnsServiceAccount() {
objsToRemove = append(objsToRemove, &corev1.ServiceAccount{ObjectMeta: objMeta})
if !cr.Spec.K8sCollector.Enabled && config.IsClusterWideAccessAllowed() {
diff --git a/internal/controller/operator/factory/vlcluster/vlcluster.go b/internal/controller/operator/factory/vlcluster/vlcluster.go
index 63f95372d..9b0473e6a 100644
--- a/internal/controller/operator/factory/vlcluster/vlcluster.go
+++ b/internal/controller/operator/factory/vlcluster/vlcluster.go
@@ -101,6 +101,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1.VLClust
if newStorage.PodDisruptionBudget != nil {
cc.KeepPDB(commonName)
}
+ if newStorage.NetworkPolicy != nil {
+ cc.KeepNetworkPolicy(commonName)
+ }
if newStorage.HPA != nil {
cc.KeepHPA(commonName)
}
@@ -125,6 +128,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1.VLClust
if newSelect.PodDisruptionBudget != nil {
cc.KeepPDB(commonName)
}
+ if newSelect.NetworkPolicy != nil {
+ cc.KeepNetworkPolicy(commonName)
+ }
if newSelect.HPA != nil {
cc.KeepHPA(commonName)
}
@@ -154,6 +160,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1.VLClust
if newInsert.PodDisruptionBudget != nil {
cc.KeepPDB(commonName)
}
+ if newInsert.NetworkPolicy != nil {
+ cc.KeepNetworkPolicy(commonName)
+ }
if newInsert.HPA != nil {
cc.KeepHPA(commonName)
}
@@ -178,6 +187,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1.VLClust
if newLB.Spec.PodDisruptionBudget != nil {
cc.KeepPDB(commonName)
}
+ if newLB.Spec.NetworkPolicy != nil {
+ cc.KeepNetworkPolicy(commonName)
+ }
if !ptr.Deref(newLB.Spec.DisableSelfServiceScrape, false) {
cc.KeepScrape(commonName)
}
diff --git a/internal/controller/operator/factory/vlcluster/vlinsert.go b/internal/controller/operator/factory/vlcluster/vlinsert.go
index 661617435..8c1fb7527 100644
--- a/internal/controller/operator/factory/vlcluster/vlinsert.go
+++ b/internal/controller/operator/factory/vlcluster/vlinsert.go
@@ -10,6 +10,7 @@ import (
autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
@@ -33,6 +34,19 @@ func createOrUpdateVLInsert(ctx context.Context, rclient client.Client, cr, prev
if err := createOrUpdatePodDisruptionBudgetForVLInsert(ctx, rclient, cr, prevCR); err != nil {
return err
}
+ if cr.Spec.VLInsert.NetworkPolicy != nil {
+ b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentInsert)
+ np := build.NetworkPolicy(b, cr.Spec.VLInsert.NetworkPolicy)
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.VLInsert != nil && prevCR.Spec.VLInsert.NetworkPolicy != nil {
+ b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentInsert)
+ prevNP = build.NetworkPolicy(b, prevCR.Spec.VLInsert.NetworkPolicy)
+ }
+ owner := cr.AsOwner()
+ if err := reconcile.NetworkPolicy(ctx, rclient, np, prevNP, &owner); err != nil {
+ return err
+ }
+ }
if err := createOrUpdateVLInsertDeployment(ctx, rclient, cr, prevCR); err != nil {
return err
}
diff --git a/internal/controller/operator/factory/vlcluster/vlselect.go b/internal/controller/operator/factory/vlcluster/vlselect.go
index bbe783d93..e533a1e99 100644
--- a/internal/controller/operator/factory/vlcluster/vlselect.go
+++ b/internal/controller/operator/factory/vlcluster/vlselect.go
@@ -10,6 +10,7 @@ import (
autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
@@ -43,6 +44,19 @@ func createOrUpdateVLSelect(ctx context.Context, rclient client.Client, cr, prev
return err
}
}
+ if cr.Spec.VLSelect.NetworkPolicy != nil {
+ b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentSelect)
+ np := build.NetworkPolicy(b, cr.Spec.VLSelect.NetworkPolicy)
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.VLSelect != nil && prevCR.Spec.VLSelect.NetworkPolicy != nil {
+ b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentSelect)
+ prevNP = build.NetworkPolicy(b, prevCR.Spec.VLSelect.NetworkPolicy)
+ }
+ owner := cr.AsOwner()
+ if err := reconcile.NetworkPolicy(ctx, rclient, np, prevNP, &owner); err != nil {
+ return err
+ }
+ }
if err := createOrUpdateVLSelectHPA(ctx, rclient, cr, prevCR); err != nil {
return err
}
diff --git a/internal/controller/operator/factory/vlcluster/vlstorage.go b/internal/controller/operator/factory/vlcluster/vlstorage.go
index f0120c9b5..016eb4237 100644
--- a/internal/controller/operator/factory/vlcluster/vlstorage.go
+++ b/internal/controller/operator/factory/vlcluster/vlstorage.go
@@ -10,6 +10,7 @@ import (
autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
@@ -43,6 +44,19 @@ func createOrUpdateVLStorage(ctx context.Context, rclient client.Client, cr, pre
return err
}
}
+ if cr.Spec.VLStorage.NetworkPolicy != nil {
+ b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentStorage)
+ np := build.NetworkPolicy(b, cr.Spec.VLStorage.NetworkPolicy)
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.VLStorage != nil && prevCR.Spec.VLStorage.NetworkPolicy != nil {
+ b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentStorage)
+ prevNP = build.NetworkPolicy(b, prevCR.Spec.VLStorage.NetworkPolicy)
+ }
+ owner := cr.AsOwner()
+ if err := reconcile.NetworkPolicy(ctx, rclient, np, prevNP, &owner); err != nil {
+ return err
+ }
+ }
if err := createOrUpdateVLStorageHPA(ctx, rclient, cr, prevCR); err != nil {
return err
}
diff --git a/internal/controller/operator/factory/vlcluster/vmauth_lb.go b/internal/controller/operator/factory/vlcluster/vmauth_lb.go
index 46bf68bfe..045bf59aa 100644
--- a/internal/controller/operator/factory/vlcluster/vmauth_lb.go
+++ b/internal/controller/operator/factory/vlcluster/vmauth_lb.go
@@ -9,6 +9,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
@@ -64,6 +65,19 @@ func createOrUpdateVMAuthLB(ctx context.Context, rclient client.Client, cr, prev
return fmt.Errorf("cannot create or update PodDisruptionBudget for vmauth lb: %w", err)
}
}
+ if cr.Spec.RequestsLoadBalancer.Spec.NetworkPolicy != nil {
+ b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentBalancer)
+ np := build.NetworkPolicy(b, cr.Spec.RequestsLoadBalancer.Spec.NetworkPolicy)
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.RequestsLoadBalancer.Spec.NetworkPolicy != nil {
+ b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentBalancer)
+ prevNP = build.NetworkPolicy(b, prevCR.Spec.RequestsLoadBalancer.Spec.NetworkPolicy)
+ }
+ owner := cr.AsOwner()
+ if err := reconcile.NetworkPolicy(ctx, rclient, np, prevNP, &owner); err != nil {
+ return fmt.Errorf("cannot create or update NetworkPolicy for vmauth lb: %w", err)
+ }
+ }
if err := createOrUpdateVMAuthLBHPA(ctx, rclient, cr, prevCR); err != nil {
return fmt.Errorf("cannot create or update HPA for vmauth lb: %w", err)
}
diff --git a/internal/controller/operator/factory/vlsingle/vlsingle.go b/internal/controller/operator/factory/vlsingle/vlsingle.go
index 96aa898d9..124e1bd47 100644
--- a/internal/controller/operator/factory/vlsingle/vlsingle.go
+++ b/internal/controller/operator/factory/vlsingle/vlsingle.go
@@ -9,6 +9,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/util/intstr"
@@ -105,6 +106,15 @@ func CreateOrUpdate(ctx context.Context, rclient client.Client, cr *vmv1.VLSingl
if err := createOrUpdateVPA(ctx, rclient, cr, prevCR); err != nil {
return fmt.Errorf("cannot create or update vpa for vlsingle: %w", err)
}
+ if cr.Spec.NetworkPolicy != nil {
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.NetworkPolicy != nil {
+ prevNP = build.NetworkPolicy(prevCR, prevCR.Spec.NetworkPolicy)
+ }
+ if err := reconcile.NetworkPolicy(ctx, rclient, build.NetworkPolicy(cr, cr.Spec.NetworkPolicy), prevNP, &owner); err != nil {
+ return fmt.Errorf("cannot update network policy for vlsingle: %w", err)
+ }
+ }
var prevDeploy *appsv1.Deployment
if prevCR != nil {
@@ -381,6 +391,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1.VLSingl
if config.MustGetBaseConfig().VPAAPIEnabled && cr.Spec.VPA == nil {
objsToRemove = append(objsToRemove, &vpav1.VerticalPodAutoscaler{ObjectMeta: objMeta})
}
+ if cr.Spec.NetworkPolicy == nil {
+ objsToRemove = append(objsToRemove, &networkingv1.NetworkPolicy{ObjectMeta: objMeta})
+ }
if !cr.IsOwnsServiceAccount() {
objsToRemove = append(objsToRemove, &corev1.ServiceAccount{ObjectMeta: objMeta})
}
diff --git a/internal/controller/operator/factory/vmagent/vmagent.go b/internal/controller/operator/factory/vmagent/vmagent.go
index 5cfcf7a65..73664aab9 100644
--- a/internal/controller/operator/factory/vmagent/vmagent.go
+++ b/internal/controller/operator/factory/vmagent/vmagent.go
@@ -15,6 +15,7 @@ import (
autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -160,6 +161,15 @@ func CreateOrUpdate(ctx context.Context, cr *vmv1beta1.VMAgent, rclient client.C
if err := createOrUpdateVPA(ctx, rclient, cr, prevCR); err != nil {
return err
}
+ if cr.Spec.NetworkPolicy != nil {
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.NetworkPolicy != nil {
+ prevNP = build.NetworkPolicy(prevCR, prevCR.Spec.NetworkPolicy)
+ }
+ if err := reconcile.NetworkPolicy(ctx, rclient, build.NetworkPolicy(cr, cr.Spec.NetworkPolicy), prevNP, &owner); err != nil {
+ return fmt.Errorf("cannot update network policy for vmagent: %w", err)
+ }
+ }
ac := getAssetsCache(ctx, rclient, cr)
extraCount, err := createOrUpdateScrapeConfig(ctx, rclient, cr, prevCR, nil, ac)
@@ -1302,6 +1312,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1beta1.VM
if config.MustGetBaseConfig().VPAAPIEnabled && (cr.Spec.VPA == nil || cr.Spec.DaemonSetMode || cr.IsSharded()) {
objsToRemove = append(objsToRemove, &vpav1.VerticalPodAutoscaler{ObjectMeta: objMeta})
}
+ if cr.Spec.NetworkPolicy == nil {
+ objsToRemove = append(objsToRemove, &networkingv1.NetworkPolicy{ObjectMeta: objMeta})
+ }
if !cr.IsOwnsServiceAccount() {
objsToRemove = append(objsToRemove, &corev1.ServiceAccount{ObjectMeta: objMeta})
rbacName := cr.GetRBACName()
diff --git a/internal/controller/operator/factory/vmagent/vmagent_reconcile_test.go b/internal/controller/operator/factory/vmagent/vmagent_reconcile_test.go
index 5dfd7a57c..7ac64162d 100644
--- a/internal/controller/operator/factory/vmagent/vmagent_reconcile_test.go
+++ b/internal/controller/operator/factory/vmagent/vmagent_reconcile_test.go
@@ -177,6 +177,7 @@ func Test_CreateOrUpdate_Actions(t *testing.T) {
actions: []k8stools.ClientAction{
{Verb: "Get", Kind: "DaemonSet", Resource: vmagentName},
{Verb: "Get", Kind: "HorizontalPodAutoscaler", Resource: vmagentName},
+ {Verb: "Get", Kind: "NetworkPolicy", Resource: vmagentName},
{Verb: "Get", Kind: "ServiceAccount", Resource: vmagentName},
{Verb: "Get", Kind: "ClusterRole", Resource: clusterRoleName},
{Verb: "Get", Kind: "ClusterRoleBinding", Resource: clusterRoleName},
diff --git a/internal/controller/operator/factory/vmalert/vmalert.go b/internal/controller/operator/factory/vmalert/vmalert.go
index 06a7ac07a..bf5c348e3 100644
--- a/internal/controller/operator/factory/vmalert/vmalert.go
+++ b/internal/controller/operator/factory/vmalert/vmalert.go
@@ -11,6 +11,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
@@ -148,6 +149,15 @@ func CreateOrUpdate(ctx context.Context, cr *vmv1beta1.VMAlert, rclient client.C
if err := createOrUpdateVPA(ctx, rclient, cr, prevCR); err != nil {
return fmt.Errorf("cannot create or update vpa for vmalert: %w", err)
}
+ if cr.Spec.NetworkPolicy != nil {
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.NetworkPolicy != nil {
+ prevNP = build.NetworkPolicy(prevCR, prevCR.Spec.NetworkPolicy)
+ }
+ if err := reconcile.NetworkPolicy(ctx, rclient, build.NetworkPolicy(cr, cr.Spec.NetworkPolicy), prevNP, &owner); err != nil {
+ return fmt.Errorf("cannot update network policy for vmalert: %w", err)
+ }
+ }
var prevDeploy *appsv1.Deployment
if prevCR != nil {
@@ -828,6 +838,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1beta1.VM
if config.MustGetBaseConfig().VPAAPIEnabled && cr.Spec.VPA == nil {
objsToRemove = append(objsToRemove, &vpav1.VerticalPodAutoscaler{ObjectMeta: objMeta})
}
+ if cr.Spec.NetworkPolicy == nil {
+ objsToRemove = append(objsToRemove, &networkingv1.NetworkPolicy{ObjectMeta: objMeta})
+ }
if !cr.IsOwnsServiceAccount() {
objsToRemove = append(objsToRemove, &corev1.ServiceAccount{ObjectMeta: objMeta})
}
diff --git a/internal/controller/operator/factory/vmalert/vmalert_reconcile_test.go b/internal/controller/operator/factory/vmalert/vmalert_reconcile_test.go
index 2cb2e9b7b..45391479c 100644
--- a/internal/controller/operator/factory/vmalert/vmalert_reconcile_test.go
+++ b/internal/controller/operator/factory/vmalert/vmalert_reconcile_test.go
@@ -156,6 +156,7 @@ func Test_CreateOrUpdate_Actions(t *testing.T) {
}, want{
actions: []k8stools.ClientAction{
{Verb: "Get", Kind: "PodDisruptionBudget", Resource: vmalertName},
+ {Verb: "Get", Kind: "NetworkPolicy", Resource: vmalertName},
{Verb: "Get", Kind: "ServiceAccount", Resource: vmalertName},
{Verb: "Get", Kind: "Service", Resource: vmalertName},
{Verb: "Get", Kind: "VMServiceScrape", Resource: vmalertName},
diff --git a/internal/controller/operator/factory/vmalertmanager/alertmanager.go b/internal/controller/operator/factory/vmalertmanager/alertmanager.go
index 02a34ce43..e205cee08 100644
--- a/internal/controller/operator/factory/vmalertmanager/alertmanager.go
+++ b/internal/controller/operator/factory/vmalertmanager/alertmanager.go
@@ -7,6 +7,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/sets"
@@ -70,6 +71,15 @@ func CreateOrUpdateAlertManager(ctx context.Context, cr *vmv1beta1.VMAlertmanage
if err := createOrUpdateVPA(ctx, rclient, cr, prevCR); err != nil {
return fmt.Errorf("cannot create or update vpa for vmalertmanager: %w", err)
}
+ if cr.Spec.NetworkPolicy != nil {
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.NetworkPolicy != nil {
+ prevNP = build.NetworkPolicy(prevCR, prevCR.Spec.NetworkPolicy)
+ }
+ if err := reconcile.NetworkPolicy(ctx, rclient, build.NetworkPolicy(cr, cr.Spec.NetworkPolicy), prevNP, &owner); err != nil {
+ return fmt.Errorf("cannot update network policy for vmalertmanager: %w", err)
+ }
+ }
var prevSts *appsv1.StatefulSet
if prevCR != nil {
var err error
@@ -133,6 +143,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1beta1.VM
if config.MustGetBaseConfig().VPAAPIEnabled && cr.Spec.VPA == nil {
objsToRemove = append(objsToRemove, &vpav1.VerticalPodAutoscaler{ObjectMeta: objMeta})
}
+ if cr.Spec.NetworkPolicy == nil {
+ objsToRemove = append(objsToRemove, &networkingv1.NetworkPolicy{ObjectMeta: objMeta})
+ }
if !cr.IsOwnsServiceAccount() {
objsToRemove = append(objsToRemove, &corev1.ServiceAccount{ObjectMeta: objMeta})
}
diff --git a/internal/controller/operator/factory/vmalertmanager/vmalertmanager_reconcile_test.go b/internal/controller/operator/factory/vmalertmanager/vmalertmanager_reconcile_test.go
index 9075f068b..53b63ab89 100644
--- a/internal/controller/operator/factory/vmalertmanager/vmalertmanager_reconcile_test.go
+++ b/internal/controller/operator/factory/vmalertmanager/vmalertmanager_reconcile_test.go
@@ -187,6 +187,7 @@ func Test_CreateOrUpdate_Actions(t *testing.T) {
want{
actions: []k8stools.ClientAction{
{Verb: "Get", Kind: "PodDisruptionBudget", Resource: vmalertmanagerName},
+ {Verb: "Get", Kind: "NetworkPolicy", Resource: vmalertmanagerName},
{Verb: "Get", Kind: "ServiceAccount", Resource: vmalertmanagerName},
{Verb: "Get", Kind: "Role", Resource: vmalertmanagerName},
{Verb: "Get", Kind: "RoleBinding", Resource: vmalertmanagerName},
diff --git a/internal/controller/operator/factory/vmanomaly/statefulset.go b/internal/controller/operator/factory/vmanomaly/statefulset.go
index cdcb5b071..ac5a6ca9b 100644
--- a/internal/controller/operator/factory/vmanomaly/statefulset.go
+++ b/internal/controller/operator/factory/vmanomaly/statefulset.go
@@ -9,6 +9,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
@@ -107,6 +108,15 @@ func CreateOrUpdate(ctx context.Context, cr *vmv1.VMAnomaly, rclient client.Clie
if err != nil {
return fmt.Errorf("cannot build new statefulSet for vmanomaly: %w", err)
}
+ if cr.Spec.NetworkPolicy != nil {
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.NetworkPolicy != nil {
+ prevNP = build.NetworkPolicy(prevCR, prevCR.Spec.NetworkPolicy)
+ }
+ if err := reconcile.NetworkPolicy(ctx, rclient, build.NetworkPolicy(cr, cr.Spec.NetworkPolicy), prevNP, &owner); err != nil {
+ return fmt.Errorf("cannot update network policy for vmanomaly: %w", err)
+ }
+ }
return createOrUpdateApp(ctx, rclient, cr, prevCR, newAppTpl, prevAppTpl)
}
@@ -215,6 +225,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1.VMAnoma
objMeta := metav1.ObjectMeta{Name: cr.PrefixedName(), Namespace: cr.Namespace}
var objsToRemove []client.Object
+ if cr.Spec.NetworkPolicy == nil {
+ objsToRemove = append(objsToRemove, &networkingv1.NetworkPolicy{ObjectMeta: objMeta})
+ }
if !cr.IsOwnsServiceAccount() {
objsToRemove = append(objsToRemove, &corev1.ServiceAccount{ObjectMeta: objMeta})
}
diff --git a/internal/controller/operator/factory/vmanomaly/vmanomaly_reconcile_test.go b/internal/controller/operator/factory/vmanomaly/vmanomaly_reconcile_test.go
index 454957c07..4babb4ecc 100644
--- a/internal/controller/operator/factory/vmanomaly/vmanomaly_reconcile_test.go
+++ b/internal/controller/operator/factory/vmanomaly/vmanomaly_reconcile_test.go
@@ -248,6 +248,7 @@ schedulers:
},
want{
actions: []k8stools.ClientAction{
+ {Verb: "Get", Kind: "NetworkPolicy", Resource: vmanomalyName},
{Verb: "Get", Kind: "ServiceAccount", Resource: vmanomalyName},
{Verb: "Get", Kind: "Service", Resource: vmanomalyName},
{Verb: "Get", Kind: "VMPodScrape", Resource: vmanomalyName},
diff --git a/internal/controller/operator/factory/vmauth/vmauth.go b/internal/controller/operator/factory/vmauth/vmauth.go
index 9a434a8bc..0db7a3ce5 100644
--- a/internal/controller/operator/factory/vmauth/vmauth.go
+++ b/internal/controller/operator/factory/vmauth/vmauth.go
@@ -100,6 +100,15 @@ func CreateOrUpdate(ctx context.Context, cr *vmv1beta1.VMAuth, rclient client.Cl
return fmt.Errorf("cannot update pod disruption budget for vmauth: %w", err)
}
}
+ if cr.Spec.NetworkPolicy != nil {
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.NetworkPolicy != nil {
+ prevNP = build.NetworkPolicy(prevCR, prevCR.Spec.NetworkPolicy)
+ }
+ if err := reconcile.NetworkPolicy(ctx, rclient, build.NetworkPolicy(cr, cr.Spec.NetworkPolicy), prevNP, &owner); err != nil {
+ return fmt.Errorf("cannot update network policy for vmauth: %w", err)
+ }
+ }
var prevDeploy *appsv1.Deployment
if prevCR != nil {
var err error
@@ -650,6 +659,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1beta1.VM
if cr.Spec.PodDisruptionBudget == nil {
objsToRemove = append(objsToRemove, &policyv1.PodDisruptionBudget{ObjectMeta: objMeta})
}
+ if cr.Spec.NetworkPolicy == nil {
+ objsToRemove = append(objsToRemove, &networkingv1.NetworkPolicy{ObjectMeta: objMeta})
+ }
if cfg.GatewayAPIEnabled && cr.Spec.HTTPRoute == nil {
objsToRemove = append(objsToRemove, &gwapiv1.HTTPRoute{ObjectMeta: objMeta})
}
diff --git a/internal/controller/operator/factory/vmauth/vmauth_reconcile_test.go b/internal/controller/operator/factory/vmauth/vmauth_reconcile_test.go
index ce87cc3da..8ef2fd707 100644
--- a/internal/controller/operator/factory/vmauth/vmauth_reconcile_test.go
+++ b/internal/controller/operator/factory/vmauth/vmauth_reconcile_test.go
@@ -156,6 +156,7 @@ func Test_CreateOrUpdate_Actions(t *testing.T) {
{Verb: "Get", Kind: "Deployment", Resource: vmauthName},
{Verb: "Get", Kind: "Deployment", Resource: vmauthName},
{Verb: "Get", Kind: "PodDisruptionBudget", Resource: vmauthName},
+ {Verb: "Get", Kind: "NetworkPolicy", Resource: vmauthName},
{Verb: "Get", Kind: "Ingress", Resource: vmauthName},
{Verb: "Get", Kind: "HorizontalPodAutoscaler", Resource: vmauthName},
},
diff --git a/internal/controller/operator/factory/vmcluster/vmcluster.go b/internal/controller/operator/factory/vmcluster/vmcluster.go
index eeb2bd3f4..e11d08315 100644
--- a/internal/controller/operator/factory/vmcluster/vmcluster.go
+++ b/internal/controller/operator/factory/vmcluster/vmcluster.go
@@ -11,6 +11,7 @@ import (
autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
@@ -88,6 +89,11 @@ func CreateOrUpdate(ctx context.Context, cr *vmv1beta1.VMCluster, rclient client
return err
}
}
+ if cr.Spec.VMStorage.NetworkPolicy != nil {
+ if err := createOrUpdateNetworkPolicyForVMStorage(ctx, rclient, cr, prevCR); err != nil {
+ return err
+ }
+ }
if err := createOrUpdateVMStorage(ctx, rclient, cr, prevCR); err != nil {
return err
}
@@ -109,6 +115,11 @@ func CreateOrUpdate(ctx context.Context, cr *vmv1beta1.VMCluster, rclient client
return err
}
}
+ if cr.Spec.VMSelect.NetworkPolicy != nil {
+ if err := createOrUpdateNetworkPolicyForVMSelect(ctx, rclient, cr, prevCR); err != nil {
+ return err
+ }
+ }
if err := createOrUpdateVMSelect(ctx, rclient, cr, prevCR); err != nil {
return err
}
@@ -131,6 +142,11 @@ func CreateOrUpdate(ctx context.Context, cr *vmv1beta1.VMCluster, rclient client
return err
}
}
+ if cr.Spec.VMInsert.NetworkPolicy != nil {
+ if err := createOrUpdateNetworkPolicyForVMInsert(ctx, rclient, cr, prevCR); err != nil {
+ return err
+ }
+ }
if err := createOrUpdateVMInsert(ctx, rclient, cr, prevCR); err != nil {
return err
}
@@ -763,6 +779,18 @@ func createOrUpdatePodDisruptionBudgetForVMSelect(ctx context.Context, rclient c
return reconcile.PDB(ctx, rclient, pdb, prevPDB, &owner)
}
+func createOrUpdateNetworkPolicyForVMSelect(ctx context.Context, rclient client.Client, cr, prevCR *vmv1beta1.VMCluster) error {
+ b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentSelect)
+ np := build.NetworkPolicy(b, cr.Spec.VMSelect.NetworkPolicy)
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.VMSelect != nil && prevCR.Spec.VMSelect.NetworkPolicy != nil {
+ b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentSelect)
+ prevNP = build.NetworkPolicy(b, prevCR.Spec.VMSelect.NetworkPolicy)
+ }
+ owner := cr.AsOwner()
+ return reconcile.NetworkPolicy(ctx, rclient, np, prevNP, &owner)
+}
+
func genVMInsertSpec(cr *vmv1beta1.VMCluster) (*appsv1.Deployment, error) {
podSpec, err := makePodSpecForVMInsert(cr)
@@ -974,6 +1002,18 @@ func createOrUpdatePodDisruptionBudgetForVMInsert(ctx context.Context, rclient c
return reconcile.PDB(ctx, rclient, pdb, prevPDB, &owner)
}
+func createOrUpdateNetworkPolicyForVMInsert(ctx context.Context, rclient client.Client, cr, prevCR *vmv1beta1.VMCluster) error {
+ b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentInsert)
+ np := build.NetworkPolicy(b, cr.Spec.VMInsert.NetworkPolicy)
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.VMInsert != nil && prevCR.Spec.VMInsert.NetworkPolicy != nil {
+ b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentInsert)
+ prevNP = build.NetworkPolicy(b, prevCR.Spec.VMInsert.NetworkPolicy)
+ }
+ owner := cr.AsOwner()
+ return reconcile.NetworkPolicy(ctx, rclient, np, prevNP, &owner)
+}
+
func buildVMStorageSpec(ctx context.Context, cr *vmv1beta1.VMCluster) (*appsv1.StatefulSet, error) {
commonName := cr.PrefixedName(vmv1beta1.ClusterComponentStorage)
@@ -1244,6 +1284,18 @@ func createOrUpdatePodDisruptionBudgetForVMStorage(ctx context.Context, rclient
return reconcile.PDB(ctx, rclient, pdb, prevPDB, &owner)
}
+func createOrUpdateNetworkPolicyForVMStorage(ctx context.Context, rclient client.Client, cr, prevCR *vmv1beta1.VMCluster) error {
+ b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentStorage)
+ np := build.NetworkPolicy(b, cr.Spec.VMStorage.NetworkPolicy)
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.VMStorage != nil && prevCR.Spec.VMStorage.NetworkPolicy != nil {
+ b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentStorage)
+ prevNP = build.NetworkPolicy(b, prevCR.Spec.VMStorage.NetworkPolicy)
+ }
+ owner := cr.AsOwner()
+ return reconcile.NetworkPolicy(ctx, rclient, np, prevNP, &owner)
+}
+
func createOrUpdateVMInsertHPA(ctx context.Context, rclient client.Client, cr, prevCR *vmv1beta1.VMCluster) error {
if cr.Spec.VMInsert.HPA == nil {
return nil
@@ -1382,6 +1434,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1beta1.VM
if newStorage.PodDisruptionBudget != nil {
cc.KeepPDB(commonName)
}
+ if newStorage.NetworkPolicy != nil {
+ cc.KeepNetworkPolicy(commonName)
+ }
if newStorage.HPA != nil {
cc.KeepHPA(commonName)
}
@@ -1406,6 +1461,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1beta1.VM
if newSelect.PodDisruptionBudget != nil {
cc.KeepPDB(commonName)
}
+ if newSelect.NetworkPolicy != nil {
+ cc.KeepNetworkPolicy(commonName)
+ }
if newSelect.HPA != nil {
cc.KeepHPA(commonName)
}
@@ -1435,6 +1493,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1beta1.VM
if newInsert.PodDisruptionBudget != nil {
cc.KeepPDB(commonName)
}
+ if newInsert.NetworkPolicy != nil {
+ cc.KeepNetworkPolicy(commonName)
+ }
if newInsert.HPA != nil {
cc.KeepHPA(commonName)
}
@@ -1459,6 +1520,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1beta1.VM
if newLB.Spec.PodDisruptionBudget != nil {
cc.KeepPDB(commonName)
}
+ if newLB.Spec.NetworkPolicy != nil {
+ cc.KeepNetworkPolicy(commonName)
+ }
if !ptr.Deref(newLB.Spec.DisableSelfServiceScrape, false) {
cc.KeepScrape(commonName)
}
@@ -1722,6 +1786,11 @@ func createOrUpdateVMAuthLB(ctx context.Context, rclient client.Client, cr, prev
return fmt.Errorf("cannot create or update PodDisruptionBudget for vmauth lb: %w", err)
}
}
+ if cr.Spec.RequestsLoadBalancer.Spec.NetworkPolicy != nil {
+ if err := createOrUpdateNetworkPolicyForVMAuthLB(ctx, rclient, cr, prevCR); err != nil {
+ return fmt.Errorf("cannot create or update NetworkPolicy for vmauth lb: %w", err)
+ }
+ }
if err := createOrUpdateVMAuthLBHPA(ctx, rclient, cr, prevCR); err != nil {
return fmt.Errorf("cannot create or update HPA for vmauth lb: %w", err)
}
@@ -1768,3 +1837,15 @@ func createOrUpdatePodDisruptionBudgetForVMAuthLB(ctx context.Context, rclient c
owner := cr.AsOwner()
return reconcile.PDB(ctx, rclient, pdb, prevPDB, &owner)
}
+
+func createOrUpdateNetworkPolicyForVMAuthLB(ctx context.Context, rclient client.Client, cr, prevCR *vmv1beta1.VMCluster) error {
+ b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentBalancer)
+ np := build.NetworkPolicy(b, cr.Spec.RequestsLoadBalancer.Spec.NetworkPolicy)
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.RequestsLoadBalancer.Spec.NetworkPolicy != nil {
+ b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentBalancer)
+ prevNP = build.NetworkPolicy(b, prevCR.Spec.RequestsLoadBalancer.Spec.NetworkPolicy)
+ }
+ owner := cr.AsOwner()
+ return reconcile.NetworkPolicy(ctx, rclient, np, prevNP, &owner)
+}
diff --git a/internal/controller/operator/factory/vmsingle/vmsingle.go b/internal/controller/operator/factory/vmsingle/vmsingle.go
index d1885dc14..3d0fd9695 100644
--- a/internal/controller/operator/factory/vmsingle/vmsingle.go
+++ b/internal/controller/operator/factory/vmsingle/vmsingle.go
@@ -10,6 +10,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
@@ -119,6 +120,15 @@ func CreateOrUpdate(ctx context.Context, cr *vmv1beta1.VMSingle, rclient client.
if err := createOrUpdateVPA(ctx, rclient, cr, prevCR); err != nil {
return fmt.Errorf("cannot create or update vpa for vmsingle: %w", err)
}
+ if cr.Spec.NetworkPolicy != nil {
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.NetworkPolicy != nil {
+ prevNP = build.NetworkPolicy(prevCR, prevCR.Spec.NetworkPolicy)
+ }
+ if err := reconcile.NetworkPolicy(ctx, rclient, build.NetworkPolicy(cr, cr.Spec.NetworkPolicy), prevNP, &owner); err != nil {
+ return fmt.Errorf("cannot update network policy for vmsingle: %w", err)
+ }
+ }
ac := getAssetsCache(ctx, rclient, cr)
extraCount, err := createOrUpdateScrapeConfig(ctx, rclient, cr, prevCR, nil, ac)
@@ -713,6 +723,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1beta1.VM
if cfg.VPAAPIEnabled && cr.Spec.VPA == nil {
objsToRemove = append(objsToRemove, &vpav1.VerticalPodAutoscaler{ObjectMeta: objMeta})
}
+ if cr.Spec.NetworkPolicy == nil {
+ objsToRemove = append(objsToRemove, &networkingv1.NetworkPolicy{ObjectMeta: objMeta})
+ }
if !cr.IsOwnsServiceAccount() {
objsToRemove = append(objsToRemove, &corev1.ServiceAccount{ObjectMeta: objMeta})
rbacName := cr.GetRBACName()
diff --git a/internal/controller/operator/factory/vmsingle/vmsingle_reconcile_test.go b/internal/controller/operator/factory/vmsingle/vmsingle_reconcile_test.go
index ecf5b65f0..cac493495 100644
--- a/internal/controller/operator/factory/vmsingle/vmsingle_reconcile_test.go
+++ b/internal/controller/operator/factory/vmsingle/vmsingle_reconcile_test.go
@@ -140,6 +140,7 @@ func Test_CreateOrUpdate_Actions(t *testing.T) {
},
want{
actions: []k8stools.ClientAction{
+ {Verb: "Get", Kind: "NetworkPolicy", Resource: vmsingleName},
{Verb: "Get", Kind: "ServiceAccount", Resource: vmsingleName},
{Verb: "Get", Kind: "Service", Resource: vmsingleName},
{Verb: "Get", Kind: "VMServiceScrape", Resource: vmsingleName},
diff --git a/internal/controller/operator/factory/vtcluster/cluster.go b/internal/controller/operator/factory/vtcluster/cluster.go
index 76ff0121d..47645dc42 100644
--- a/internal/controller/operator/factory/vtcluster/cluster.go
+++ b/internal/controller/operator/factory/vtcluster/cluster.go
@@ -101,6 +101,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1.VTClust
if newStorage.PodDisruptionBudget != nil {
cc.KeepPDB(commonName)
}
+ if newStorage.NetworkPolicy != nil {
+ cc.KeepNetworkPolicy(commonName)
+ }
if newStorage.HPA != nil {
cc.KeepHPA(commonName)
}
@@ -125,6 +128,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1.VTClust
if newSelect.PodDisruptionBudget != nil {
cc.KeepPDB(commonName)
}
+ if newSelect.NetworkPolicy != nil {
+ cc.KeepNetworkPolicy(commonName)
+ }
if newSelect.HPA != nil {
cc.KeepHPA(commonName)
}
@@ -154,6 +160,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1.VTClust
if newInsert.PodDisruptionBudget != nil {
cc.KeepPDB(commonName)
}
+ if newInsert.NetworkPolicy != nil {
+ cc.KeepNetworkPolicy(commonName)
+ }
if newInsert.HPA != nil {
cc.KeepHPA(commonName)
}
@@ -178,6 +187,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1.VTClust
if newLB.Spec.PodDisruptionBudget != nil {
cc.KeepPDB(commonName)
}
+ if newLB.Spec.NetworkPolicy != nil {
+ cc.KeepNetworkPolicy(commonName)
+ }
if !ptr.Deref(newLB.Spec.DisableSelfServiceScrape, false) {
cc.KeepScrape(commonName)
}
diff --git a/internal/controller/operator/factory/vtcluster/insert.go b/internal/controller/operator/factory/vtcluster/insert.go
index 2019631a2..b75749925 100644
--- a/internal/controller/operator/factory/vtcluster/insert.go
+++ b/internal/controller/operator/factory/vtcluster/insert.go
@@ -10,6 +10,7 @@ import (
autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
@@ -33,6 +34,19 @@ func createOrUpdateVTInsert(ctx context.Context, rclient client.Client, cr, prev
if err := createOrUpdatePodDisruptionBudgetForVTInsert(ctx, rclient, cr, prevCR); err != nil {
return err
}
+ if cr.Spec.Insert.NetworkPolicy != nil {
+ b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentInsert)
+ np := build.NetworkPolicy(b, cr.Spec.Insert.NetworkPolicy)
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.Insert != nil && prevCR.Spec.Insert.NetworkPolicy != nil {
+ b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentInsert)
+ prevNP = build.NetworkPolicy(b, prevCR.Spec.Insert.NetworkPolicy)
+ }
+ owner := cr.AsOwner()
+ if err := reconcile.NetworkPolicy(ctx, rclient, np, prevNP, &owner); err != nil {
+ return err
+ }
+ }
if err := createOrUpdateVTInsertDeployment(ctx, rclient, cr, prevCR); err != nil {
return err
}
diff --git a/internal/controller/operator/factory/vtcluster/select.go b/internal/controller/operator/factory/vtcluster/select.go
index ca0551056..d2b11fad9 100644
--- a/internal/controller/operator/factory/vtcluster/select.go
+++ b/internal/controller/operator/factory/vtcluster/select.go
@@ -10,6 +10,7 @@ import (
autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
@@ -43,6 +44,19 @@ func createOrUpdateVTSelect(ctx context.Context, rclient client.Client, cr, prev
return err
}
}
+ if cr.Spec.Select.NetworkPolicy != nil {
+ b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentSelect)
+ np := build.NetworkPolicy(b, cr.Spec.Select.NetworkPolicy)
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.Select != nil && prevCR.Spec.Select.NetworkPolicy != nil {
+ b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentSelect)
+ prevNP = build.NetworkPolicy(b, prevCR.Spec.Select.NetworkPolicy)
+ }
+ owner := cr.AsOwner()
+ if err := reconcile.NetworkPolicy(ctx, rclient, np, prevNP, &owner); err != nil {
+ return err
+ }
+ }
if err := createOrUpdateVTSelectHPA(ctx, rclient, cr, prevCR); err != nil {
return err
}
diff --git a/internal/controller/operator/factory/vtcluster/storage.go b/internal/controller/operator/factory/vtcluster/storage.go
index 1acf93832..91009e6d9 100644
--- a/internal/controller/operator/factory/vtcluster/storage.go
+++ b/internal/controller/operator/factory/vtcluster/storage.go
@@ -10,6 +10,7 @@ import (
autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
@@ -44,6 +45,19 @@ func createOrUpdateVTStorage(ctx context.Context, rclient client.Client, cr, pre
return err
}
}
+ if cr.Spec.Storage.NetworkPolicy != nil {
+ b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentStorage)
+ np := build.NetworkPolicy(b, cr.Spec.Storage.NetworkPolicy)
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.Storage != nil && prevCR.Spec.Storage.NetworkPolicy != nil {
+ b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentStorage)
+ prevNP = build.NetworkPolicy(b, prevCR.Spec.Storage.NetworkPolicy)
+ }
+ owner := cr.AsOwner()
+ if err := reconcile.NetworkPolicy(ctx, rclient, np, prevNP, &owner); err != nil {
+ return err
+ }
+ }
if err := createOrUpdateVTStorageHPA(ctx, rclient, cr, prevCR); err != nil {
return err
}
diff --git a/internal/controller/operator/factory/vtcluster/vmauth_lb.go b/internal/controller/operator/factory/vtcluster/vmauth_lb.go
index dedc53498..245a2eff6 100644
--- a/internal/controller/operator/factory/vtcluster/vmauth_lb.go
+++ b/internal/controller/operator/factory/vtcluster/vmauth_lb.go
@@ -8,6 +8,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
@@ -62,6 +63,19 @@ func createOrUpdateVMAuthLB(ctx context.Context, rclient client.Client, cr, prev
return fmt.Errorf("cannot create or update PodDisruptionBudget for vmauth lb: %w", err)
}
}
+ if cr.Spec.RequestsLoadBalancer.Spec.NetworkPolicy != nil {
+ b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentBalancer)
+ np := build.NetworkPolicy(b, cr.Spec.RequestsLoadBalancer.Spec.NetworkPolicy)
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.RequestsLoadBalancer.Spec.NetworkPolicy != nil {
+ b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentBalancer)
+ prevNP = build.NetworkPolicy(b, prevCR.Spec.RequestsLoadBalancer.Spec.NetworkPolicy)
+ }
+ owner := cr.AsOwner()
+ if err := reconcile.NetworkPolicy(ctx, rclient, np, prevNP, &owner); err != nil {
+ return fmt.Errorf("cannot create or update NetworkPolicy for vmauth lb: %w", err)
+ }
+ }
if err := createOrUpdateVMAuthLBHPA(ctx, rclient, cr, prevCR); err != nil {
return fmt.Errorf("cannot create or update HPA for vmauth lb: %w", err)
}
diff --git a/internal/controller/operator/factory/vtsingle/vtsingle.go b/internal/controller/operator/factory/vtsingle/vtsingle.go
index 3119e9978..32edce548 100644
--- a/internal/controller/operator/factory/vtsingle/vtsingle.go
+++ b/internal/controller/operator/factory/vtsingle/vtsingle.go
@@ -9,6 +9,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
corev1 "k8s.io/api/core/v1"
+ networkingv1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/util/intstr"
@@ -105,6 +106,15 @@ func CreateOrUpdate(ctx context.Context, rclient client.Client, cr *vmv1.VTSingl
if err := createOrUpdateVPA(ctx, rclient, cr, prevCR); err != nil {
return fmt.Errorf("cannot create or update vpa for vtsingle: %w", err)
}
+ if cr.Spec.NetworkPolicy != nil {
+ var prevNP *networkingv1.NetworkPolicy
+ if prevCR != nil && prevCR.Spec.NetworkPolicy != nil {
+ prevNP = build.NetworkPolicy(prevCR, prevCR.Spec.NetworkPolicy)
+ }
+ if err := reconcile.NetworkPolicy(ctx, rclient, build.NetworkPolicy(cr, cr.Spec.NetworkPolicy), prevNP, &owner); err != nil {
+ return fmt.Errorf("cannot update network policy for vtsingle: %w", err)
+ }
+ }
var prevDeploy *appsv1.Deployment
if prevCR != nil {
@@ -367,6 +377,9 @@ func deleteOrphaned(ctx context.Context, rclient client.Client, cr *vmv1.VTSingl
if config.MustGetBaseConfig().VPAAPIEnabled && cr.Spec.VPA == nil {
objsToRemove = append(objsToRemove, &vpav1.VerticalPodAutoscaler{ObjectMeta: objMeta})
}
+ if cr.Spec.NetworkPolicy == nil {
+ objsToRemove = append(objsToRemove, &networkingv1.NetworkPolicy{ObjectMeta: objMeta})
+ }
if !cr.IsOwnsServiceAccount() {
objsToRemove = append(objsToRemove, &corev1.ServiceAccount{ObjectMeta: objMeta})
}
diff --git a/internal/controller/operator/factory/vtsingle/vtsingle_reconcile_test.go b/internal/controller/operator/factory/vtsingle/vtsingle_reconcile_test.go
index 874106000..2de8d561f 100644
--- a/internal/controller/operator/factory/vtsingle/vtsingle_reconcile_test.go
+++ b/internal/controller/operator/factory/vtsingle/vtsingle_reconcile_test.go
@@ -138,6 +138,7 @@ func Test_CreateOrUpdate_Actions(t *testing.T) {
},
want{
actions: []k8stools.ClientAction{
+ {Verb: "Get", Kind: "NetworkPolicy", Resource: vtsingleName},
{Verb: "Get", Kind: "ServiceAccount", Resource: vtsingleName},
{Verb: "Get", Kind: "Service", Resource: vtsingleName},
{Verb: "Get", Kind: "VMServiceScrape", Resource: vtsingleName},