Add migration documentation for IngressClass
This commit is contained in:
parent
a136c46148
commit
1443c8d4c6
3 changed files with 9 additions and 3 deletions
|
@ -320,3 +320,8 @@ Since `v2.2.5` this rule has been removed, and you should not use it anymore.
|
||||||
### File Provider
|
### File Provider
|
||||||
|
|
||||||
The file parser has been changed, since v2.3 the unknown options/fields in a dynamic configuration file are treated as errors.
|
The file parser has been changed, since v2.3 the unknown options/fields in a dynamic configuration file are treated as errors.
|
||||||
|
|
||||||
|
### IngressClass
|
||||||
|
|
||||||
|
In `v2.3`, the support of `IngressClass`, which is available since Kubernetes version `1.18`, has been introduced.
|
||||||
|
In order to be able to use this new resource the [Kubernetes RBAC](../reference/dynamic-configuration/kubernetes-crd.md#rbac) must be updated.
|
||||||
|
|
|
@ -18,6 +18,7 @@ rules:
|
||||||
- extensions
|
- extensions
|
||||||
resources:
|
resources:
|
||||||
- ingresses
|
- ingresses
|
||||||
|
- ingressclasses
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
|
|
|
@ -13,14 +13,14 @@ import (
|
||||||
"github.com/patrickmn/go-cache"
|
"github.com/patrickmn/go-cache"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CertificateStore store for dynamic and static certificates.
|
// CertificateStore store for dynamic certificates.
|
||||||
type CertificateStore struct {
|
type CertificateStore struct {
|
||||||
DynamicCerts *safe.Safe
|
DynamicCerts *safe.Safe
|
||||||
DefaultCertificate *tls.Certificate
|
DefaultCertificate *tls.Certificate
|
||||||
CertCache *cache.Cache
|
CertCache *cache.Cache
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewCertificateStore create a store for dynamic and static certificates.
|
// NewCertificateStore create a store for dynamic certificates.
|
||||||
func NewCertificateStore() *CertificateStore {
|
func NewCertificateStore() *CertificateStore {
|
||||||
return &CertificateStore{
|
return &CertificateStore{
|
||||||
DynamicCerts: &safe.Safe{},
|
DynamicCerts: &safe.Safe{},
|
||||||
|
@ -37,7 +37,7 @@ func (c CertificateStore) getDefaultCertificateDomains() []string {
|
||||||
|
|
||||||
x509Cert, err := x509.ParseCertificate(c.DefaultCertificate.Certificate[0])
|
x509Cert, err := x509.ParseCertificate(c.DefaultCertificate.Certificate[0])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithoutContext().Errorf("Could not parse default certicate: %v", err)
|
log.WithoutContext().Errorf("Could not parse default certificate: %v", err)
|
||||||
return allCerts
|
return allCerts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue