Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Fix: Change credentials -> credentialsRef
Daniel Hougaard0341c32da0e5
diff --git a/docs/integrations/platforms/kubernetes.mdx b/docs/integrations/platforms/kubernetes.mdxindex 079830f99e..29ca9c4ba7 100644--- a/docs/integrations/platforms/kubernetes.mdx+++ b/docs/integrations/platforms/kubernetes.mdx@@ -77,7 +77,7 @@ spec:projectSlug: <project-slug>envSlug: <env-slug> # "dev", "staging", "prod", etc..secretsPath: "<secrets-path>" # Root is "/"- credentials:+ credentialsRef:secretName: universal-auth-credentialssecretNamespace: default@@ -142,7 +142,7 @@ Default re-sync interval is every 1 minute.</Step><Step title="Add reference for the Kubernetes secret containing the identity credentials">- Once the secret is created, add the `secretName` and `secretNamespace` of the secret that was just created under `authentication.universalAuth.credentials` field in the InfisicalSecret resource.+ Once the secret is created, add the `secretName` and `secretNamespace` of the secret that was just created under `authentication.universalAuth.credentialsRef` field in the InfisicalSecret resource.</Step></Steps>@@ -165,7 +165,7 @@ Default re-sync interval is every 1 minute.projectSlug: <project-slug> # <-- project slugenvSlug: <env-slug> # "dev", "staging", "prod", etc..secretsPath: "<secrets-path>" # Root is "/"- credentials:+ credentialsRef:secretName: universal-auth-credentials # <-- name of the Kubernetes secret that stores our machine identity credentialssecretNamespace: default # <-- namespace of the Kubernetes secret that stores our machine identity credentials...diff --git a/k8-operator/api/v1alpha1/infisicalsecret_types.go b/k8-operator/api/v1alpha1/infisicalsecret_types.goindex bcf9697405..c29761b06f 100644--- a/k8-operator/api/v1alpha1/infisicalsecret_types.go+++ b/k8-operator/api/v1alpha1/infisicalsecret_types.go@@ -15,7 +15,7 @@ type Authentication struct {type UniversalAuthDetails struct {// +kubebuilder:validation:Required- Credentials KubeSecretReference `json:"credentials"`+ CredentialsRef KubeSecretReference `json:"credentialsRef"`// +kubebuilder:validation:RequiredSecretsScope MachineIdentityScopeInWorkspace `json:"secretsScope"`}diff --git a/k8-operator/api/v1alpha1/zz_generated.deepcopy.go b/k8-operator/api/v1alpha1/zz_generated.deepcopy.goindex aa5cb1f510..23251a194b 100644--- a/k8-operator/api/v1alpha1/zz_generated.deepcopy.go+++ b/k8-operator/api/v1alpha1/zz_generated.deepcopy.go@@ -239,7 +239,7 @@ func (in *ServiceTokenDetails) DeepCopy() *ServiceTokenDetails {// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.func (in *UniversalAuthDetails) DeepCopyInto(out *UniversalAuthDetails) {*out = *in- out.Credentials = in.Credentials+ out.CredentialsRef = in.CredentialsRefout.SecretsScope = in.SecretsScope}diff --git a/k8-operator/config/crd/bases/secrets.infisical.com_infisicalsecrets.yaml b/k8-operator/config/crd/bases/secrets.infisical.com_infisicalsecrets.yamlindex 5e24d943af..811eb96695 100644--- a/k8-operator/config/crd/bases/secrets.infisical.com_infisicalsecrets.yaml+++ b/k8-operator/config/crd/bases/secrets.infisical.com_infisicalsecrets.yaml@@ -92,7 +92,7 @@ spec:type: objectuniversalAuth:properties:- credentials:+ credentialsRef:properties:secretName:description: The name of the Kubernetes Secret@@ -119,7 +119,7 @@ spec:- secretsPathtype: objectrequired:- - credentials+ - credentialsRef- secretsScopetype: objecttype: objectdiff --git a/k8-operator/config/samples/sample.yaml b/k8-operator/config/samples/sample.yamlindex 17a804e990..3b6a928465 100644--- a/k8-operator/config/samples/sample.yaml+++ b/k8-operator/config/samples/sample.yaml@@ -43,7 +43,7 @@ spec:envSlug: <env-slug> # "dev", "staging", "prod", etc..secretsPath: "<secrets-path>" # Root is "/"- credentials:+ credentialsRef:secretName: universal-auth-credentialssecretNamespace: defaultdiff --git a/k8-operator/controllers/infisicalsecret_helper.go b/k8-operator/controllers/infisicalsecret_helper.goindex c719a6ea33..dc77525a07 100644--- a/k8-operator/controllers/infisicalsecret_helper.go+++ b/k8-operator/controllers/infisicalsecret_helper.go@@ -117,8 +117,8 @@ func (r *InfisicalSecretReconciler) GetInfisicalTokenFromKubeSecret(ctx context.func (r *InfisicalSecretReconciler) GetInfisicalUniversalAuthFromKubeSecret(ctx context.Context, infisicalSecret v1alpha1.InfisicalSecret) (machineIdentityDetails model.MachineIdentityDetails, err error) {universalAuthCredsFromKubeSecret, err := r.GetKubeSecretByNamespacedName(ctx, types.NamespacedName{- Namespace: infisicalSecret.Spec.Authentication.UniversalAuth.Credentials.SecretNamespace,- Name: infisicalSecret.Spec.Authentication.UniversalAuth.Credentials.SecretName,+ Namespace: infisicalSecret.Spec.Authentication.UniversalAuth.CredentialsRef.SecretNamespace,+ Name: infisicalSecret.Spec.Authentication.UniversalAuth.CredentialsRef.SecretName,})if errors.IsNotFound(err) {