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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to ingress config - Remove unused ingress path type routing - Add traefik additionalRuleNames #33

Merged
merged 1 commit into from
Oct 23, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 10 additions & 19 deletions api/v1/qdrantcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,6 @@ func (c *QdrantConfigurationTLS) GetKey() *QdrantSecretKeyRef {
return c.Key
}

type IngressType string

const (
TypePath IngressType = "path"
TypeHost IngressType = "host"
)

type Ingress struct {
// Enabled specifies whether to enable ingress for the cluster or not.
// +optional
Expand All @@ -530,11 +523,6 @@ type Ingress struct {
// IngressClassName specifies the name of the ingress class
// +optional
IngressClassName *string `json:"ingressClassName,omitempty"`
// Type specifies whether it is path or host based routing.
// +kubebuilder:default="path"
// +kubebuilder:validation:Enum=path;host
// +optional
Type *IngressType `json:"type,omitempty"`
// Host specifies the host for the ingress.
// +optional
Host string `json:"host,omitempty"`
Expand Down Expand Up @@ -577,13 +565,6 @@ func (i *Ingress) GetTls(def bool) bool {
return *i.TLS
}

func (i *Ingress) GetType() IngressType {
if i == nil || i.Type == nil {
return TypePath
}
return *i.Type
}

func (i *Ingress) GetNGINX() *NGINXConfig {
if i == nil {
return nil
Expand Down Expand Up @@ -625,6 +606,9 @@ type TraefikConfig struct {
// AllowedSourceRanges specifies the allowed CIDR source ranges for the ingress.
// +optional
AllowedSourceRanges []string `json:"allowedSourceRanges,omitempty"`
// AdditionalRuleNames specifies additional rule names for the ingress route. The actual rules can be configured in the operator settings.
// +optional
AdditionalRuleNames []string `json:"additionalRuleNames,omitempty"`
}

func (c *TraefikConfig) GetAllowedSourceRanges() []string {
Expand All @@ -634,6 +618,13 @@ func (c *TraefikConfig) GetAllowedSourceRanges() []string {
return c.AllowedSourceRanges
}

func (c *TraefikConfig) GetAdditionalRuleNames() []string {
if c == nil {
return nil
}
return c.AdditionalRuleNames
}

type StorageClassNames struct {
// DB specifies the storage class name for db volume.
// +optional
Expand Down
10 changes: 5 additions & 5 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -323,20 +323,20 @@ spec:
traefik:
description: Traefik specifies the traefik ingress specific configurations.
properties:
additionalRuleNames:
description: AdditionalRuleNames specifies additional rule
names for the ingress route. The actual rules can be configured
in the operator settings.
items:
type: string
type: array
allowedSourceRanges:
description: AllowedSourceRanges specifies the allowed CIDR
source ranges for the ingress.
items:
type: string
type: array
type: object
type:
default: path
description: Type specifies whether it is path or host based routing.
enum:
- path
- host
type: string
type: object
nodeSelector:
additionalProperties:
Expand Down
15 changes: 1 addition & 14 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,27 +122,13 @@ _Appears in:_
| `enabled` _boolean_ | Enabled specifies whether to enable ingress for the cluster or not. | | |
| `annotations` _object (keys:string, values:string)_ | Annotations specifies annotations for the ingress. | | |
| `ingressClassName` _string_ | IngressClassName specifies the name of the ingress class | | |
| `type` _[IngressType](#ingresstype)_ | Type specifies whether it is path or host based routing. | path | Enum: [path host] <br /> |
| `host` _string_ | Host specifies the host for the ingress. | | |
| `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. | | |
| `tlsSecretName` _string_ | TLSSecretName specifies the name of the secret containing the tls certificate. | | |
| `nginx` _[NGINXConfig](#nginxconfig)_ | NGINX specifies the nginx ingress specific configurations. | | |
| `traefik` _[TraefikConfig](#traefikconfig)_ | Traefik specifies the traefik ingress specific configurations. | | |


#### IngressType

_Underlying type:_ _string_





_Appears in:_
- [Ingress](#ingress)



#### KubernetesDistribution

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


#### VolumeSnapshotInfo
Expand Down
Loading