From 4b9e57ae61a36f2b514a0f177d27d4881d08dc4b Mon Sep 17 00:00:00 2001 From: = Date: Fri, 1 Aug 2025 21:10:26 +0530 Subject: [PATCH] feat: review changes for reptile --- .../samples/crd/infisicalsecret/infisicalSecretCrd.yaml | 7 +++++++ k8-operator/packages/util/auth.go | 2 +- k8-operator/packages/util/kubernetes.go | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/k8-operator/config/samples/crd/infisicalsecret/infisicalSecretCrd.yaml b/k8-operator/config/samples/crd/infisicalsecret/infisicalSecretCrd.yaml index 1a7a3482d..f5209e71c 100644 --- a/k8-operator/config/samples/crd/infisicalsecret/infisicalSecretCrd.yaml +++ b/k8-operator/config/samples/crd/infisicalsecret/infisicalSecretCrd.yaml @@ -71,6 +71,13 @@ spec: secretName: # ldap-auth-credentials secretNamespace: # default + # secretsScope is identical to the secrets scope in the universalAuth field in this sample. + secretsScope: + projectSlug: your-project-slug + envSlug: prod + secretsPath: "/path" + recursive: true + # Azure Auth azureAuth: identityId: diff --git a/k8-operator/packages/util/auth.go b/k8-operator/packages/util/auth.go index f3512027e..ab5802d61 100644 --- a/k8-operator/packages/util/auth.go +++ b/k8-operator/packages/util/auth.go @@ -223,7 +223,7 @@ func HandleLdapAuth(ctx context.Context, reconcilerClient client.Client, secretC } ldapAuthSpec = v1alpha1.LdapAuthDetails{ - CredentialsRef: infisicalDynamicSecret.Spec.Authentication.UniversalAuth.CredentialsRef, + CredentialsRef: infisicalDynamicSecret.Spec.Authentication.LdapAuth.CredentialsRef, SecretsScope: v1alpha1.MachineIdentityScopeInWorkspace{}, IdentityID: infisicalDynamicSecret.Spec.Authentication.LdapAuth.IdentityID, } diff --git a/k8-operator/packages/util/kubernetes.go b/k8-operator/packages/util/kubernetes.go index 5ad3d4137..67d049e29 100644 --- a/k8-operator/packages/util/kubernetes.go +++ b/k8-operator/packages/util/kubernetes.go @@ -81,7 +81,7 @@ func GetInfisicalLdapAuthFromKubeSecret(ctx context.Context, reconcilerClient cl } usernameFromSecret := ldapAuthCredsFromKubeSecret.Data[INFISICAL_MACHINE_IDENTITY_LDAP_USERNAME] - passwordFromSecret := ldapAuthCredsFromKubeSecret.Data[INFISICAL_MACHINE_IDENTITY_LDAP_PASSSWORD] + passwordFromSecret := ldapAuthCredsFromKubeSecret.Data[INFISICAL_MACHINE_IDENTITY_LDAP_PASSWORD] return model.LdapIdentityDetails{Username: string(usernameFromSecret), Password: string(passwordFromSecret)}, nil