StaticSite CRD Reference¶
Complete reference for the StaticSite custom resource.
Overview¶
Property |
Value |
|---|---|
API Group |
|
API Version |
|
Kind |
|
Scope |
Namespaced |
Short Names |
|
Spec Fields¶
Required Fields¶
Field |
Type |
Description |
|---|---|---|
|
string |
Git repository URL. Must start with |
Optional Fields¶
Field |
Type |
Default |
Description |
|---|---|---|---|
|
string |
|
Git branch to clone |
|
string |
|
Subpath in repository to serve |
|
string |
URL path prefix (e.g., |
|
|
string |
Custom domain for the site |
|
|
object |
Reference to Secret with git credentials |
|
|
string |
|
How often to sync from git |
secretRef Object¶
Field |
Type |
Default |
Description |
|---|---|---|---|
|
string |
required |
Name of the Secret |
|
string |
|
Key in Secret containing the token |
Status Fields¶
Field |
Type |
Description |
|---|---|---|
|
string |
Current phase: |
|
string |
Human-readable status message |
|
datetime |
Timestamp of last successful sync |
|
string |
Git commit SHA of current content |
|
string |
URL where site is accessible |
|
array |
Detailed condition information |
Condition Object¶
Field |
Type |
Description |
|---|---|---|
|
string |
Condition type |
|
string |
Condition status |
|
datetime |
When condition last changed |
|
string |
Machine-readable reason |
|
string |
Human-readable message |
Printer Columns¶
When using kubectl get staticsites:
Column |
Priority |
Source |
|---|---|---|
Domain |
0 |
|
PathPrefix |
1 |
|
Repo |
1 |
|
Status |
0 |
|
Last Sync |
0 |
|
Age |
0 |
|
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:
repomust match pattern^https?://.*pathPrefixmust match pattern^(/[a-zA-Z0-9._-]+)*$(e.g.,/2023,/docs/v1)pathPrefixrequires a customdomainto be set