From a6e0e02a0b211dc6ef243a685b40dcc1bb2c07cf Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 27 Jun 2022 17:32:24 +0200 Subject: [PATCH] [DOWNSTEAM-ONLY] Bug 2098562: fix build failure related to VaultTenantSA.createToken Pull-Request #99 backported a commit that applies cleanly, but causes a build failure: internal/kms/vault_sa.go:313:12: kms.createToken undefined (type *VaultTenantSA has no field or method createToken) internal/kms/vault_sa.go:344:12: undefined: vaultTenantSA In recent versions, `vaultTenantSA` is used, but release-4.10 is stuck on the old naming of `VaultTenantSA`. The unexporting was done in upstream ceph/ceph-csi#2750, which includes more changes than what we want in a backport. Signed-off-by: Niels de Vos --- internal/kms/vault_sa.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/kms/vault_sa.go b/internal/kms/vault_sa.go index b716e24c421..949f1f518c1 100644 --- a/internal/kms/vault_sa.go +++ b/internal/kms/vault_sa.go @@ -341,7 +341,7 @@ func (kms *VaultTenantSA) getTokenPath() (string, error) { // automatically created. Hence, use the create token api to fetch it. // refer: https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.24.md \ // #no-really-you-must-read-this-before-you-upgrade-1 . -func (kms *vaultTenantSA) createToken(sa *corev1.ServiceAccount, client *kubernetes.Clientset) (string, error) { +func (kms *VaultTenantSA) createToken(sa *corev1.ServiceAccount, client *kubernetes.Clientset) (string, error) { major, minor, err := k8s.GetServerVersion(client) if err != nil { return "", fmt.Errorf("failed to get server version: %w", err)