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: DefaultSpec fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
archived | boolean | no | false | Archived repositories are read-only; their settings, branch protections and teams are left alone until unarchived. |
branchProtections | object[] | no | Branch 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. | |
defaultBranch | string | no | ||
deletionPolicy | string | no | "Orphan" | Defaults to Orphan: deleting the CR never deletes git history. |
description | string | no | ||
fromTemplate | object | no | Generate 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. | |
init | object | no | Creation-time initialization of an empty repository. | |
instanceRef | object | no | The ForgejoInstance or ForgejoLocalInstance this object lives on. Unset: the cluster's only ForgejoInstance, else the only ForgejoLocalInstance of this namespace. | |
isTemplate | boolean | no | false | Mark the repository as a template others can be generated from. |
migrate | object | no | Migrate (or pull-mirror) a remote repository. Creation-time only, except mirrorInterval, which stays in sync. | |
name | string | yes | Repository 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. | |
organizationRef | object | no | Owning organization. | |
private | boolean | no | false | |
teamRefs | object[] | no | ForgejoTeams 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. | |
units | object | no | {} | Repository units to enable or disable. Unset = Forgejo's default. |
userRef | object | no | Owning user. | |
website | string | no |
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...