Add Git branch and tag to API
This commit is contained in:
parent
f740d434dc
commit
f4e568d4b9
|
@ -22,13 +22,21 @@ import (
|
||||||
|
|
||||||
// GitRepositorySpec defines the desired state of GitRepository
|
// GitRepositorySpec defines the desired state of GitRepository
|
||||||
type GitRepositorySpec struct {
|
type GitRepositorySpec struct {
|
||||||
// +kubebuilder:validation:MinLength=4
|
// +kubebuilder:validation:Pattern="^(http|https|ssh)://"
|
||||||
|
|
||||||
// The repository address
|
// The repository URL, can be a HTTP or SSH address.
|
||||||
Url string `json:"url"`
|
Url string `json:"url"`
|
||||||
|
|
||||||
// The interval at which to check for repository updates
|
// The interval at which to check for repository updates.
|
||||||
Interval metav1.Duration `json:"interval"`
|
Interval metav1.Duration `json:"interval"`
|
||||||
|
|
||||||
|
// The git branch to checkout, defaults to ('master').
|
||||||
|
// +optional
|
||||||
|
Branch string `json:"branch"`
|
||||||
|
|
||||||
|
// The git tag to checkout, takes precedence over branch.
|
||||||
|
// +optional
|
||||||
|
Tag string `json:"tag"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GitRepositoryStatus defines the observed state of GitRepository
|
// GitRepositoryStatus defines the observed state of GitRepository
|
||||||
|
|
|
@ -49,12 +49,18 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
description: GitRepositorySpec defines the desired state of GitRepository
|
description: GitRepositorySpec defines the desired state of GitRepository
|
||||||
properties:
|
properties:
|
||||||
|
branch:
|
||||||
|
description: The branch to checkout
|
||||||
|
type: string
|
||||||
interval:
|
interval:
|
||||||
description: The interval at which to check for repository updates
|
description: The interval at which to check for repository updates
|
||||||
type: string
|
type: string
|
||||||
|
tag:
|
||||||
|
description: The tag to checkout
|
||||||
|
type: string
|
||||||
url:
|
url:
|
||||||
description: The repository address
|
description: The repository address
|
||||||
minLength: 4
|
pattern: ^(http|https|ssh)://
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- interval
|
- interval
|
||||||
|
|
Loading…
Reference in New Issue