Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ciliumNetworkPolicy to cluster values #492

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That somehow feels wrong. Which app takes this setting? Can't it be true by default in there?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The answer is: all the apps that are deployed with this setting, e.g cert-manager

}

// 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"`
}
Loading