weebo-forgejo

ForgejoRepository

A Forgejo repository, owned by a ForgejoOrganization or a ForgejoUser.

  • API version: forgejo.weebo.io/v1alpha1
  • Scope: Namespaced
  • Short names: fjrepo
  • Guide: Repositories

A Forgejo repository, owned by a ForgejoOrganization or a ForgejoUser. Created empty (optionally initialized), from a template repository, or by migrating/mirroring a remote.

Set exactly one of organizationRef/userRef, at most one of init/fromTemplate/migrate, and exactly one of fromTemplate.repositoryRef/fromTemplate.repository; anything else reports InvalidSpec.

Example

apiVersion: forgejo.weebo.io/v1alpha1
kind: ForgejoRepository
metadata:
  name: my-repository
  namespace: team-a
spec:
  organizationRef:
    name: weebo
  name: app
  private: true
  init:
    readme: Default

Spec fields

FieldTypeRequiredDefaultDescription
archivedbooleannofalseArchived repositories are read-only; their settings, branch protections and teams are left alone until unarchived.
branchProtectionsobject[]noBranch protection rules. Unset: the repository's rules are left alone (those copied from a template, or set in Forgejo). Set: authoritative — a rule not listed here is deleted, and [] deletes them all.
defaultBranchstringno
deletionPolicystringno"Orphan"Defaults to Orphan: deleting the CR never deletes git history.
descriptionstringno
fromTemplateobjectnoGenerate the repository from a template repository: a ForgejoRepository in the same namespace, or any Forgejo template by name (gated by the namespace policy's allowedTemplates). Creation-time only.
initobjectnoCreation-time initialization of an empty repository.
instanceRefobjectnoThe ForgejoInstance or ForgejoLocalInstance this object lives on. Unset: the cluster's only ForgejoInstance, else the only ForgejoLocalInstance of this namespace.
isTemplatebooleannofalseMark the repository as a template others can be generated from.
migrateobjectnoMigrate (or pull-mirror) a remote repository. Creation-time only, except mirrorInterval, which stays in sync.
namestringyesRepository name. Changing it renames in place (Forgejo keeps a redirect from the old name). Changing the owner transfers the repository, which needs the forgejo.weebo.io/allow-disruptive-update: "true" annotation.
organizationRefobjectnoOwning organization.
privatebooleannofalse
teamRefsobject[]noForgejoTeams granted access (organization-owned repositories only; the teams must belong to the owning organization). Authoritative, except for the Owners team and teams with includesAllRepositories, which Forgejo always grants.
unitsobjectno{}Repository units to enable or disable. Unset = Forgejo's default.
userRefobjectnoOwning user.
websitestringno

Build a manifest

Answer the questions and fill in the fields: the YAML preview updates as you type, ready to copy or download and kubectl apply.

Loading form...