Skip to content

Annotations: Reload on custom header changes.

Placeholder Jurgen Goelen requested to merge github/fork/jgoelen/main into main

What this PR does / why we need it:

It fixes an open issue #11680 (closed). The problem extends to the response headers not reflecting updates made to the ConfigMap's contents. This limitation stems from the fact that the Ingress object remains unmodified, making it impossible to address through code changes alone. However, a straightforward solution exists: adding a checksum annotation on the Ingress that includes a hash of the ConfigMap's content. This approach would effectively trigger the necessary updates.

kind: Ingress
metadata:
  name: podinfo-ingress
  annotations:
    nginx.ingress.kubernetes.io/custom-headers: custom-security-headers
    checksum/config: cfe9d9d1a364866309f498c8fd07a6208ac5c68aaefa15212e50585fca9cbebe
spec:
...

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • CVE Report (Scanner found CVE and adding report)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation only

Which issue/s this PR fixes

Fixes #11680 (closed)

How Has This Been Tested?

Add extra config to test manifests used by types_equals_test.go. Manual testing.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [X ] I've read the CONTRIBUTION guide
  • I have added unit and/or e2e tests to cover my changes.
  • All new and existing tests passed.

Merge request reports

Loading