Set default values in api objects
Signed-off-by: Philip Laine <philip.laine@xenit.se>
This commit is contained in:
parent
aa49afbd8a
commit
d67dd6cd58
|
@ -33,6 +33,7 @@ const (
|
||||||
type BucketSpec struct {
|
type BucketSpec struct {
|
||||||
// The S3 compatible storage provider name, default ('generic').
|
// The S3 compatible storage provider name, default ('generic').
|
||||||
// +kubebuilder:validation:Enum=generic;aws
|
// +kubebuilder:validation:Enum=generic;aws
|
||||||
|
// +kubebuilder:default:=generic
|
||||||
// +optional
|
// +optional
|
||||||
Provider string `json:"provider,omitempty"`
|
Provider string `json:"provider,omitempty"`
|
||||||
|
|
||||||
|
|
|
@ -49,11 +49,13 @@ type GitRepositorySpec struct {
|
||||||
Interval metav1.Duration `json:"interval"`
|
Interval metav1.Duration `json:"interval"`
|
||||||
|
|
||||||
// The timeout for remote Git operations like cloning, defaults to 20s.
|
// The timeout for remote Git operations like cloning, defaults to 20s.
|
||||||
|
// +kubebuilder:default:=20
|
||||||
// +optional
|
// +optional
|
||||||
Timeout *metav1.Duration `json:"timeout,omitempty"`
|
Timeout *metav1.Duration `json:"timeout,omitempty"`
|
||||||
|
|
||||||
// The Git reference to checkout and monitor for changes, defaults to
|
// The Git reference to checkout and monitor for changes, defaults to
|
||||||
// master branch.
|
// master branch.
|
||||||
|
// +kubebuilder:default:=master
|
||||||
// +optional
|
// +optional
|
||||||
Reference *GitRepositoryRef `json:"ref,omitempty"`
|
Reference *GitRepositoryRef `json:"ref,omitempty"`
|
||||||
|
|
||||||
|
@ -71,6 +73,7 @@ type GitRepositorySpec struct {
|
||||||
// GitRepositoryRef defines the Git ref used for pull and checkout operations.
|
// GitRepositoryRef defines the Git ref used for pull and checkout operations.
|
||||||
type GitRepositoryRef struct {
|
type GitRepositoryRef struct {
|
||||||
// The Git branch to checkout, defaults to master.
|
// The Git branch to checkout, defaults to master.
|
||||||
|
// +kubebuilder:default:=master
|
||||||
// +optional
|
// +optional
|
||||||
Branch string `json:"branch,omitempty"`
|
Branch string `json:"branch,omitempty"`
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ type HelmChartSpec struct {
|
||||||
|
|
||||||
// The chart version semver expression, ignored for charts from GitRepository
|
// The chart version semver expression, ignored for charts from GitRepository
|
||||||
// and Bucket sources. Defaults to latest when omitted.
|
// and Bucket sources. Defaults to latest when omitted.
|
||||||
|
// +kubebuilder:default:=latest
|
||||||
// +optional
|
// +optional
|
||||||
Version string `json:"version,omitempty"`
|
Version string `json:"version,omitempty"`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue