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

API of validation #148

Merged
merged 23 commits into from
Jun 6, 2024
Merged

API of validation #148

merged 23 commits into from
Jun 6, 2024

Conversation

wpjunior
Copy link
Member

@wpjunior wpjunior commented Mar 25, 2024

Motivation

some users complain that our RPaaS API does not have a validation of nginx.conf files, resulting in a rollout with pod errors, them the responsibility to rollback is totally assigned to the end-user.

Our goal there is to notify user that their conf are invalid, them provides a early feedback and avoid tension of a possible rollback.

New flow:

sequenceDiagram
    actor User
    participant RPaaS API
    participant RPaaS operator
    participant Job CRD
    participant POD
    User->>RPaaS API: post changes of instance
    RPaaS API->>RPaaS operator: Create a RpaasValidation CRD with all spec, then wait status changes
    RPaaS operator->>Job CRD: create a single kubernetes job with image and configmap to validate, using the same logic to generate nginx CRD
    Job CRD->>POD: runs nginx validation command
    Job CRD->>RPaaS operator: watch result of Job CRD and update status
    RPaaS operator->>RPaaS API: Status updated with result of job
    RPaaS API->>User: feedback of changes
    RPaaS API->>RPaaS operator: if validation is sucessfuly: proceed with changes of RpaaSInstance

@wpjunior wpjunior force-pushed the proposal/validation-config branch from f558da2 to bfd742a Compare May 16, 2024 19:22
@wpjunior wpjunior marked this pull request as ready for review May 16, 2024 19:22
@wpjunior wpjunior changed the title Proposal: API of validation API of validation May 16, 2024
@wpjunior wpjunior requested a review from crgisch June 5, 2024 16:32
Copy link
Contributor

@crgisch crgisch left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@wpjunior wpjunior merged commit 0479ead into tsuru:main Jun 6, 2024
5 of 7 checks passed
@wpjunior wpjunior deleted the proposal/validation-config branch June 6, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants