Skip to content

Commit

Permalink
feat: disable default network policy
Browse files Browse the repository at this point in the history
  • Loading branch information
waveywaves committed Aug 23, 2023
1 parent f2d455e commit 10c1dd3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions controllers/uffizzicluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,9 @@ func (r *UffizziClusterReconciler) upsertVClusterK3sHelmRelease(update bool, ctx
EphemeralStorage: "3Gi",
},
},
NetworkPolicy: VClusterNetworkPolicy{
Enabled: false,
},
},
NodeSelector: VClusterNodeSelector{
SandboxGKEIORuntime: "gvisor",
Expand Down
11 changes: 5 additions & 6 deletions controllers/vcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ type VClusterK8SAPIServer struct {
// VClusterContainer - parameters to create the vcluster container with
type VClusterContainer struct {
Image string `json:"image,omitempty"`
//Command []string `json:"command,omitempty"`
//BaseArgs []string `json:"baseArgs,omitempty"`
//ExtraArgs []string `json:"extraArgs,omitempty"`
//Env []VClusterContainerEnv `json:"env,omitempty"`
//VolumeMounts []VClusterContainerVolumeMounts `json:"volumeMounts,omitempty"`
//Resources VClusterContainerResources `json:"resources,omitempty"`
}

type VClusterContainerResources struct {
Expand Down Expand Up @@ -176,6 +170,10 @@ type VClusterLimitRange struct {
DefaultRequest LimitRangeResources `json:"defaultRequest,omitempty"`
}

type VClusterNetworkPolicy struct {
Enabled bool `json:"enabled,omitempty"`
}

type VClusterMapServicesFromVirtual struct {
From string `json:"from"`
To string `json:"to"`
Expand All @@ -191,6 +189,7 @@ type VClusterIsolation struct {
PodSecurityStandard string `json:"podSecurityStandard,omitempty"`
ResourceQuota VClusterResourceQuota `json:"resourceQuota,omitempty"`
LimitRange VClusterLimitRange `json:"limitRange,omitempty"`
NetworkPolicy VClusterNetworkPolicy `json:"networkPolicy,omitempty"`
}

// VClusterNodeSelector - parameters to define the node selector of the cluster
Expand Down

0 comments on commit 10c1dd3

Please sign in to comment.