Skip to content

Commit

Permalink
api/docs: various nits and typos
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <[email protected]>
  • Loading branch information
hiddeco committed Mar 31, 2023
1 parent f8711dc commit e56c397
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 106 deletions.
3 changes: 2 additions & 1 deletion api/v1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// Package v1 contains API Schema definitions for the kustomize.toolkit.fluxcd.io v1 API group.
// Package v1 contains API Schema definitions for the kustomize.toolkit.fluxcd.io
// v1 API group.
// +kubebuilder:object:generate=true
// +groupName=kustomize.toolkit.fluxcd.io
package v1
3 changes: 2 additions & 1 deletion api/v1/inventory_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ limitations under the License.

package v1

// ResourceInventory contains a list of Kubernetes resource object references that have been applied by a Kustomization.
// ResourceInventory contains a list of Kubernetes resource object references
// that have been applied by a Kustomization.
type ResourceInventory struct {
// Entries of Kubernetes resource object references.
Entries []ResourceRef `json:"entries"`
Expand Down
25 changes: 14 additions & 11 deletions api/v1/kustomization_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ const (
MergeValue = "merge"
)

// KustomizationSpec defines the configuration to calculate the desired state from a Source using Kustomize.
// KustomizationSpec defines the configuration to calculate the desired state
// from a Source using Kustomize.
type KustomizationSpec struct {
// CommonMetadata specifies the common labels and annotations that are applied to all resources.
// Any existing label or annotation will be overridden if its key matches a common one.
// CommonMetadata specifies the common labels and annotations that are
// applied to all resources. Any existing label or annotation will be
// overridden if its key matches a common one.
// +optional
CommonMetadata *CommonMetadata `json:"commonMetadata,omitempty"`

Expand Down Expand Up @@ -139,8 +141,8 @@ type KustomizationSpec struct {
// +optional
Force bool `json:"force,omitempty"`

// Wait instructs the controller to check the health of all the reconciled resources.
// When enabled, the HealthChecks are ignored. Defaults to false.
// Wait instructs the controller to check the health of all the reconciled
// resources. When enabled, the HealthChecks are ignored. Defaults to false.
// +optional
Wait bool `json:"wait,omitempty"`

Expand Down Expand Up @@ -176,18 +178,18 @@ type Decryption struct {
// generated by building the kustomize overlay.
type PostBuild struct {
// Substitute holds a map of key/value pairs.
// The variables defined in your YAML manifests
// that match any of the keys defined in the map
// will be substituted with the set value.
// The variables defined in your YAML manifests that match any of the keys
// defined in the map will be substituted with the set value.
// Includes support for bash string replacement functions
// e.g. ${var:=default}, ${var:position} and ${var/substring/replacement}.
// +optional
Substitute map[string]string `json:"substitute,omitempty"`

// SubstituteFrom holds references to ConfigMaps and Secrets containing
// the variables and their values to be substituted in the YAML manifests.
// The ConfigMap and the Secret data keys represent the var names and they
// must match the vars declared in the manifests for the substitution to happen.
// The ConfigMap and the Secret data keys represent the var names, and they
// must match the vars declared in the manifests for the substitution to
// happen.
// +optional
SubstituteFrom []SubstituteReference `json:"substituteFrom,omitempty"`
}
Expand Down Expand Up @@ -235,7 +237,8 @@ type KustomizationStatus struct {
// +optional
LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty"`

// Inventory contains the list of Kubernetes resource object references that have been successfully applied.
// Inventory contains the list of Kubernetes resource object references that
// have been successfully applied.
// +optional
Inventory *ResourceInventory `json:"inventory,omitempty"`
}
Expand Down
3 changes: 2 additions & 1 deletion api/v1/reference_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ type CrossNamespaceSourceReference struct {
// +required
Name string `json:"name"`

// Namespace of the referent, defaults to the namespace of the Kubernetes resource object that contains the reference.
// Namespace of the referent, defaults to the namespace of the Kubernetes
// resource object that contains the reference.
// +optional
Namespace string `json:"namespace,omitempty"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ spec:
description: SubstituteFrom holds references to ConfigMaps and
Secrets containing the variables and their values to be substituted
in the YAML manifests. The ConfigMap and the Secret data keys
represent the var names and they must match the vars declared
represent the var names, and they must match the vars declared
in the manifests for the substitution to happen.
items:
description: SubstituteReference contains a reference to a resource
Expand Down
43 changes: 25 additions & 18 deletions docs/api/v1/kustomize.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
</li>
</ul>
<h2 id="kustomize.toolkit.fluxcd.io/v1">kustomize.toolkit.fluxcd.io/v1</h2>
<p>Package v1 contains API Schema definitions for the kustomize.toolkit.fluxcd.io v1 API group.</p>
<p>Package v1 contains API Schema definitions for the kustomize.toolkit.fluxcd.io
v1 API group.</p>
Resource Types:
<ul class="simple"><li>
<a href="#kustomize.toolkit.fluxcd.io/v1.Kustomization">Kustomization</a>
Expand Down Expand Up @@ -79,8 +80,9 @@ CommonMetadata
</td>
<td>
<em>(Optional)</em>
<p>CommonMetadata specifies the common labels and annotations that are applied to all resources.
Any existing label or annotation will be overridden if its key matches a common one.</p>
<p>CommonMetadata specifies the common labels and annotations that are
applied to all resources. Any existing label or annotation will be
overridden if its key matches a common one.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -336,8 +338,8 @@ bool
</td>
<td>
<em>(Optional)</em>
<p>Wait instructs the controller to check the health of all the reconciled resources.
When enabled, the HealthChecks are ignored. Defaults to false.</p>
<p>Wait instructs the controller to check the health of all the reconciled
resources. When enabled, the HealthChecks are ignored. Defaults to false.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -477,7 +479,8 @@ string
</td>
<td>
<em>(Optional)</em>
<p>Namespace of the referent, defaults to the namespace of the Kubernetes resource object that contains the reference.</p>
<p>Namespace of the referent, defaults to the namespace of the Kubernetes
resource object that contains the reference.</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -536,7 +539,8 @@ github.com/fluxcd/pkg/apis/meta.LocalObjectReference
(<em>Appears on:</em>
<a href="#kustomize.toolkit.fluxcd.io/v1.Kustomization">Kustomization</a>)
</p>
<p>KustomizationSpec defines the configuration to calculate the desired state from a Source using Kustomize.</p>
<p>KustomizationSpec defines the configuration to calculate the desired state
from a Source using Kustomize.</p>
<div class="md-typeset__scrollwrap">
<div class="md-typeset__table">
<table>
Expand All @@ -558,8 +562,9 @@ CommonMetadata
</td>
<td>
<em>(Optional)</em>
<p>CommonMetadata specifies the common labels and annotations that are applied to all resources.
Any existing label or annotation will be overridden if its key matches a common one.</p>
<p>CommonMetadata specifies the common labels and annotations that are
applied to all resources. Any existing label or annotation will be
overridden if its key matches a common one.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -815,8 +820,8 @@ bool
</td>
<td>
<em>(Optional)</em>
<p>Wait instructs the controller to check the health of all the reconciled resources.
When enabled, the HealthChecks are ignored. Defaults to false.</p>
<p>Wait instructs the controller to check the health of all the reconciled
resources. When enabled, the HealthChecks are ignored. Defaults to false.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -928,7 +933,8 @@ ResourceInventory
</td>
<td>
<em>(Optional)</em>
<p>Inventory contains the list of Kubernetes resource object references that have been successfully applied.</p>
<p>Inventory contains the list of Kubernetes resource object references that
have been successfully applied.</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -963,9 +969,8 @@ map[string]string
<td>
<em>(Optional)</em>
<p>Substitute holds a map of key/value pairs.
The variables defined in your YAML manifests
that match any of the keys defined in the map
will be substituted with the set value.
The variables defined in your YAML manifests that match any of the keys
defined in the map will be substituted with the set value.
Includes support for bash string replacement functions
e.g. ${var:=default}, ${var:position} and ${var/substring/replacement}.</p>
</td>
Expand All @@ -983,8 +988,9 @@ e.g. ${var:=default}, ${var:position} and ${var/substring/replacement}.</p>
<em>(Optional)</em>
<p>SubstituteFrom holds references to ConfigMaps and Secrets containing
the variables and their values to be substituted in the YAML manifests.
The ConfigMap and the Secret data keys represent the var names and they
must match the vars declared in the manifests for the substitution to happen.</p>
The ConfigMap and the Secret data keys represent the var names, and they
must match the vars declared in the manifests for the substitution to
happen.</p>
</td>
</tr>
</tbody>
Expand All @@ -997,7 +1003,8 @@ must match the vars declared in the manifests for the substitution to happen.</p
(<em>Appears on:</em>
<a href="#kustomize.toolkit.fluxcd.io/v1.KustomizationStatus">KustomizationStatus</a>)
</p>
<p>ResourceInventory contains a list of Kubernetes resource object references that have been applied by a Kustomization.</p>
<p>ResourceInventory contains a list of Kubernetes resource object references
that have been applied by a Kustomization.</p>
<div class="md-typeset__scrollwrap">
<div class="md-typeset__table">
<table>
Expand Down
Loading

0 comments on commit e56c397

Please sign in to comment.