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

Generify lister-gen #121574

Merged
merged 4 commits into from
Apr 22, 2024
Merged

Generify lister-gen #121574

merged 4 commits into from
Apr 22, 2024

Commits on Apr 22, 2024

  1. Add a lister-gen expansion example

    Signed-off-by: Stephen Kitt <skitt@redhat.com>
    skitt committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    44d7267 View commit details
    Browse the repository at this point in the history
  2. Generify lister-gen

    This adds a generic implementation of a lister, and uses it to replace
    the template code in generated listers. The corresponding templates
    are no longer used and are removed.
    
    Listers are reduced to their interfaces (non-namespaced and namespaced
    if appropriate), their specific structs, and their constructors. All
    method implementations are provided by the generic implementation. The
    dedicated interface is preserved so that each lister can have its own
    set of methods (e.g. the method returning the namespaced lister if
    appropriate), and the dedicated struct is preserved to allow
    expansions to be defined where necessary.
    
    The external interface is unchanged and doesn't expose generics.
    
    Signed-off-by: Stephen Kitt <skitt@redhat.com>
    skitt committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    2e9adcd View commit details
    Browse the repository at this point in the history
  3. Regenerate all listers

    Signed-off-by: Stephen Kitt <skitt@redhat.com>
    skitt committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    e6f4495 View commit details
    Browse the repository at this point in the history
  4. Improve the lister function documentation

    In particular, document that ListAllByNamespace delegates to ListAll
    if no namespace is specified.
    
    Signed-off-by: Stephen Kitt <skitt@redhat.com>
    skitt committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    54e8993 View commit details
    Browse the repository at this point in the history