GoogleCloudPlatform / GoogleCloudPlatform/gke-gateway-api
Documented optional logging fields not implemented on GCPBackendPolicy
- Dominant language
- Go
- Stars
- 24
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
The [GKE docs](https://cloud.google.com/kubernetes-engine/docs/how-to/configure-gateway-resources#http_access_logging) for configuring gateway resources state that additional fields can be logged via the `GCPBackendPolicy` resource.
Yet it doesn't actually look like that has been implemented:
```
apiVersion: networking.gke.io/v1
kind: GCPBackendPolicy
metadata:
name: hello
namespace: hello
spec:
default:
connectionDraining:
drainingTimeoutSec: 3600
logging:
enabled: true
sampleRate: 1000000
optionalMode: CUSTOM
optionalFields:
- client_region
securityPolicy: api-gateway
timeoutSec: 60
targetRef:
group: ""
kind: Service
name: hello
```
```
1> kubectl apply -f gcp_backend_policy.yaml
Error from server (BadRequest): error when creating "backend_policy.yaml": GCPBackendPolicy in version "v1" cannot be
handled as a GCPBackendPolicy: strict decoding error: unknown field "spec.default.logging.optionalFields", unknown field "spec.d
efault.logging.optionalMode"
```
```
> kubectl version
Client Version: v1.32.4
Kustomize Version: v5.5.0
Server Version: v1.31.7-gke.1212000
```
Contributor guide
Research direction
Start by locating the v1 GCPBackendPolicy schema and the logging validation or reconciliation path, then reproduce the strict-decoding error with the manifest shown. Done means optionalMode and optionalFields are accepted for the documented resource and the supplied example is covered by a test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gcp, go, kubernetes
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100