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 authored Jul 30, 2024
1 parent ecfecdf commit a903ca1
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 @@ -107,7 +107,7 @@ Adding a new version? You'll need three changes:
`ReferenceGrant` in the namespace of the `KongPlugin` to grant permissions
to `KongCustomEntity` of referring to `KongPlugin`.
[#6289](https://github.com/Kong/kubernetes-ingress-controller/pull/6289)
- `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)
})

Check failure on line 236 in internal/dataplane/kongstate/customentity.go

View workflow job for this annotation

GitHub Actions / Run Go benchmarks

syntax error: unexpected ) after top level declaration
}

Expand Down

0 comments on commit a903ca1

Please sign in to comment.