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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Advertisement print columns #428

Merged
merged 1 commit into from Dec 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -2,7 +2,7 @@

## Coding guidelines

When creating PRs and issues follow the repo's guidelines presented in our [documentation website](https://doc.liqo.io/contributing/guidelines/).
When creating PRs and issues follow the repo's guidelines presented in our [documentation website](https://doc.liqo.io/contributing/).



3 changes: 3 additions & 0 deletions apis/sharing/v1alpha1/advertisement_types.go
Expand Up @@ -77,6 +77,9 @@ type AdvertisementStatus struct {
// +kubebuilder:resource:scope=Cluster

// Advertisement is the Schema for the advertisements API
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.advertisementStatus`
// +kubebuilder:printcolumn:name="Expiration",type=string,JSONPath=`.spec.timeToLive`
// +kubebuilder:printcolumn:name="VkCreated",type=boolean,JSONPath=`.status.vkCreated`
type Advertisement struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
14 changes: 13 additions & 1 deletion deployments/liqo/crds/sharing.liqo.io_advertisements.yaml
Expand Up @@ -14,9 +14,21 @@ spec:
listKind: AdvertisementList
plural: advertisements
singular: advertisement
shortNames:
- adv
scope: Cluster
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .status.advertisementStatus
name: Status
type: string
- jsonPath: .spec.timeToLive
name: Expiration
type: string
- jsonPath: .status.vkCreated
name: VkCreated
type: boolean
name: v1alpha1
schema:
openAPIV3Schema:
description: Advertisement is the Schema for the advertisements API
Expand Down