StaticSite CRD Reference

Complete reference for the StaticSite custom resource.

Overview

Property

Value

API Group

pages.kup6s.com

API Version

v1alpha1

Kind

StaticSite

Scope

Namespaced

Short Names

ss, site

Spec Fields

Required Fields

Field

Type

Description

repo

string

Git repository URL. Must start with http:// or https://

Optional Fields

Field

Type

Default

Description

branch

string

main

Git branch to clone

path

string

/

Subpath in repository to serve

pathPrefix

string

URL path prefix (e.g., /2023). Requires custom domain

domain

string

Custom domain for the site

secretRef

object

Reference to Secret with git credentials

syncInterval

string

5m

How often to sync from git

secretRef Object

Field

Type

Default

Description

name

string

required

Name of the Secret

key

string

password

Key in Secret containing the token

Status Fields

Field

Type

Description

phase

string

Current phase: Pending, Syncing, Ready, Error

message

string

Human-readable status message

lastSync

datetime

Timestamp of last successful sync

lastCommit

string

Git commit SHA of current content

url

string

URL where site is accessible

conditions

array

Detailed condition information

Condition Object

Field

Type

Description

type

string

Condition type

status

string

Condition status

lastTransitionTime

datetime

When condition last changed

reason

string

Machine-readable reason

message

string

Human-readable message

Printer Columns

When using kubectl get staticsites:

Column

Priority

Source

Domain

0

.spec.domain

PathPrefix

1

.spec.pathPrefix

Repo

1

.spec.repo

Status

0

.status.phase

Last Sync

0

.status.lastSync

Age

0

.metadata.creationTimestamp

Use -o wide to see priority 1 columns.

Examples

Minimal Site

apiVersion: pages.kup6s.com/v1alpha1
kind: StaticSite
metadata:
  name: my-site
  namespace: default
spec:
  repo: https://github.com/user/my-site.git
  domain: www.example.com

Site with Build Output Path

apiVersion: pages.kup6s.com/v1alpha1
kind: StaticSite
metadata:
  name: docs
  namespace: docs-team
spec:
  repo: https://github.com/org/documentation.git
  branch: main
  path: /build/html
  domain: docs.example.com

Private Repository

apiVersion: pages.kup6s.com/v1alpha1
kind: StaticSite
metadata:
  name: internal-docs
  namespace: internal
spec:
  repo: https://forgejo.example.com/org/private-docs.git
  domain: internal.example.com
  secretRef:
    name: forgejo-token
    key: password

Multiple Sites on Same Domain

apiVersion: pages.kup6s.com/v1alpha1
kind: StaticSite
metadata:
  name: archive-2023
  namespace: archives
spec:
  repo: https://github.com/org/archive-2023.git
  domain: archives.example.com
  pathPrefix: /2023
---
apiVersion: pages.kup6s.com/v1alpha1
kind: StaticSite
metadata:
  name: archive-2024
  namespace: archives
spec:
  repo: https://github.com/org/archive-2024.git
  domain: archives.example.com
  pathPrefix: /2024

Custom Sync Interval

apiVersion: pages.kup6s.com/v1alpha1
kind: StaticSite
metadata:
  name: frequently-updated
  namespace: default
spec:
  repo: https://github.com/user/live-site.git
  domain: live.example.com
  syncInterval: 1m

Validation

The CRD enforces these validation rules:

  • repo must match pattern ^https?://.*

  • pathPrefix must match pattern ^(/[a-zA-Z0-9._-]+)*$ (e.g., /2023, /docs/v1)

  • pathPrefix requires a custom domain to be set