mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Fix: Change credentials -> credentialsRef
This commit is contained in:
@@ -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-credentials
|
||||
secretNamespace: 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 slug
|
||||
envSlug: <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 credentials
|
||||
secretNamespace: default # <-- namespace of the Kubernetes secret that stores our machine identity credentials
|
||||
...
|
||||
|
||||
@@ -15,7 +15,7 @@ type Authentication struct {
|
||||
|
||||
type UniversalAuthDetails struct {
|
||||
// +kubebuilder:validation:Required
|
||||
Credentials KubeSecretReference `json:"credentials"`
|
||||
CredentialsRef KubeSecretReference `json:"credentialsRef"`
|
||||
// +kubebuilder:validation:Required
|
||||
SecretsScope MachineIdentityScopeInWorkspace `json:"secretsScope"`
|
||||
}
|
||||
|
||||
@@ -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.CredentialsRef
|
||||
out.SecretsScope = in.SecretsScope
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ spec:
|
||||
type: object
|
||||
universalAuth:
|
||||
properties:
|
||||
credentials:
|
||||
credentialsRef:
|
||||
properties:
|
||||
secretName:
|
||||
description: The name of the Kubernetes Secret
|
||||
@@ -119,7 +119,7 @@ spec:
|
||||
- secretsPath
|
||||
type: object
|
||||
required:
|
||||
- credentials
|
||||
- credentialsRef
|
||||
- secretsScope
|
||||
type: object
|
||||
type: object
|
||||
|
||||
@@ -43,7 +43,7 @@ spec:
|
||||
envSlug: <env-slug> # "dev", "staging", "prod", etc..
|
||||
secretsPath: "<secrets-path>" # Root is "/"
|
||||
|
||||
credentials:
|
||||
credentialsRef:
|
||||
secretName: universal-auth-credentials
|
||||
secretNamespace: default
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user