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: update ingressSecretMap even when secret is malformed #1070

Merged
merged 2 commits into from Dec 1, 2020

Conversation

akshaysngupta
Copy link
Member

@akshaysngupta akshaysngupta commented Nov 26, 2020

Checklist

  • The title of the PR is clear and informative
  • If applicable, the changes made in the PR have proper test coverage
  • Issues addressed by the PR are mentioned in the description followed by Fixes.

Description

This PR fixes an issue in processing ingress event with TLS secret.
When ingress is processed, the referenced TLS secret is mapped to ingress and saved in a ingress-secret map.

In specific case where secret is malformed,, this step is skipped due to the continue statement. So later, when the certificate is fixed, it doesn't cause an event on AGIC and doesn't update the Application Gateway.
Secret is malformed in case customer is using a certificate manager which creates an empty secret initially and then fills the cert crt and key after generating them.

This is the place where secret handler checks if the secret is in the map or not.

if h.context.ingressSecretsMap.ContainsValue(secKey) {

Fixes

Closes #893
Closes #728
Closes #763

Copy link
Contributor

@3quanfeng 3quanfeng left a comment

Choose a reason for hiding this comment

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

handle logging properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants