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

Add - separated names for config entry crds #965

Merged
merged 3 commits into from
Jan 20, 2022
Merged

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Jan 14, 2022

For example allow both kubectl get ingressgateways and
kubectl get ingress-gateways.

When specified in .hcl or .json the config entries are dash-separated so
this makes it consistent if someone uses a dash by mistake after reading
our docs.

How I've tested this PR:

  • edited a crd in my cluster to match and tested out the aliasname

How I expect reviewers to test this PR:

  • make sure I didn't typo or use the wrong name for a config entry
  • also review if this is a good idea

Checklist:

  • Tests added
  • CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

@lkysow lkysow requested review from a team, kschoche and thisisnotashwin and removed request for a team January 14, 2022 03:01
Copy link
Contributor

@thisisnotashwin thisisnotashwin left a comment

Choose a reason for hiding this comment

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

Have the CRDs intentionally not been migrated to the helm chart as well? This change looks good!

@@ -29,6 +29,7 @@ func init() {
// +kubebuilder:printcolumn:name="Synced",type="string",JSONPath=".status.conditions[?(@.type==\"Synced\")].status",description="The sync status of the resource with Consul"
// +kubebuilder:printcolumn:name="Last Synced",type="date",JSONPath=".status.lastSyncedTime",description="The last successful synced time of the resource with Consul"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="The age of the resource"
// +kubebuilder:resource:shortName="exported-services"
Copy link
Contributor

Choose a reason for hiding this comment

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

it's funny that it is the "short" name even though it is a character longer.

Copy link
Member Author

Choose a reason for hiding this comment

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

😂 I know I'm stretching the recommended usage... but they don't have an aliases field!

Copy link
Contributor

@kschoche kschoche left a comment

Choose a reason for hiding this comment

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

I did not catch any typos :D
Looks great!

@lkysow
Copy link
Member Author

lkysow commented Jan 14, 2022

Have the CRDs intentionally not been migrated to the helm chart as well? This change looks good!

Right... no I just forgot them!

Copy link
Contributor

@thisisnotashwin thisisnotashwin left a comment

Choose a reason for hiding this comment

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

Love the "short" names ;)
Great job @lkysow !! Hitting approve assuming the CRDs will be migrated into the helm charts too!!!

For example allow both kubectl get ingressgateways and
kubectl get ingress-gateways.

When specified in .hcl or .json the config entries are dash-separated so
this makes it consistent if someone uses a dash by mistake after reading
our docs.
@lkysow lkysow merged commit ca980cb into main Jan 20, 2022
@lkysow lkysow deleted the lkysow/short-names branch January 20, 2022 17:56
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

3 participants