Skip to content

Commit fd74b11

Browse files
authored
feat(sqs): add printer columns for Queue CRD (#62)
Adds printer columns to show Queue configuration at a glance: - Default view: `DelaySeconds`, `visibilityTimeout`, `Age`, `Synced` - Extended view (-o wide): `maximumMessageSize`, `messageRetentionPeriod`, `receiveMessageWaitTimeSeconds` By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 753414a commit fd74b11

File tree

6 files changed

+113
-8
lines changed

6 files changed

+113
-8
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2024-10-11T23:32:16Z"
3-
build_hash: 5bdd3b9f4b9fb86d5b0c302eb80cdd9884217d35
4-
go_version: go1.22.4
5-
version: v0.38.1-5-g5bdd3b9
6-
api_directory_checksum: 0df08791de46be9f5503519df966986952e631e8
2+
build_date: "2024-10-24T02:20:42Z"
3+
build_hash: 36c2d234498c2bc4f60773ab8df632af4067f43b
4+
go_version: go1.23.2
5+
version: v0.39.1
6+
api_directory_checksum: 8f26009577f13f96d7f6ba08a96e95f2f7f08b86
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.55.5
99
generator_config_info:
10-
file_checksum: 1838c1a72ba461991a7fb9dbf9693ec1ec2c5a41
10+
file_checksum: 662a51e8e4a1225d04aa0121d55827e0a9a054af
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,30 @@ resources:
1818
template_path: hooks/queue/sdk_get_attributes_post_set_output.go.tpl
1919
sdk_update_pre_build_request:
2020
template_path: hooks/queue/sdk_update_pre_build_request.go.tpl
21+
print:
22+
add_age_column: true
23+
add_synced_column: true
24+
additional_columns:
25+
- name: DelaySeconds
26+
type: string
27+
json_path: .spec.delaySeconds
28+
priority: 0
29+
- name: visibilityTimeout
30+
type: string
31+
json_path: .spec.visibilityTimeout
32+
priority: 0
33+
- name: maximumMessageSize
34+
type: string
35+
json_path: .spec.maximumMessageSize
36+
priority: 1
37+
- name: messageRetentionPeriod
38+
type: string
39+
json_path: .spec.messageRetentionPeriod
40+
priority: 1
41+
- name: receiveMessageWaitTimeSeconds
42+
type: string
43+
json_path: .spec.receiveMessageWaitTimeSeconds
44+
priority: 1
2145
fields:
2246
DelaySeconds:
2347
is_attribute: true

apis/v1alpha1/queue.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/sqs.services.k8s.aws_queues.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,32 @@ spec:
1414
singular: queue
1515
scope: Namespaced
1616
versions:
17-
- name: v1alpha1
17+
- additionalPrinterColumns:
18+
- jsonPath: .spec.delaySeconds
19+
name: DelaySeconds
20+
type: string
21+
- jsonPath: .spec.maximumMessageSize
22+
name: maximumMessageSize
23+
priority: 1
24+
type: string
25+
- jsonPath: .spec.messageRetentionPeriod
26+
name: messageRetentionPeriod
27+
priority: 1
28+
type: string
29+
- jsonPath: .spec.receiveMessageWaitTimeSeconds
30+
name: receiveMessageWaitTimeSeconds
31+
priority: 1
32+
type: string
33+
- jsonPath: .spec.visibilityTimeout
34+
name: visibilityTimeout
35+
type: string
36+
- jsonPath: .status.conditions[?(@.type=="ACK.ResourceSynced")].status
37+
name: Synced
38+
type: string
39+
- jsonPath: .metadata.creationTimestamp
40+
name: Age
41+
type: date
42+
name: v1alpha1
1843
schema:
1944
openAPIV3Schema:
2045
description: Queue is the Schema for the Queues API

generator.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,30 @@ resources:
1818
template_path: hooks/queue/sdk_get_attributes_post_set_output.go.tpl
1919
sdk_update_pre_build_request:
2020
template_path: hooks/queue/sdk_update_pre_build_request.go.tpl
21+
print:
22+
add_age_column: true
23+
add_synced_column: true
24+
additional_columns:
25+
- name: DelaySeconds
26+
type: string
27+
json_path: .spec.delaySeconds
28+
priority: 0
29+
- name: visibilityTimeout
30+
type: string
31+
json_path: .spec.visibilityTimeout
32+
priority: 0
33+
- name: maximumMessageSize
34+
type: string
35+
json_path: .spec.maximumMessageSize
36+
priority: 1
37+
- name: messageRetentionPeriod
38+
type: string
39+
json_path: .spec.messageRetentionPeriod
40+
priority: 1
41+
- name: receiveMessageWaitTimeSeconds
42+
type: string
43+
json_path: .spec.receiveMessageWaitTimeSeconds
44+
priority: 1
2145
fields:
2246
DelaySeconds:
2347
is_attribute: true

helm/crds/sqs.services.k8s.aws_queues.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,32 @@ spec:
1414
singular: queue
1515
scope: Namespaced
1616
versions:
17-
- name: v1alpha1
17+
- additionalPrinterColumns:
18+
- jsonPath: .spec.delaySeconds
19+
name: DelaySeconds
20+
type: string
21+
- jsonPath: .spec.maximumMessageSize
22+
name: maximumMessageSize
23+
priority: 1
24+
type: string
25+
- jsonPath: .spec.messageRetentionPeriod
26+
name: messageRetentionPeriod
27+
priority: 1
28+
type: string
29+
- jsonPath: .spec.receiveMessageWaitTimeSeconds
30+
name: receiveMessageWaitTimeSeconds
31+
priority: 1
32+
type: string
33+
- jsonPath: .spec.visibilityTimeout
34+
name: visibilityTimeout
35+
type: string
36+
- jsonPath: .status.conditions[?(@.type=="ACK.ResourceSynced")].status
37+
name: Synced
38+
type: string
39+
- jsonPath: .metadata.creationTimestamp
40+
name: Age
41+
type: date
42+
name: v1alpha1
1843
schema:
1944
openAPIV3Schema:
2045
description: Queue is the Schema for the Queues API

0 commit comments

Comments
 (0)