Skip to content

Conversation

a-hilaly
Copy link
Member

@a-hilaly a-hilaly commented Jun 8, 2021

Issue aws-controllers-k8s/community#823

This patch introduce a new generator configuration under resource
configuration, mainly to tune the kubebuilder:printcolumn marker
comments generation.

More precisely we add PrintConfig struct that contains one field
called OrderBy used to intruct the code generator how to sort the
kubebuilder:printcolumn marker comments.

e.g configuration:

resources:
  Deployment:
    print:
      order_by: JSONPath

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-bot ack-bot requested review from jaypipes and vijtrip2 June 8, 2021 13:15
@a-hilaly
Copy link
Member Author

a-hilaly commented Jun 8, 2021

NOTE to reviewers: This branch need to be rebased after #82 merge.
/hold

@ack-bot ack-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 8, 2021
@a-hilaly a-hilaly force-pushed the resource-print-config branch 3 times, most recently from 5e63d21 to 60f4bed Compare June 8, 2021 13:32
a-hilaly added 2 commits June 8, 2021 16:42
Initially we used to have one config field under "is_printable" under
`ackconfig.FieldConfig` to instruct the code generator to generate
kubebuilder marker comments in order to include the field in `kubectl
get` response.

Time passed and we are in a situation where want to tune more the way
we print these fields and extend the `kubebuilder:printcolumns` comment
markers to include options like `priority`, `order` and default columns.

This patch reworks the field configuration structure and prepare the
laying ground for future print config fields.

This patch will simplify the realization of the following issues:
* aws-controllers-k8s/community#821
* aws-controllers-k8s/community#822
* aws-controllers-k8s/community#823
This patch introduce a new generator configuration under resource
configuration, mainly to tune the `kubebuilder:printcolumn` marker
comments generation.

More precisely we add `PrintConfig` struct that contains one field
called `OrderBy` used to intruct the code generator how to sort the
`kubebuilder:printcolumn` marker comments.

e.g configuration:
```yaml
resources:
  Deployment:
    print:
      order_by: JSONPath
```
@a-hilaly a-hilaly force-pushed the resource-print-config branch from 60f4bed to c6284bb Compare June 8, 2021 15:00
Copy link
Collaborator

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

Nice. ++

@jaypipes
Copy link
Collaborator

jaypipes commented Jun 8, 2021

/lgtm

@ack-bot ack-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2021
@ack-bot
Copy link
Collaborator

ack-bot commented Jun 8, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: A-Hilaly, jaypipes

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@a-hilaly
Copy link
Member Author

a-hilaly commented Jun 8, 2021

/unhold

@ack-bot ack-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 8, 2021
@ack-bot ack-bot merged commit 818c022 into aws-controllers-k8s:main Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants