Skip to content

Commit

Permalink
build: add short names to crd (#95)
Browse files Browse the repository at this point in the history
* build(api/v1alpha1): add annotations to add shortnames in ressources types

* build(config/crd/bases): add new generated crd by executing make test

* build(manifest/install.yaml): update the manifest.yaml to be able to use shortnames

* build: add more shortnames
  • Loading branch information
Thibaut-Padok authored Mar 15, 2023
1 parent 295cfd2 commit c1d54b0
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/v1alpha1/terraformlayer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ type TerraformLayerStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=layers;layer;tfls;tfl;
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.state`
// +kubebuilder:printcolumn:name="Repository",type=string,JSONPath=`.spec.repository.name`
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/terraformrepository_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type TerraformRepositoryStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=repositories;repository;repo;tfrs;tfr;
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="URL",type=string,JSONPath=`.spec.repository.url`
// TerraformRepository is the Schema for the terraformrepositories API
Expand Down
38 changes: 38 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ spec:
kind: TerraformLayer
listKind: TerraformLayerList
plural: terraformlayers
shortNames:
- layers
- layer
- tfls
- tfl
singular: terraformlayer
scope: Namespaced
versions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ spec:
kind: TerraformRepository
listKind: TerraformRepositoryList
plural: terraformrepositories
shortNames:
- repositories
- repository
- repo
- tfrs
- tfr
singular: terraformrepository
scope: Namespaced
versions:
Expand Down
11 changes: 11 additions & 0 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ spec:
kind: TerraformRepository
listKind: TerraformRepositoryList
plural: terraformrepositories
shortNames:
- repositories
- repository
- repo
- tfrs
- tfr
singular: terraformrepository
scope: Namespaced
versions:
Expand Down Expand Up @@ -217,6 +223,11 @@ spec:
kind: TerraformLayer
listKind: TerraformLayerList
plural: terraformlayers
shortNames:
- layers
- layer
- tfls
- tfl
singular: terraformlayer
scope: Namespaced
versions:
Expand Down

0 comments on commit c1d54b0

Please sign in to comment.