Add migration documentation for IngressClass

This commit is contained in:
Kevin Pollet 2020-07-21 18:06:04 +02:00 committed by GitHub
parent a136c46148
commit 1443c8d4c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View file

@ -320,3 +320,8 @@ Since `v2.2.5` this rule has been removed, and you should not use it anymore.
### File Provider
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.

View file

@ -18,6 +18,7 @@ rules:
- extensions
resources:
- ingresses
- ingressclasses
verbs:
- get
- list

View file

@ -13,14 +13,14 @@ import (
"github.com/patrickmn/go-cache"
)
// CertificateStore store for dynamic and static certificates.
// CertificateStore store for dynamic certificates.
type CertificateStore struct {
DynamicCerts *safe.Safe
DefaultCertificate *tls.Certificate
CertCache *cache.Cache
}
// NewCertificateStore create a store for dynamic and static certificates.
// NewCertificateStore create a store for dynamic certificates.
func NewCertificateStore() *CertificateStore {
return &CertificateStore{
DynamicCerts: &safe.Safe{},
@ -37,7 +37,7 @@ func (c CertificateStore) getDefaultCertificateDomains() []string {
x509Cert, err := x509.ParseCertificate(c.DefaultCertificate.Certificate[0])
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
}