From 1443c8d4c6b028a2d3cc6aa406d50a64dda21984 Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Tue, 21 Jul 2020 18:06:04 +0200 Subject: [PATCH] Add migration documentation for IngressClass --- docs/content/migration/v2.md | 5 +++++ .../reference/dynamic-configuration/kubernetes-crd-rbac.yml | 1 + pkg/tls/certificate_store.go | 6 +++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/content/migration/v2.md b/docs/content/migration/v2.md index c6fd2d983..f8ced1a5e 100644 --- a/docs/content/migration/v2.md +++ b/docs/content/migration/v2.md @@ -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. diff --git a/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml b/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml index 3e7337031..88b788089 100644 --- a/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml +++ b/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml @@ -18,6 +18,7 @@ rules: - extensions resources: - ingresses + - ingressclasses verbs: - get - list diff --git a/pkg/tls/certificate_store.go b/pkg/tls/certificate_store.go index 9958e8641..524a5cdba 100644 --- a/pkg/tls/certificate_store.go +++ b/pkg/tls/certificate_store.go @@ -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 }