Skip to content

Commit

Permalink
feat: remove unsupported features
Browse files Browse the repository at this point in the history
As consequence of:
 * caddyserver/caddy#6611

support for OnDemandRateLimitBurst and OnDemandRateLimitInterval has
been removed.
  • Loading branch information
mavimo committed Jan 5, 2025
1 parent c605f80 commit dd49481
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ helm install ...\
```

> You can also specify options
> for the on-demand config: `onDemandRateLimitInterval`, `onDemandRateLimitBurst` and `onDemandAsk`
> for the on-demand config: `onDemandAsk`

## Bringing Your Own Certificates
Expand Down
8 changes: 0 additions & 8 deletions charts/caddy-ingress-controller/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,6 @@
"$id": "#/properties/ingressController/properties/config/properties/onDemandTLS",
"type": "boolean"
},
"onDemandRateLimitInterval": {
"$id": "#/properties/ingressController/properties/config/properties/onDemandRateLimitInterval",
"type": "string"
},
"onDemandRateLimitBurst": {
"$id": "#/properties/ingressController/properties/config/properties/onDemandRateLimitBurst",
"type": "number"
},
"onDemandAsk": {
"$id": "#/properties/ingressController/properties/config/properties/onDemandAsk",
"type": "string"
Expand Down
2 changes: 0 additions & 2 deletions charts/caddy-ingress-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ ingressController:
proxyProtocol: false
experimentalSmartSort: false
onDemandTLS: false
# onDemandRateLimitInterval:
# onDemandRateLimitBurst:
# onDemandAsk:

loadBalancer:
Expand Down
6 changes: 1 addition & 5 deletions internal/caddy/global/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/caddyserver/caddy/v2/modules/caddytls"
"github.com/caddyserver/ingress/pkg/converter"
"github.com/caddyserver/ingress/pkg/store"
"github.com/mholt/acmez/v2/acme"
"github.com/mholt/acmez/v3/acme"
)

type ConfigMapPlugin struct{}
Expand Down Expand Up @@ -55,10 +55,6 @@ func (p ConfigMapPlugin) GlobalHandler(config *converter.Config, store *store.St
var onDemandConfig *caddytls.OnDemandConfig
if cfgMap.OnDemandTLS {
onDemandConfig = &caddytls.OnDemandConfig{
RateLimit: &caddytls.RateLimit{
Interval: cfgMap.OnDemandRateLimitInterval,
Burst: cfgMap.OnDemandRateLimitBurst,
},
Ask: cfgMap.OnDemandAsk,
}
}
Expand Down
24 changes: 11 additions & 13 deletions pkg/store/configmap_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,17 @@ import (

// ConfigMapOptions represents global options set through a configmap
type ConfigMapOptions struct {
Debug bool `json:"debug,omitempty"`
AcmeCA string `json:"acmeCA,omitempty"`
AcmeEABKeyId string `json:"acmeEABKeyId,omitempty"`
AcmeEABMacKey string `json:"acmeEABMacKey,omitempty"`
Email string `json:"email,omitempty"`
ExperimentalSmartSort bool `json:"experimentalSmartSort,omitempty"`
ProxyProtocol bool `json:"proxyProtocol,omitempty"`
Metrics bool `json:"metrics,omitempty"`
OnDemandTLS bool `json:"onDemandTLS,omitempty"`
OnDemandRateLimitInterval caddy.Duration `json:"onDemandRateLimitInterval,omitempty"`
OnDemandRateLimitBurst int `json:"onDemandRateLimitBurst,omitempty"`
OnDemandAsk string `json:"onDemandAsk,omitempty"`
OCSPCheckInterval caddy.Duration `json:"ocspCheckInterval,omitempty"`
Debug bool `json:"debug,omitempty"`
AcmeCA string `json:"acmeCA,omitempty"`
AcmeEABKeyId string `json:"acmeEABKeyId,omitempty"`
AcmeEABMacKey string `json:"acmeEABMacKey,omitempty"`
Email string `json:"email,omitempty"`
ExperimentalSmartSort bool `json:"experimentalSmartSort,omitempty"`
ProxyProtocol bool `json:"proxyProtocol,omitempty"`
Metrics bool `json:"metrics,omitempty"`
OnDemandTLS bool `json:"onDemandTLS,omitempty"`
OnDemandAsk string `json:"onDemandAsk,omitempty"`
OCSPCheckInterval caddy.Duration `json:"ocspCheckInterval,omitempty"`
}

func stringToCaddyDurationHookFunc() mapstructure.DecodeHookFunc {
Expand Down

0 comments on commit dd49481

Please sign in to comment.