Skip to content

Commit

Permalink
docs: Remove all traces of "identity.pub" from docs
Browse files Browse the repository at this point in the history
"identity.pub" is referenced multiple times in CRDs and docs. This secret
is however never used in any place. Instead, the public key is derived from
the "identity" private key.

This commit/PR removes all traces of "identity.pub", including from older
api versions.

Signed-off-by: Alexander Block <[email protected]>
  • Loading branch information
codablock committed Apr 29, 2022
1 parent bc5a47e commit fdd4f15
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion api/v1beta1/gitrepository_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type GitRepositorySpec struct {
// The secret name containing the Git credentials.
// For HTTPS repositories the secret must contain username and password
// fields.
// For SSH repositories the secret must contain identity, identity.pub and
// For SSH repositories the secret must contain identity and
// known_hosts fields.
// +optional
SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta2/gitrepository_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type GitRepositorySpec struct {
// the GitRepository.
// For HTTPS repositories the Secret must contain 'username' and 'password'
// fields.
// For SSH repositories the Secret must contain 'identity', 'identity.pub'
// For SSH repositories the Secret must contain 'identity'
// and 'known_hosts' fields.
// +optional
SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ spec:
secretRef:
description: The secret name containing the Git credentials. For HTTPS
repositories the secret must contain username and password fields.
For SSH repositories the secret must contain identity, identity.pub
and known_hosts fields.
For SSH repositories the secret must contain identity and known_hosts
fields.
properties:
name:
description: Name of the referent.
Expand Down Expand Up @@ -493,8 +493,7 @@ spec:
description: SecretRef specifies the Secret containing authentication
credentials for the GitRepository. For HTTPS repositories the Secret
must contain 'username' and 'password' fields. For SSH repositories
the Secret must contain 'identity', 'identity.pub' and 'known_hosts'
fields.
the Secret must contain 'identity' and 'known_hosts' fields.
properties:
name:
description: Name of the referent.
Expand Down
8 changes: 4 additions & 4 deletions docs/api/source.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ github.com/fluxcd/pkg/apis/meta.LocalObjectReference
the GitRepository.
For HTTPS repositories the Secret must contain &lsquo;username&rsquo; and &lsquo;password&rsquo;
fields.
For SSH repositories the Secret must contain &lsquo;identity&rsquo;, &lsquo;identity.pub&rsquo;
For SSH repositories the Secret must contain &lsquo;identity&rsquo;
and &lsquo;known_hosts&rsquo; fields.</p>
</td>
</tr>
Expand Down Expand Up @@ -1405,7 +1405,7 @@ github.com/fluxcd/pkg/apis/meta.LocalObjectReference
the GitRepository.
For HTTPS repositories the Secret must contain &lsquo;username&rsquo; and &lsquo;password&rsquo;
fields.
For SSH repositories the Secret must contain &lsquo;identity&rsquo;, &lsquo;identity.pub&rsquo;
For SSH repositories the Secret must contain &lsquo;identity&rsquo;
and &lsquo;known_hosts&rsquo; fields.</p>
</td>
</tr>
Expand Down Expand Up @@ -1630,8 +1630,8 @@ Artifact
<td>
<code>includedArtifacts</code><br>
<em>
<a href="#source.toolkit.fluxcd.io/v1beta2.*./api/v1beta2.Artifact">
[]*./api/v1beta2.Artifact
<a href="#source.toolkit.fluxcd.io/v1beta2.*github.com/fluxcd/source-controller/api/v1beta2.Artifact">
[]*github.com/fluxcd/source-controller/api/v1beta2.Artifact
</a>
</em>
</td>
Expand Down
4 changes: 1 addition & 3 deletions docs/spec/v1alpha1/gitrepositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type GitRepositorySpec struct {
// The secret name containing the Git credentials.
// For HTTPS repositories the secret must contain username and password
// fields.
// For SSH repositories the secret must contain identity, identity.pub and
// For SSH repositories the secret must contain identity and
// known_hosts fields.
// +optional
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
Expand Down Expand Up @@ -281,7 +281,6 @@ metadata:
type: Opaque
data:
identity: <BASE64>
identity.pub: <BASE64>
known_hosts: <BASE64>
```

Expand All @@ -296,7 +295,6 @@ ssh-keyscan github.com > ./known_hosts
kubectl create secret generic ssh-credentials \
--from-file=./identity \
--from-file=./identity.pub \
--from-file=./known_hosts
```

Expand Down
5 changes: 1 addition & 4 deletions docs/spec/v1beta1/gitrepositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type GitRepositorySpec struct {
// The secret name containing the Git credentials.
// For HTTPS repositories the secret must contain username and password
// fields.
// For SSH repositories the secret must contain identity, identity.pub and
// For SSH repositories the secret must contain identity and
// known_hosts fields.
// +optional
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
Expand Down Expand Up @@ -415,7 +415,6 @@ metadata:
type: Opaque
data:
identity: <BASE64>
identity.pub: <BASE64>
known_hosts: <BASE64>
```

Expand All @@ -430,7 +429,6 @@ ssh-keyscan github.com > ./known_hosts
kubectl create secret generic ssh-credentials \
--from-file=./identity \
--from-file=./identity.pub \
--from-file=./known_hosts
```

Expand All @@ -440,7 +438,6 @@ you can specify it in the Kubernetes secret under the `password` key:
```sh
kubectl create secret generic ssh-credentials \
--from-file=./identity \
--from-file=./identity.pub \
--from-file=./known_hosts \
--from-literal=password=<passphrase>
```
Expand Down
6 changes: 2 additions & 4 deletions docs/spec/v1beta2/gitrepositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,8 @@ data:
#### SSH authentication

To authenticate towards a Git repository over SSH, the referenced Secret is
expected to contain `.data.identity`, `.data.identity.pub` and `known_hosts`
fields. With the respective private and public key of the SSH key pair, and the
host keys of the Git repository.
expected to contain `.data.identity` and `known_hosts` fields. With the respective
private key of the SSH key pair, and the host keys of the Git repository.

```yaml
---
Expand All @@ -165,7 +164,6 @@ metadata:
type: Opaque
data:
identity: <BASE64>
identity.pub: <BASE64>
known_hosts: <BASE64>
```

Expand Down

0 comments on commit fdd4f15

Please sign in to comment.