Skip to content

Commit

Permalink
Merge pull request #71 from telekom/feature/print-columns
Browse files Browse the repository at this point in the history
Add Printer Columns for Layer2 and VRFs
  • Loading branch information
chdxD1 authored Oct 18, 2023
2 parents 9a34aaa + e6e830f commit 9528bbd
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
4 changes: 4 additions & 0 deletions api/v1alpha1/layer2networkconfiguration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ type Layer2NetworkConfigurationStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:shortName=layer2,scope=Cluster
//+kubebuilder:printcolumn:name="VLAN",type=integer,JSONPath=`.spec.id`
//+kubebuilder:printcolumn:name="Gateway",type=string,JSONPath=`.spec.anycastGateways`
//+kubebuilder:printcolumn:name="VRF",type=string,JSONPath=`.spec.vrf`
//+kubebuilder:printcolumn:name="VNI",type=string,JSONPath=`.spec.vni`,priority=10

// Layer2NetworkConfiguration is the Schema for the layer2networkconfigurations API.
type Layer2NetworkConfiguration struct {
Expand Down
3 changes: 3 additions & 0 deletions api/v1alpha1/vrfrouteconfiguration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ type VRFRouteConfigurationStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:shortName=vrf,scope=Cluster
//+kubebuilder:printcolumn:name="VRF",type=string,JSONPath=`.spec.vrf`
//+kubebuilder:printcolumn:name="Sequence",type=integer,JSONPath=`.spec.seq`
//+kubebuilder:printcolumn:name="Community",type=string,JSONPath=`.spec.community`

// VRFRouteConfiguration is the Schema for the vrfrouteconfigurations API.
type VRFRouteConfiguration struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,21 @@ spec:
singular: layer2networkconfiguration
scope: Cluster
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .spec.id
name: VLAN
type: integer
- jsonPath: .spec.anycastGateways
name: Gateway
type: string
- jsonPath: .spec.vrf
name: VRF
type: string
- jsonPath: .spec.vni
name: VNI
priority: 10
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: Layer2NetworkConfiguration is the Schema for the layer2networkconfigurations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@ spec:
singular: vrfrouteconfiguration
scope: Cluster
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .spec.vrf
name: VRF
type: string
- jsonPath: .spec.seq
name: Sequence
type: integer
- jsonPath: .spec.community
name: Community
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: VRFRouteConfiguration is the Schema for the vrfrouteconfigurations
Expand Down

0 comments on commit 9528bbd

Please sign in to comment.