Skip to content

Commit

Permalink
address reviews comments
Browse files Browse the repository at this point in the history
Signed-off-by: Mattia Lavacca <[email protected]>
  • Loading branch information
mlavacca committed Dec 17, 2024
1 parent 22af265 commit 5a50ecd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,18 +254,17 @@ Adding a new version? You'll need three changes:
- Added `BackendTLSPolicy` support. The user can now reference any Kubernetes `Service`
in the `BackendTLSPolicy` spec, and in case the service is used as a backend by
`HTTPRoute`s that reference a Kong Gateway as parent, such Backend TLS configuration
is applied to the service section of the Kong configuration.
is applied to the service section of the Kong configuration. The `BackendTLSPolicies`
CA Certificates can be set in `Secret`s or `ConfigMap`s.
[#6712](https://github.com/Kong/kubernetes-ingress-controller/pull/6712)
[#6753](https://github.com/Kong/kubernetes-ingress-controller/pull/6753)
[#6837](https://github.com/Kong/kubernetes-ingress-controller/pull/6837)
[#6853](https://github.com/Kong/kubernetes-ingress-controller/pull/6853)
- Added the flag `--configmap-label-selector` to set the label selector for `ConfigMap`s
to ingest. By setting this flag, the `ConfigMap`s that are ingested will be limited
to those having this label set to "true". This limits the amount of resources that are kept in memory.
The default value is `konghq.com/configmap`.
[#6753](https://github.com/Kong/kubernetes-ingress-controller/pull/6753)
- Added the possibility to set `Secret`s as `CACertificateRefs` in the `BackendTLSPolicy`
objects.
[#6853](https://github.com/Kong/kubernetes-ingress-controller/pull/6853)

## [3.3.1]

Expand Down
8 changes: 4 additions & 4 deletions internal/controllers/gateway/backendtlspolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ func (r *BackendTLSPolicyReconciler) listBackendTLSPoliciesForConfigMaps(ctx con
r.Log.Error(fmt.Errorf("invalid type"), "Found invalid type in event handlers", "expected", "ConfigMap", "found", reflect.TypeOf(obj))
return nil
}
policies := &gatewayapi.BackendTLSPolicyList{}
if err := r.List(ctx, policies,
policies := gatewayapi.BackendTLSPolicyList{}
if err := r.List(ctx, &policies,
client.InNamespace(cm.Namespace),
client.MatchingFields{backendTLSPolicyValidationCARefConfigMapIndexKey: cm.Name},
); err != nil {
Expand All @@ -264,8 +264,8 @@ func (r *BackendTLSPolicyReconciler) listBackendTLSPoliciesForSecrets(ctx contex
r.Log.Error(fmt.Errorf("invalid type"), "Found invalid type in event handlers", "expected", "Secret", "found", reflect.TypeOf(obj))
return nil
}
policies := &gatewayapi.BackendTLSPolicyList{}
if err := r.List(ctx, policies,
policies := gatewayapi.BackendTLSPolicyList{}
if err := r.List(ctx, &policies,
client.InNamespace(secret.Namespace),
client.MatchingFields{backendTLSPolicyValidationCARefSecretIndexKey: secret.Name},
); err != nil {
Expand Down

0 comments on commit 5a50ecd

Please sign in to comment.