Skip to content

Commit 47e4b4d

Browse files
authored
Changes to ingress config (#33)
- Remove unused ingress path type routing - Add traefik additionalRuleNames
1 parent a83af0d commit 47e4b4d

File tree

4 files changed

+23
-45
lines changed

4 files changed

+23
-45
lines changed

api/v1/qdrantcluster_types.go

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -513,13 +513,6 @@ func (c *QdrantConfigurationTLS) GetKey() *QdrantSecretKeyRef {
513513
return c.Key
514514
}
515515

516-
type IngressType string
517-
518-
const (
519-
TypePath IngressType = "path"
520-
TypeHost IngressType = "host"
521-
)
522-
523516
type Ingress struct {
524517
// Enabled specifies whether to enable ingress for the cluster or not.
525518
// +optional
@@ -530,11 +523,6 @@ type Ingress struct {
530523
// IngressClassName specifies the name of the ingress class
531524
// +optional
532525
IngressClassName *string `json:"ingressClassName,omitempty"`
533-
// Type specifies whether it is path or host based routing.
534-
// +kubebuilder:default="path"
535-
// +kubebuilder:validation:Enum=path;host
536-
// +optional
537-
Type *IngressType `json:"type,omitempty"`
538526
// Host specifies the host for the ingress.
539527
// +optional
540528
Host string `json:"host,omitempty"`
@@ -577,13 +565,6 @@ func (i *Ingress) GetTls(def bool) bool {
577565
return *i.TLS
578566
}
579567

580-
func (i *Ingress) GetType() IngressType {
581-
if i == nil || i.Type == nil {
582-
return TypePath
583-
}
584-
return *i.Type
585-
}
586-
587568
func (i *Ingress) GetNGINX() *NGINXConfig {
588569
if i == nil {
589570
return nil
@@ -625,6 +606,9 @@ type TraefikConfig struct {
625606
// AllowedSourceRanges specifies the allowed CIDR source ranges for the ingress.
626607
// +optional
627608
AllowedSourceRanges []string `json:"allowedSourceRanges,omitempty"`
609+
// AdditionalRuleNames specifies additional rule names for the ingress route. The actual rules can be configured in the operator settings.
610+
// +optional
611+
AdditionalRuleNames []string `json:"additionalRuleNames,omitempty"`
628612
}
629613

630614
func (c *TraefikConfig) GetAllowedSourceRanges() []string {
@@ -634,6 +618,13 @@ func (c *TraefikConfig) GetAllowedSourceRanges() []string {
634618
return c.AllowedSourceRanges
635619
}
636620

621+
func (c *TraefikConfig) GetAdditionalRuleNames() []string {
622+
if c == nil {
623+
return nil
624+
}
625+
return c.AdditionalRuleNames
626+
}
627+
637628
type StorageClassNames struct {
638629
// DB specifies the storage class name for db volume.
639630
// +optional

api/v1/zz_generated.deepcopy.go

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

charts/qdrant-kubernetes-api/templates/region-crds/qdrant.io_qdrantclusters.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -323,20 +323,20 @@ spec:
323323
traefik:
324324
description: Traefik specifies the traefik ingress specific configurations.
325325
properties:
326+
additionalRuleNames:
327+
description: AdditionalRuleNames specifies additional rule
328+
names for the ingress route. The actual rules can be configured
329+
in the operator settings.
330+
items:
331+
type: string
332+
type: array
326333
allowedSourceRanges:
327334
description: AllowedSourceRanges specifies the allowed CIDR
328335
source ranges for the ingress.
329336
items:
330337
type: string
331338
type: array
332339
type: object
333-
type:
334-
default: path
335-
description: Type specifies whether it is path or host based routing.
336-
enum:
337-
- path
338-
- host
339-
type: string
340340
type: object
341341
nodeSelector:
342342
additionalProperties:

docs/api.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,27 +122,13 @@ _Appears in:_
122122
| `enabled` _boolean_ | Enabled specifies whether to enable ingress for the cluster or not. | | |
123123
| `annotations` _object (keys:string, values:string)_ | Annotations specifies annotations for the ingress. | | |
124124
| `ingressClassName` _string_ | IngressClassName specifies the name of the ingress class | | |
125-
| `type` _[IngressType](#ingresstype)_ | Type specifies whether it is path or host based routing. | path | Enum: [path host] <br /> |
126125
| `host` _string_ | Host specifies the host for the ingress. | | |
127126
| `tls` _boolean_ | TLS specifies whether to enable tls for the ingress.<br />The default depends on the ingress provider:<br />- KubernetesIngress: False<br />- NginxIngress: False<br />- QdrantCloudTraefik: Depending on the config.tls setting of the operator. | | |
128127
| `tlsSecretName` _string_ | TLSSecretName specifies the name of the secret containing the tls certificate. | | |
129128
| `nginx` _[NGINXConfig](#nginxconfig)_ | NGINX specifies the nginx ingress specific configurations. | | |
130129
| `traefik` _[TraefikConfig](#traefikconfig)_ | Traefik specifies the traefik ingress specific configurations. | | |
131130

132131

133-
#### IngressType
134-
135-
_Underlying type:_ _string_
136-
137-
138-
139-
140-
141-
_Appears in:_
142-
- [Ingress](#ingress)
143-
144-
145-
146132
#### KubernetesDistribution
147133

148134
_Underlying type:_ _string_
@@ -1053,6 +1039,7 @@ _Appears in:_
10531039
| Field | Description | Default | Validation |
10541040
| --- | --- | --- | --- |
10551041
| `allowedSourceRanges` _string array_ | AllowedSourceRanges specifies the allowed CIDR source ranges for the ingress. | | |
1042+
| `additionalRuleNames` _string array_ | AdditionalRuleNames specifies additional rule names for the ingress route. The actual rules can be configured in the operator settings. | | |
10561043

10571044

10581045
#### VolumeSnapshotInfo

0 commit comments

Comments
 (0)