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

CRD-Generator: Change format in @PrinterColum to enum #6455

Open
baloo42 opened this issue Oct 15, 2024 · 0 comments
Open

CRD-Generator: Change format in @PrinterColum to enum #6455

baloo42 opened this issue Oct 15, 2024 · 0 comments
Labels
component/crd-generator Related to the CRD generator
Milestone

Comments

@baloo42
Copy link
Contributor

baloo42 commented Oct 15, 2024

Is your task related to a problem? Please describe

To align with the upcoming @AdditionalPrinterColumn annotation and to make this typesafe, the type of format in @PrinterColumn should be changed to an enum.

Describe the solution you'd like

enum PrinterColumnFormat {
    NONE(""),
    INT32("int32"),
    INT64("int64"),
    FLOAT("float"),
    DOUBLE("double"),
    BYTE("byte"),
    DATE("date"),
    DATE_TIME("date-time"),
    PASSWORD("password");

    public final String value;

    Format(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }
  }

This enum should be shared between @AdditionalPrinterColumn and @PrinterColumn.

Describe alternatives you've considered

Phase it out:

  1. Add additional enum param formatStrict, deprecate format (with 7.0)
  2. Replace format with enum param, deprecate formatStrict (with 8.0)
  3. Remove formatStrict (with 9.0)

Additional context

First discussed here:

Note that this would be a breaking change.

@manusa manusa added the component/crd-generator Related to the CRD generator label Oct 22, 2024
@manusa manusa added this to the 7.0.0 milestone Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/crd-generator Related to the CRD generator
Projects
None yet
Development

No branches or pull requests

2 participants