mirror of
https://github.com/containous/traefik.git
synced 2025-01-06 13:17:52 +03:00
add printable column and fix invalid CEL rule
This commit is contained in:
parent
c11bf24789
commit
69b63fb420
@ -14,7 +14,17 @@ spec:
|
||||
singular: ingressroute
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.entryPoints
|
||||
name: EntryPoints
|
||||
type: string
|
||||
- jsonPath: .spec.routes[*].match
|
||||
name: Rule
|
||||
type: string
|
||||
- jsonPath: .spec.routes[*].middlewares[*].name
|
||||
name: Middlewares
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: IngressRoute is the CRD implementation of a Traefik HTTP Router.
|
||||
@ -238,9 +248,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@ -344,6 +351,7 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@ -360,7 +368,11 @@ spec:
|
||||
singular: ingressroutetcp
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.entryPoints
|
||||
name: EntryPoints
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: IngressRouteTCP is the CRD implementation of a Traefik TCP Router.
|
||||
@ -604,6 +616,7 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@ -620,7 +633,11 @@ spec:
|
||||
singular: ingressrouteudp
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.entryPoints
|
||||
name: EntryPoints
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: IngressRouteUDP is a CRD implementation of a Traefik UDP Router.
|
||||
@ -718,6 +735,7 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@ -1141,9 +1159,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@ -2077,7 +2092,11 @@ spec:
|
||||
singular: serverstransport
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.serverName
|
||||
name: ServerName
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
@ -2210,6 +2229,7 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@ -2226,7 +2246,14 @@ spec:
|
||||
singular: tlsoption
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.minVersion
|
||||
name: MinVersion
|
||||
type: string
|
||||
- jsonPath: .spec.maxVersion
|
||||
name: MaxVersion
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
@ -2344,6 +2371,7 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@ -2648,9 +2676,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@ -2771,9 +2796,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@ -2912,9 +2934,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
|
@ -14,7 +14,17 @@ spec:
|
||||
singular: ingressroute
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.entryPoints
|
||||
name: EntryPoints
|
||||
type: string
|
||||
- jsonPath: .spec.routes[*].match
|
||||
name: Rule
|
||||
type: string
|
||||
- jsonPath: .spec.routes[*].middlewares[*].name
|
||||
name: Middlewares
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: IngressRoute is the CRD implementation of a Traefik HTTP Router.
|
||||
@ -238,9 +248,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@ -344,3 +351,4 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
|
@ -14,7 +14,11 @@ spec:
|
||||
singular: ingressroutetcp
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.entryPoints
|
||||
name: EntryPoints
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: IngressRouteTCP is the CRD implementation of a Traefik TCP Router.
|
||||
@ -258,3 +262,4 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
|
@ -14,7 +14,11 @@ spec:
|
||||
singular: ingressrouteudp
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.entryPoints
|
||||
name: EntryPoints
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: IngressRouteUDP is a CRD implementation of a Traefik UDP Router.
|
||||
@ -112,3 +116,4 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
|
@ -421,9 +421,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
|
@ -14,7 +14,11 @@ spec:
|
||||
singular: serverstransport
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.serverName
|
||||
name: ServerName
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
@ -147,3 +151,4 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
|
@ -14,7 +14,14 @@ spec:
|
||||
singular: tlsoption
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.minVersion
|
||||
name: MinVersion
|
||||
type: string
|
||||
- jsonPath: .spec.maxVersion
|
||||
name: MaxVersion
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
@ -132,3 +139,4 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
|
@ -197,9 +197,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@ -320,9 +317,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@ -461,9 +455,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
|
@ -14,7 +14,17 @@ spec:
|
||||
singular: ingressroute
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.entryPoints
|
||||
name: EntryPoints
|
||||
type: string
|
||||
- jsonPath: .spec.routes[*].match
|
||||
name: Rule
|
||||
type: string
|
||||
- jsonPath: .spec.routes[*].middlewares[*].name
|
||||
name: Middlewares
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: IngressRoute is the CRD implementation of a Traefik HTTP Router.
|
||||
@ -238,9 +248,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@ -344,6 +351,7 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@ -360,7 +368,11 @@ spec:
|
||||
singular: ingressroutetcp
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.entryPoints
|
||||
name: EntryPoints
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: IngressRouteTCP is the CRD implementation of a Traefik TCP Router.
|
||||
@ -604,6 +616,7 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@ -620,7 +633,11 @@ spec:
|
||||
singular: ingressrouteudp
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.entryPoints
|
||||
name: EntryPoints
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: IngressRouteUDP is a CRD implementation of a Traefik UDP Router.
|
||||
@ -718,6 +735,7 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@ -1141,9 +1159,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@ -2077,7 +2092,11 @@ spec:
|
||||
singular: serverstransport
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.serverName
|
||||
name: ServerName
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
@ -2210,6 +2229,7 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@ -2226,7 +2246,14 @@ spec:
|
||||
singular: tlsoption
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.minVersion
|
||||
name: MinVersion
|
||||
type: string
|
||||
- jsonPath: .spec.maxVersion
|
||||
name: MaxVersion
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
@ -2344,6 +2371,7 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@ -2648,9 +2676,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@ -2771,9 +2796,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@ -2912,9 +2934,6 @@ spec:
|
||||
example: 10
|
||||
minimum: 0
|
||||
type: integer
|
||||
x-kubernetes-validations:
|
||||
- message: weight can only be used on TraefikService
|
||||
rule: self.kind == 'TraefikService'
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
|
@ -142,7 +142,6 @@ type LoadBalancerSpec struct {
|
||||
ServersTransport string `json:"serversTransport,omitempty"`
|
||||
// Weight defines the weight and should only be specified when Name references a TraefikService object
|
||||
// (and to be precise, one that embeds a Weighted Round Robin).
|
||||
// +kubebuilder:validation:XValidation:message="weight can only be used on TraefikService",rule="self.kind == 'TraefikService'"
|
||||
// +kubebuilder:validation:Minimum=0
|
||||
// +kubebuilder:example=10
|
||||
Weight *int `json:"weight,omitempty"`
|
||||
@ -171,9 +170,14 @@ type MiddlewareRef struct {
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="EntryPoints",type=string,JSONPath=`.spec.entryPoints`
|
||||
// +kubebuilder:printcolumn:name="Rule",type=string,JSONPath=`.spec.routes[*].match`
|
||||
// +kubebuilder:printcolumn:name="Middlewares",type=string,JSONPath=`.spec.routes[*].middlewares[*].name`
|
||||
|
||||
// IngressRoute is the CRD implementation of a Traefik HTTP Router.
|
||||
type IngressRoute struct {
|
||||
// +kubebuilder:printcolumn:name="EntryPoints",type=string,JSONPath=`.`
|
||||
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
|
@ -111,6 +111,7 @@ type ServiceTCP struct {
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="EntryPoints",type=string,JSONPath=`.spec.entryPoints`
|
||||
|
||||
// IngressRouteTCP is the CRD implementation of a Traefik TCP Router.
|
||||
type IngressRouteTCP struct {
|
||||
|
@ -53,6 +53,7 @@ type ServiceUDP struct {
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="EntryPoints",type=string,JSONPath=`.spec.entryPoints`
|
||||
|
||||
// IngressRouteUDP is a CRD implementation of a Traefik UDP Router.
|
||||
type IngressRouteUDP struct {
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="ServerName",type=string,JSONPath=`.spec.serverName`
|
||||
|
||||
// ServersTransport is the CRD implementation of a ServersTransport.
|
||||
// If no serversTransport is specified, the default@internal will be used.
|
||||
|
@ -7,6 +7,8 @@ import (
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="MinVersion",type=string,JSONPath=`.spec.minVersion`
|
||||
// +kubebuilder:printcolumn:name="MaxVersion",type=string,JSONPath=`.spec.maxVersion`
|
||||
|
||||
// TLSOption is the CRD implementation of a Traefik TLS Option, allowing to configure some parameters of the TLS connection.
|
||||
// More info: https://doc.traefik.io/traefik/v2.11/https/tls/#tls-options
|
||||
|
Loading…
Reference in New Issue
Block a user