diff --git a/config/crd/bases/infra.nephio.org_repositories.yaml b/config/crd/bases/infra.nephio.org_repositories.yaml index 978b0b580..a067a7533 100644 --- a/config/crd/bases/infra.nephio.org_repositories.yaml +++ b/config/crd/bases/infra.nephio.org_repositories.yaml @@ -43,6 +43,22 @@ spec: spec: description: RepositorySpec defines the desired state of Repository properties: + org: + description: Org is the organization/owner name for the repository + type: string + provider: + default: gitea + description: Provider specifies the git provider type (gitea, github, + gitlab) + enum: + - gitea + - github + - gitlab + type: string + url: + description: URL is the base URL for the git provider API (required + for gitea, optional for github/gitlab) + type: string defaultBranch: description: DefaultBranch of the repository (used when initializes and in template) diff --git a/infra/v1alpha1/repository_types.go b/infra/v1alpha1/repository_types.go index b757e49a7..c4c02c6f2 100644 --- a/infra/v1alpha1/repository_types.go +++ b/infra/v1alpha1/repository_types.go @@ -39,6 +39,17 @@ const ( // RepositorySpec defines the desired state of Repository type RepositorySpec struct { + // Provider specifies the git provider type (gitea, github, gitlab) + // +optional + // +kubebuilder:validation:Enum=gitea;github;gitlab + // +kubebuilder:default=gitea + Provider *string `json:"provider,omitempty" yaml:"provider,omitempty"` + // URL is the base URL for the git provider API (required for gitea, optional for github/gitlab) + // +optional + URL *string `json:"url,omitempty" yaml:"url,omitempty"` + // Org is the organization/owner name for the repository + // +optional + Org *string `json:"org,omitempty" yaml:"org,omitempty"` // Lifecycle determines the deletion lifecycle policies the resource // will follow Lifecycle commonv1alpha1.Lifecycle `json:"lifecycle,omitempty"`