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

Set Gateway Programmed condition #658

Merged
merged 4 commits into from
Jun 1, 2023

Conversation

sjberman
Copy link
Contributor

When the Gateway configuration has been successfully uploaded to nginx, we will set the status Programmed to true. If there's any error with updating nginx, then we set Programmed to false. We'll also set a negative status on the HTTPRoutes in the system to explain that the Gateway is not programmed.
Closes #610

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@sjberman sjberman requested a review from a team as a code owner May 22, 2023 21:16
@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request labels May 22, 2023
internal/events/handler.go Outdated Show resolved Hide resolved
internal/events/handler.go Outdated Show resolved Hide resolved
internal/events/handler.go Outdated Show resolved Hide resolved
internal/state/conditions/conditions.go Outdated Show resolved Hide resolved
internal/state/conditions/conditions.go Outdated Show resolved Hide resolved
@sjberman sjberman force-pushed the feature/gateway-programmed branch 2 times, most recently from c69c9c5 to cd55e13 Compare May 23, 2023 20:29
internal/events/handler.go Outdated Show resolved Hide resolved
internal/events/handler.go Outdated Show resolved Hide resolved
docs/gateway-api-compatibility.md Outdated Show resolved Hide resolved
internal/state/conditions/conditions.go Show resolved Hide resolved
internal/state/conditions/conditions.go Outdated Show resolved Hide resolved
internal/state/change_processor.go Outdated Show resolved Hide resolved
internal/state/conditions/conditions.go Outdated Show resolved Hide resolved
@sjberman sjberman force-pushed the feature/gateway-programmed branch from 39d838a to f45a282 Compare May 25, 2023 17:17
docs/gateway-api-compatibility.md Outdated Show resolved Hide resolved
docs/gateway-api-compatibility.md Outdated Show resolved Hide resolved
internal/status/statuses.go Outdated Show resolved Hide resolved
@sjberman sjberman force-pushed the feature/gateway-programmed branch 2 times, most recently from 1ac45a2 to edcf46c Compare May 26, 2023 16:40
@sjberman sjberman requested review from pleshakov and kate-osborn May 26, 2023 16:40
internal/events/handler.go Outdated Show resolved Hide resolved
internal/state/change_processor.go Outdated Show resolved Hide resolved
internal/status/statuses.go Show resolved Hide resolved
internal/status/statuses.go Show resolved Hide resolved
internal/state/change_processor_test.go Outdated Show resolved Hide resolved
@sjberman sjberman force-pushed the feature/gateway-programmed branch from e74c66a to 5ef9689 Compare May 31, 2023 14:59
sjberman added 3 commits June 1, 2023 11:19
When the Gateway configuration has been successfully uploaded to nginx, we will set the status Programmed to true. If there's any error with updating nginx, then we set Programmed to false. We'll also set a negative status on the HTTPRoutes in the system to explain that the Gateway is not programmed.

Moved the buildStatuses logic into the status package and removed redundant tests.
@sjberman sjberman force-pushed the feature/gateway-programmed branch from 5ef9689 to 85657cc Compare June 1, 2023 17:19
@sjberman sjberman requested review from kate-osborn and pleshakov June 1, 2023 19:18
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

Looks good. Especially considering removed code! +619 −1,237

I left a few small comments

internal/state/change_processor.go Show resolved Hide resolved
internal/state/change_processor_test.go Show resolved Hide resolved
@sjberman sjberman requested a review from pleshakov June 1, 2023 20:35
@sjberman sjberman merged commit ef84a6d into nginxinc:main Jun 1, 2023
@sjberman sjberman deleted the feature/gateway-programmed branch June 1, 2023 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Set Programmed Condition in Gateway Status
3 participants