Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not update secret when tls.secretName is empty #3719

Merged
merged 3 commits into from
Mar 14, 2023

Conversation

randmonkey
Copy link
Contributor

@randmonkey randmonkey commented Mar 14, 2023

What this PR does / why we need it:

When ingress.Spec.TLS does not contain a secret, skip the updating of referred secrets because they are "Optional".

Which issue this PR fixes:

fixes #3711

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@randmonkey randmonkey force-pushed the fix/skip_updating_tls_without_secrets branch from b2873ef to d794f75 Compare March 14, 2023 07:04
Copy link
Member

@pmalek pmalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conformance tests for Gateway API are failling but I'm not sure if that's related: 🤔

    httproute-observed-generation-bump.go:69: 
        	Error Trace:	/home/runner/go/pkg/mod/sigs.k8s.io/gateway-api@v0.6.1/conformance/tests/httproute-observed-generation-bump.go:69
        	Error:      	Received unexpected error:
        	            	Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io "observed-generation-bump": the object has been modified; please apply your changes to the latest version and try again
        	Test:       	TestGatewayConformance/HTTPRouteObservedGenerationBump/observedGeneration_should_increment
        	Messages:   	error updating the HTTPRoute: Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io "observed-generation-bump": the object has been modified; please apply your changes to the latest version and try again
--- FAIL: TestGatewayConformance/HTTPRouteObservedGenerationBump/observedGeneration_should_increment (0.02s)

CHANGELOG.md Outdated Show resolved Hide resolved
@randmonkey
Copy link
Contributor Author

The conformance tests for Gateway API are failling but I'm not sure if that's related: thinking

    httproute-observed-generation-bump.go:69: 
        	Error Trace:	/home/runner/go/pkg/mod/sigs.k8s.io/gateway-api@v0.6.1/conformance/tests/httproute-observed-generation-bump.go:69
        	Error:      	Received unexpected error:
        	            	Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io "observed-generation-bump": the object has been modified; please apply your changes to the latest version and try again
        	Test:       	TestGatewayConformance/HTTPRouteObservedGenerationBump/observedGeneration_should_increment
        	Messages:   	error updating the HTTPRoute: Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io "observed-generation-bump": the object has been modified; please apply your changes to the latest version and try again
--- FAIL: TestGatewayConformance/HTTPRouteObservedGenerationBump/observedGeneration_should_increment (0.02s)

I think this failure is not related to the PR itself, but worth creating an issue.

@randmonkey randmonkey enabled auto-merge (squash) March 14, 2023 10:03
@randmonkey randmonkey merged commit 19aa187 into main Mar 14, 2023
@randmonkey randmonkey deleted the fix/skip_updating_tls_without_secrets branch March 14, 2023 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ingresses don't get an IP, when spec.tls[].secretName is missing - 2.8.x
2 participants