Skip to content

Commit

Permalink
Rename function (#1644)
Browse files Browse the repository at this point in the history
* Rename function

* changelog
  • Loading branch information
paurosello committed Sep 1, 2023
1 parent 3b30af8 commit c52784d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Propagate `global.podSecurityStandards.enforced` value set to `true` for PSS migration
- Rename function for better readbility.

## [5.7.1] - 2023-08-03

Expand Down
2 changes: 1 addition & 1 deletion service/controller/key/cilium.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func ForceDisableCiliumKubeProxyReplacement(cluster apiv1beta1.Cluster) bool {
return found && v == "true"
}

func AWSEniModeEnabled(cluster apiv1beta1.Cluster) bool {
func CiliumEniModeEnabled(cluster apiv1beta1.Cluster) bool {
mode, found := cluster.Annotations[annotation.CiliumIpamModeAnnotation]
if !found {
// we default to 'kubernetes' mode
Expand Down
4 changes: 2 additions & 2 deletions service/controller/resource/clusterconfigmap/desired.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (r *Resource) GetDesiredState(ctx context.Context, obj interface{}) ([]*cor
}

// We only need this if the cluster is in overlay mode during the upgrade
if key.ForceDisableCiliumKubeProxyReplacement(cr) && !key.AWSEniModeEnabled(cr) {
if key.ForceDisableCiliumKubeProxyReplacement(cr) && !key.CiliumEniModeEnabled(cr) {
ciliumValues["kubeProxyReplacement"] = "disabled"
} else {
ciliumValues["kubeProxyReplacement"] = "strict"
Expand All @@ -162,7 +162,7 @@ func (r *Resource) GetDesiredState(ctx context.Context, obj interface{}) ([]*cor
ciliumValues["cleanupKubeProxy"] = true
}

if key.IsAWS(r.provider) && key.AWSEniModeEnabled(cr) {
if key.IsAWS(r.provider) && key.CiliumEniModeEnabled(cr) {
// Add selector to not interfere with nodes still running in AWS CNI
awsCluster := &v1alpha3.AWSCluster{}
err := r.ctrlClient.Get(ctx, types.NamespacedName{Name: cr.Name, Namespace: cr.Namespace}, awsCluster)
Expand Down

0 comments on commit c52784d

Please sign in to comment.