Skip to content

Re-visit restart policy and equivalent #495

@mangas

Description

@mangas

Restart policy is now split between 2 places:

https://github.com/appvia/kev/blob/5a1c05c568427024fb3ef76a9fc0a5d6bdd1e341/pkg/kev/config/extensions.go#L187
https://github.com/appvia/kev/blob/5a1c05c568427024fb3ef76a9fc0a5d6bdd1e341/pkg/kev/converter/kubernetes/project_service.go#L408

and some really inconvenient assertions (IMO)
https://github.com/appvia/kev/blob/5a1c05c568427024fb3ef76a9fc0a5d6bdd1e341/pkg/kev/converter/kubernetes/project_service_test.go#L1052

A better way in my view would be to ensure all the logic for restart policy gets moved to extensions.go and that a type of errors gets introduced (e.g ErrUnsupportedRestartPolicy). This makes the separation between presentation and validation by making it possible to assert the error occurred and moving the output handling to the UI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions