Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jakub Warczarek <[email protected]>
  • Loading branch information
randmonkey and programmer04 committed Jul 30, 2024
1 parent 36561f5 commit fb14519
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Adding a new version? You'll need three changes:
Konnect speparately, and avoids one blocking the other.
[#6341](https://github.com/Kong/kubernetes-ingress-controller/pull/6341)
[#6349](https://github.com/Kong/kubernetes-ingress-controller/pull/6349)
- `KongCustomEntity` is now included in last valid configuration retrieved from
- `KongCustomEntity` is now included in the last valid configuration retrieved from
Kong gateways.
[#6305](https://github.com/Kong/kubernetes-ingress-controller/pull/6305)

Expand Down
2 changes: 1 addition & 1 deletion internal/dataplane/configfetcher/config_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (cf *DefaultKongLastGoodConfigFetcher) TryFetchingValidConfigFromGateways(
)
for _, client := range gatewayClients {
logger.V(logging.DebugLevel).Info("Fetching configuration", "url", client.BaseRootURL())
// copy dump configuration and add custom entity types for fetching config with custom entities
// Copy the dump configuration and add custom entity types to fetch config with custom entities.
config := cf.config
config.CustomEntityTypes = customEntityTypes
rs, err := cf.getKongRawState(ctx, client.AdminAPIClient(), config)
Expand Down
3 changes: 1 addition & 2 deletions internal/dataplane/kongstate/customentity.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ func (ks *KongState) AddCustomEntity(entityType string, schema EntitySchema, e C

// CustomEntityTypes returns types of translated custom entities included in the KongState.
func (ks *KongState) CustomEntityTypes() []string {
return lo.MapToSlice(ks.CustomEntities, func(entityType string, _ *KongCustomEntityCollection) string {
return entityType
return lo.Keys(ks.CustomEntities)
})
}

Expand Down

0 comments on commit fb14519

Please sign in to comment.