Improve comments
This commit is contained in:
parent
55a6d5811e
commit
e002278e35
|
@ -109,11 +109,15 @@ const (
|
||||||
const (
|
const (
|
||||||
// InitializingReason represents the fact that a given source is being initialized.
|
// InitializingReason represents the fact that a given source is being initialized.
|
||||||
InitializingReason string = "Initializing"
|
InitializingReason string = "Initializing"
|
||||||
|
|
||||||
// URLInvalidReason represents the fact that a given source has an invalid URL.
|
// URLInvalidReason represents the fact that a given source has an invalid URL.
|
||||||
URLInvalidReason string = "URLInvalid"
|
URLInvalidReason string = "URLInvalid"
|
||||||
|
|
||||||
// StorageOperationFailedReason signals a failure caused by a storage operation.
|
// StorageOperationFailedReason signals a failure caused by a storage operation.
|
||||||
StorageOperationFailedReason string = "StorageOperationFailed"
|
StorageOperationFailedReason string = "StorageOperationFailed"
|
||||||
// AuthenticationFailedReason represents the fact that the provided credentials are not valid.
|
|
||||||
|
// AuthenticationFailedReason represents the fact that a given secret does not
|
||||||
|
// have the required fields or the provided credentials do not match.
|
||||||
AuthenticationFailedReason string = "AuthenticationFailed"
|
AuthenticationFailedReason string = "AuthenticationFailed"
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
|
@ -9,13 +9,17 @@ an archive.
|
||||||
Git repository:
|
Git repository:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
// GitRepositorySpec defines the desired state of GitRepository.
|
// GitRepositorySpec defines the desired state of a Git repository.
|
||||||
type GitRepositorySpec struct {
|
type GitRepositorySpec struct {
|
||||||
// The repository URL, can be a HTTP or SSH address.
|
// The repository URL, can be a HTTP or SSH address.
|
||||||
// +kubebuilder:validation:Pattern="^(http|https|ssh)://"
|
// +kubebuilder:validation:Pattern="^(http|https|ssh)://"
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
|
|
||||||
// The secret name containing the Git credentials.
|
// 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.
|
||||||
// +optional
|
// +optional
|
||||||
SecretRef *v1.LocalObjectReference `json:"secretRef,omitempty"`
|
SecretRef *v1.LocalObjectReference `json:"secretRef,omitempty"`
|
||||||
|
|
||||||
|
@ -47,7 +51,7 @@ type GitRepositoryRef struct {
|
||||||
SemVer string `json:"semver"`
|
SemVer string `json:"semver"`
|
||||||
|
|
||||||
// The git commit sha to checkout, if specified branch and tag filters will
|
// The git commit sha to checkout, if specified branch and tag filters will
|
||||||
// be ignored.
|
// ignored.
|
||||||
// +optional
|
// +optional
|
||||||
Commit string `json:"commit"`
|
Commit string `json:"commit"`
|
||||||
}
|
}
|
||||||
|
@ -56,7 +60,7 @@ type GitRepositoryRef struct {
|
||||||
### Status
|
### Status
|
||||||
|
|
||||||
```go
|
```go
|
||||||
// GitRepositoryStatus defines the observed state of GitRepository.
|
// GitRepositoryStatus defines the observed state of the GitRepository.
|
||||||
type GitRepositoryStatus struct {
|
type GitRepositoryStatus struct {
|
||||||
// +optional
|
// +optional
|
||||||
Conditions []SourceCondition `json:"conditions,omitempty"`
|
Conditions []SourceCondition `json:"conditions,omitempty"`
|
||||||
|
@ -79,6 +83,7 @@ const (
|
||||||
// GitOperationSucceedReason represents the fact that the git
|
// GitOperationSucceedReason represents the fact that the git
|
||||||
// clone, pull and checkout operations succeeded.
|
// clone, pull and checkout operations succeeded.
|
||||||
GitOperationSucceedReason string = "GitOperationSucceed"
|
GitOperationSucceedReason string = "GitOperationSucceed"
|
||||||
|
|
||||||
// GitOperationFailedReason represents the fact that the git
|
// GitOperationFailedReason represents the fact that the git
|
||||||
// clone, pull or checkout operations failed.
|
// clone, pull or checkout operations failed.
|
||||||
GitOperationFailedReason string = "GitOperationFailed"
|
GitOperationFailedReason string = "GitOperationFailed"
|
||||||
|
|
|
@ -25,8 +25,8 @@ type HelmChartSpec struct {
|
||||||
// +required
|
// +required
|
||||||
HelmRepositoryRef v1.LocalObjectReference `json:"helmRepositoryRef"`
|
HelmRepositoryRef v1.LocalObjectReference `json:"helmRepositoryRef"`
|
||||||
|
|
||||||
// The interval at which to check the Helm repository for updates.
|
// The interval at which to check the referenced HelmRepository index
|
||||||
// Defaults to the interval of the referenced HelmRepository.
|
// for updates. Defaults to the interval of the referenced HelmRepository.
|
||||||
// +optional
|
// +optional
|
||||||
Interval metav1.Duration `json:"interval,omitempty"`
|
Interval metav1.Duration `json:"interval,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,9 @@ type HelmRepositorySpec struct {
|
||||||
|
|
||||||
// The name of the secret containing authentication credentials
|
// The name of the secret containing authentication credentials
|
||||||
// for the Helm repository.
|
// for the Helm repository.
|
||||||
|
// For HTTP/S basic auth the secret must contain username and password
|
||||||
|
// fields.
|
||||||
|
// For TLS the secret must contain caFile, keyFile and caCert fields.
|
||||||
// +optional
|
// +optional
|
||||||
SecretRef *v1.LocalObjectReference `json:"secretRef,omitempty"`
|
SecretRef *v1.LocalObjectReference `json:"secretRef,omitempty"`
|
||||||
|
|
||||||
|
@ -30,7 +33,7 @@ type HelmRepositorySpec struct {
|
||||||
### Status
|
### Status
|
||||||
|
|
||||||
```go
|
```go
|
||||||
// HelmRepositoryStatus defines the observed state of HelmRepository
|
// HelmRepositoryStatus defines the observed state of the HelmRepository.
|
||||||
type HelmRepositoryStatus struct {
|
type HelmRepositoryStatus struct {
|
||||||
// +optional
|
// +optional
|
||||||
Conditions []SourceCondition `json:"conditions,omitempty"`
|
Conditions []SourceCondition `json:"conditions,omitempty"`
|
||||||
|
@ -52,6 +55,7 @@ const (
|
||||||
// IndexationFailedReason represents the fact that the indexation
|
// IndexationFailedReason represents the fact that the indexation
|
||||||
// of the given Helm repository failed.
|
// of the given Helm repository failed.
|
||||||
IndexationFailedReason string = "IndexationFailed"
|
IndexationFailedReason string = "IndexationFailed"
|
||||||
|
|
||||||
// IndexationSucceededReason represents the fact that the indexation
|
// IndexationSucceededReason represents the fact that the indexation
|
||||||
// of the given Helm repository succeeded.
|
// of the given Helm repository succeeded.
|
||||||
IndexationSucceedReason string = "IndexationSucceed"
|
IndexationSucceedReason string = "IndexationSucceed"
|
||||||
|
|
Loading…
Reference in New Issue