Browse Source

#150 Fix json fields names

xxxbobrxxx 5 years ago
parent
commit
f112d45aef

+ 5 - 4
apis/externalsecrets/v1alpha1/secretstore_vault_types.go

@@ -61,8 +61,9 @@ type VaultProvider struct {
 	CABundle []byte `json:"caBundle,omitempty"`
 	CABundle []byte `json:"caBundle,omitempty"`
 }
 }
 
 
-// Configuration used to authenticate with a Vault server.
-// Only one of `tokenSecretRef`, `appRole` or `kubernetes` may be specified.
+// VaultAuth is the configuration used to authenticate with a Vault server.
+// Only one of `tokenSecretRef`, `appRole`,  `kubernetes`, `ldap` or `jwt`
+// can be specified.
 type VaultAuth struct {
 type VaultAuth struct {
 	// TokenSecretRef authenticates with Vault by presenting a token.
 	// TokenSecretRef authenticates with Vault by presenting a token.
 	// +optional
 	// +optional
@@ -145,7 +146,7 @@ type VaultLdapAuth struct {
 	// SecretRef to a key in a Secret resource containing password for the LDAP
 	// SecretRef to a key in a Secret resource containing password for the LDAP
 	// user used to authenticate with Vault using the LDAP authentication
 	// user used to authenticate with Vault using the LDAP authentication
 	// method
 	// method
-	SecretRef esmeta.SecretKeySelector `json:"tokenSecretRef,omitempty"`
+	SecretRef esmeta.SecretKeySelector `json:"secretRef,omitempty"`
 }
 }
 
 
 // VaultJwtAuth authenticates with Vault using the JWT/OIDC authentication
 // VaultJwtAuth authenticates with Vault using the JWT/OIDC authentication
@@ -158,5 +159,5 @@ type VaultJwtAuth struct {
 
 
 	// SecretRef to a key in a Secret resource containing JWT token to
 	// SecretRef to a key in a Secret resource containing JWT token to
 	// authenticate with Vault using the JWT/OIDC authentication method
 	// authenticate with Vault using the JWT/OIDC authentication method
-	SecretRef esmeta.SecretKeySelector `json:"tokenSecretRef,omitempty"`
+	SecretRef esmeta.SecretKeySelector `json:"secretRef,omitempty"`
 }
 }

+ 2 - 2
deploy/crds/external-secrets.io_clustersecretstores.yaml

@@ -197,7 +197,7 @@ spec:
                                 description: Role is a JWT role to authenticate using
                                 description: Role is a JWT role to authenticate using
                                   the JWT/OIDC Vault authentication method
                                   the JWT/OIDC Vault authentication method
                                 type: string
                                 type: string
-                              tokenSecretRef:
+                              secretRef:
                                 description: SecretRef to a key in a Secret resource
                                 description: SecretRef to a key in a Secret resource
                                   containing JWT token to authenticate with Vault
                                   containing JWT token to authenticate with Vault
                                   using the JWT/OIDC authentication method
                                   using the JWT/OIDC authentication method
@@ -293,7 +293,7 @@ spec:
                               username/password pair using the LDAP authentication
                               username/password pair using the LDAP authentication
                               method
                               method
                             properties:
                             properties:
-                              tokenSecretRef:
+                              secretRef:
                                 description: SecretRef to a key in a Secret resource
                                 description: SecretRef to a key in a Secret resource
                                   containing password for the LDAP user used to authenticate
                                   containing password for the LDAP user used to authenticate
                                   with Vault using the LDAP authentication method
                                   with Vault using the LDAP authentication method

+ 2 - 2
deploy/crds/external-secrets.io_secretstores.yaml

@@ -197,7 +197,7 @@ spec:
                                 description: Role is a JWT role to authenticate using
                                 description: Role is a JWT role to authenticate using
                                   the JWT/OIDC Vault authentication method
                                   the JWT/OIDC Vault authentication method
                                 type: string
                                 type: string
-                              tokenSecretRef:
+                              secretRef:
                                 description: SecretRef to a key in a Secret resource
                                 description: SecretRef to a key in a Secret resource
                                   containing JWT token to authenticate with Vault
                                   containing JWT token to authenticate with Vault
                                   using the JWT/OIDC authentication method
                                   using the JWT/OIDC authentication method
@@ -293,7 +293,7 @@ spec:
                               username/password pair using the LDAP authentication
                               username/password pair using the LDAP authentication
                               method
                               method
                             properties:
                             properties:
-                              tokenSecretRef:
+                              secretRef:
                                 description: SecretRef to a key in a Secret resource
                                 description: SecretRef to a key in a Secret resource
                                   containing password for the LDAP user used to authenticate
                                   containing password for the LDAP user used to authenticate
                                   with Vault using the LDAP authentication method
                                   with Vault using the LDAP authentication method

+ 5 - 4
docs/spec.md

@@ -1306,8 +1306,9 @@ resource is used as the app role secret.</p>
 <a href="#external-secrets.io/v1alpha1.VaultProvider">VaultProvider</a>)
 <a href="#external-secrets.io/v1alpha1.VaultProvider">VaultProvider</a>)
 </p>
 </p>
 <p>
 <p>
-<p>Configuration used to authenticate with a Vault server.
-Only one of <code>tokenSecretRef</code>, <code>appRole</code> or <code>kubernetes</code> may be specified.</p>
+<p>VaultAuth is the configuration used to authenticate with a Vault server.
+Only one of <code>tokenSecretRef</code>, <code>appRole</code>,  <code>kubernetes</code>, <code>ldap</code> or <code>jwt</code>
+can be specified.</p>
 </p>
 </p>
 <table>
 <table>
 <thead>
 <thead>
@@ -1424,7 +1425,7 @@ authentication method</p>
 </tr>
 </tr>
 <tr>
 <tr>
 <td>
 <td>
-<code>tokenSecretRef</code></br>
+<code>secretRef</code></br>
 <em>
 <em>
 github.com/external-secrets/external-secrets/apis/meta/v1.SecretKeySelector
 github.com/external-secrets/external-secrets/apis/meta/v1.SecretKeySelector
 </em>
 </em>
@@ -1563,7 +1564,7 @@ authentication method</p>
 </tr>
 </tr>
 <tr>
 <tr>
 <td>
 <td>
-<code>tokenSecretRef</code></br>
+<code>secretRef</code></br>
 <em>
 <em>
 github.com/external-secrets/external-secrets/apis/meta/v1.SecretKeySelector
 github.com/external-secrets/external-secrets/apis/meta/v1.SecretKeySelector
 </em>
 </em>

+ 1 - 0
go.mod

@@ -32,6 +32,7 @@ replace (
 )
 )
 
 
 require (
 require (
+	github.com/ahmetb/gen-crd-api-reference-docs v0.3.0 // indirect
 	github.com/aws/aws-sdk-go v1.38.6
 	github.com/aws/aws-sdk-go v1.38.6
 	github.com/crossplane/crossplane-runtime v0.13.0
 	github.com/crossplane/crossplane-runtime v0.13.0
 	github.com/fatih/color v1.10.0 // indirect
 	github.com/fatih/color v1.10.0 // indirect