SigningKey modifications to align process with SOPS

Signed-off-by: LWJ <lwjames1996@gmail.com>
This commit is contained in:
LWJ 2021-03-24 21:39:45 +00:00
parent 4aa56f1013
commit b668e99a91
4 changed files with 12 additions and 9 deletions

View File

@ -147,8 +147,8 @@ type ImageUpdateAutomationStatus struct {
// SigningKey references a Kubernetes secret that contains a GPG keypair
type SigningKey struct {
// SecretRef holds the name to a secret that contains a 'value' key
// with the ASCII Armored file (.asc) containing the GPG signing
// SecretRef holds the name to a secret that contains a 'git.asc' key
// corresponding to the ASCII Armored file containing the GPG signing
// keypair as the value. It must be in the same namespace as the
// ImageUpdateAutomation.
// +required

View File

@ -86,9 +86,9 @@ spec:
properties:
secretRef:
description: SecretRef holds the name to a secret that contains
a 'value' key with the ASCII Armored file (.asc) containing
the GPG signing keypair as the value. It must be in the
same namespace as the ImageUpdateAutomation.
a 'git.asc' key corresponding to the ASCII Armored file
containing the GPG signing keypair as the value. It must
be in the same namespace as the ImageUpdateAutomation.
properties:
name:
description: Name of the referent

View File

@ -502,9 +502,9 @@ func (r *ImageUpdateAutomationReconciler) getSigningEntity(ctx context.Context,
}
// get data from secret
data, ok := secret.Data["value"]
data, ok := secret.Data["git.asc"]
if !ok {
return nil, fmt.Errorf("signing key secret '%s' does not contain a 'value' key", secretName)
return nil, fmt.Errorf("signing key secret '%s' does not contain a 'git.asc' key", secretName)
}
// read entity from secret value

View File

@ -522,7 +522,7 @@ starting point, if it doesn&rsquo;t already exist.</p>
(<em>Appears on:</em>
<a href="#image.toolkit.fluxcd.io/v1alpha1.CommitSpec">CommitSpec</a>)
</p>
<p>SigningKey references a Kubernetes secret that contains a GPG file</p>
<p>SigningKey references a Kubernetes secret that contains a GPG keypair</p>
<div class="md-typeset__scrollwrap">
<div class="md-typeset__table">
<table>
@ -543,7 +543,10 @@ github.com/fluxcd/pkg/apis/meta.LocalObjectReference
</em>
</td>
<td>
<p>SecretRef holds the name to a secret that contains a &lsquo;value&rsquo; key with the GPG file as the value. It must be in the same namespace as the ImageUpdateAutomation.</p>
<p>SecretRef holds the name to a secret that contains a &lsquo;git.asc&rsquo; key
corresponding to the ASCII Armored file containing the GPG signing
keypair as the value. It must be in the same namespace as the
ImageUpdateAutomation.</p>
</td>
</tr>
</tbody>