Skip to content

Commit

Permalink
add ciliumNetworkPolicy to cluster values (#492)
Browse files Browse the repository at this point in the history
Signed-off-by: Matias Charriere <[email protected]>
  • Loading branch information
mcharriere authored May 3, 2024
1 parent 9d7cba1 commit 1313221
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add `ciliumNetworkPolicy.enabled=true` in cluster values.

## [2.21.1] - 2024-03-19

### Fixed
Expand Down
3 changes: 3 additions & 0 deletions service/controller/resource/clusterconfigmap/desired.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ func (r *Resource) GetDesiredState(ctx context.Context, obj interface{}) ([]*cor
ClusterCIDR: clusterCIDR,
GcpProject: gcpProject,
Provider: provider,
CiliumNetworkPolicy: CiliumNetworkPolicy{
Enabled: true,
},
}

// disable boostrap mode and do not install CNI for EKS cluster
Expand Down
23 changes: 13 additions & 10 deletions service/controller/resource/clusterconfigmap/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,24 @@ type ClusterConfig struct {
Kubernetes KubernetesConfig `json:"kubernetes"`
Private bool `json:"private"`
}
type CiliumNetworkPolicy struct {
Enabled bool `json:"enabled"`
}
type ClusterValuesConfig struct {
BaseDomain string `json:"baseDomain"`
// BootstrapMode allows to configure chart-operator in bootstrap mode so that it can install charts without cni or kube-proxy.
BootstrapMode ChartOperatorBootstrapMode `json:"bootstrapMode"`
Cluster ClusterConfig `json:"cluster"`
ClusterCA string `json:"clusterCA"`
// ClusterDNSIP is used by chart-operator. It uses this IP as its dnsConfig nameserver, to use it as resolver.
ClusterDNSIP string `json:"clusterDNSIP"`
ClusterID string `json:"clusterID"`
ClusterCIDR string `json:"clusterCIDR"`
ExternalDNSIP *string `json:"externalDNSIP,omitempty"`
Helm *ChartOperatorHelmConfig `json:"helm,omitempty"`
Provider string `json:"provider"`
GcpProject string `json:"gcpProject"`
ChartOperator ChartOperatorConfig `json:"chartOperator"`

AzureSubscriptionID string `json:"subscriptionID"`
ClusterDNSIP string `json:"clusterDNSIP"`
ClusterID string `json:"clusterID"`
ClusterCIDR string `json:"clusterCIDR"`
ExternalDNSIP *string `json:"externalDNSIP,omitempty"`
Helm *ChartOperatorHelmConfig `json:"helm,omitempty"`
Provider string `json:"provider"`
GcpProject string `json:"gcpProject"`
ChartOperator ChartOperatorConfig `json:"chartOperator"`
CiliumNetworkPolicy CiliumNetworkPolicy `json:"ciliumNetworkPolicy"`
AzureSubscriptionID string `json:"subscriptionID"`
}

0 comments on commit 1313221

Please sign in to comment.