Skip to content

Commit e002278

Browse files
hiddecostefanprodan
authored andcommitted
Improve comments
1 parent 55a6d58 commit e002278

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

docs/spec/v1alpha1/common.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,15 @@ const (
109109
const (
110110
// InitializingReason represents the fact that a given source is being initialized.
111111
InitializingReason string = "Initializing"
112+
112113
// URLInvalidReason represents the fact that a given source has an invalid URL.
113114
URLInvalidReason string = "URLInvalid"
115+
114116
// StorageOperationFailedReason signals a failure caused by a storage operation.
115117
StorageOperationFailedReason string = "StorageOperationFailed"
116-
// AuthenticationFailedReason represents the fact that the provided credentials are not valid.
118+
119+
// AuthenticationFailedReason represents the fact that a given secret does not
120+
// have the required fields or the provided credentials do not match.
117121
AuthenticationFailedReason string = "AuthenticationFailed"
118122
)
119123
```

docs/spec/v1alpha1/gitrepositories.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ an archive.
99
Git repository:
1010

1111
```go
12-
// GitRepositorySpec defines the desired state of GitRepository.
12+
// GitRepositorySpec defines the desired state of a Git repository.
1313
type GitRepositorySpec struct {
1414
// The repository URL, can be a HTTP or SSH address.
1515
// +kubebuilder:validation:Pattern="^(http|https|ssh)://"
1616
URL string `json:"url"`
1717

1818
// The secret name containing the Git credentials.
19+
// For HTTPS repositories the secret must contain username and password
20+
// fields.
21+
// For SSH repositories the secret must contain identity, identity.pub and
22+
// known_hosts fields.
1923
// +optional
2024
SecretRef *v1.LocalObjectReference `json:"secretRef,omitempty"`
2125

@@ -47,7 +51,7 @@ type GitRepositoryRef struct {
4751
SemVer string `json:"semver"`
4852

4953
// The git commit sha to checkout, if specified branch and tag filters will
50-
// be ignored.
54+
// ignored.
5155
// +optional
5256
Commit string `json:"commit"`
5357
}
@@ -56,7 +60,7 @@ type GitRepositoryRef struct {
5660
### Status
5761

5862
```go
59-
// GitRepositoryStatus defines the observed state of GitRepository.
63+
// GitRepositoryStatus defines the observed state of the GitRepository.
6064
type GitRepositoryStatus struct {
6165
// +optional
6266
Conditions []SourceCondition `json:"conditions,omitempty"`
@@ -79,6 +83,7 @@ const (
7983
// GitOperationSucceedReason represents the fact that the git
8084
// clone, pull and checkout operations succeeded.
8185
GitOperationSucceedReason string = "GitOperationSucceed"
86+
8287
// GitOperationFailedReason represents the fact that the git
8388
// clone, pull or checkout operations failed.
8489
GitOperationFailedReason string = "GitOperationFailed"

docs/spec/v1alpha1/helmcharts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ type HelmChartSpec struct {
2525
// +required
2626
HelmRepositoryRef v1.LocalObjectReference `json:"helmRepositoryRef"`
2727

28-
// The interval at which to check the Helm repository for updates.
29-
// Defaults to the interval of the referenced HelmRepository.
28+
// The interval at which to check the referenced HelmRepository index
29+
// for updates. Defaults to the interval of the referenced HelmRepository.
3030
// +optional
3131
Interval metav1.Duration `json:"interval,omitempty"`
3232
}

docs/spec/v1alpha1/helmrepositories.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ type HelmRepositorySpec struct {
1818

1919
// The name of the secret containing authentication credentials
2020
// for the Helm repository.
21+
// For HTTP/S basic auth the secret must contain username and password
22+
// fields.
23+
// For TLS the secret must contain caFile, keyFile and caCert fields.
2124
// +optional
2225
SecretRef *v1.LocalObjectReference `json:"secretRef,omitempty"`
2326

@@ -30,7 +33,7 @@ type HelmRepositorySpec struct {
3033
### Status
3134

3235
```go
33-
// HelmRepositoryStatus defines the observed state of HelmRepository
36+
// HelmRepositoryStatus defines the observed state of the HelmRepository.
3437
type HelmRepositoryStatus struct {
3538
// +optional
3639
Conditions []SourceCondition `json:"conditions,omitempty"`
@@ -52,6 +55,7 @@ const (
5255
// IndexationFailedReason represents the fact that the indexation
5356
// of the given Helm repository failed.
5457
IndexationFailedReason string = "IndexationFailed"
58+
5559
// IndexationSucceededReason represents the fact that the indexation
5660
// of the given Helm repository succeeded.
5761
IndexationSucceedReason string = "IndexationSucceed"

0 commit comments

Comments
 (0)