GitHook controller was generating a Deployment without any persistent
storage — only a ConfigMap volume at /config. The worker needs /data to
access repo storage paths (APP_REPOS_ROOT defaults to /data/repos).
Changes:
- GitHookSpec: added storage_size field (default 10Gi), matching the
pattern already used by GitServerSpec
- git_hook.rs reconcile(): now creates a PVC ({name}-data) before the
Deployment, mounts it at /data, and sets APP_REPOS_ROOT=/data/repos
- git-hook-crd.yaml: synced storageSize field into the CRD schema
100 lines
2.8 KiB
YAML
100 lines
2.8 KiB
YAML
apiVersion: apiextensions.k8s.io/v1
|
|
kind: CustomResourceDefinition
|
|
metadata:
|
|
name: githooks.code.dev
|
|
annotations:
|
|
controller-gen.kubebuilder.io/version: v0.16.0
|
|
spec:
|
|
group: code.dev
|
|
names:
|
|
kind: GitHook
|
|
listKind: GitHookList
|
|
plural: githooks
|
|
singular: githook
|
|
shortNames:
|
|
- ghk
|
|
scope: Namespaced
|
|
versions:
|
|
- name: v1
|
|
served: true
|
|
storage: true
|
|
subresources:
|
|
status: {}
|
|
additionalPrinterColumns:
|
|
- name: Age
|
|
jsonPath: .metadata.creationTimestamp
|
|
type: date
|
|
schema:
|
|
openAPIV3Schema:
|
|
type: object
|
|
required: [spec]
|
|
properties:
|
|
apiVersion:
|
|
type: string
|
|
kind:
|
|
type: string
|
|
metadata:
|
|
type: object
|
|
spec:
|
|
type: object
|
|
required: []
|
|
properties:
|
|
image:
|
|
type: string
|
|
default: myapp/git-hook:latest
|
|
env:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required: [name]
|
|
properties:
|
|
name:
|
|
type: string
|
|
value:
|
|
type: string
|
|
valueFrom:
|
|
type: object
|
|
properties:
|
|
secretRef:
|
|
type: object
|
|
required: [name, secretName, secretKey]
|
|
properties:
|
|
name:
|
|
type: string
|
|
secretName:
|
|
type: string
|
|
secretKey:
|
|
type: string
|
|
resources:
|
|
type: object
|
|
properties:
|
|
requests:
|
|
type: object
|
|
properties:
|
|
cpu:
|
|
type: string
|
|
memory:
|
|
type: string
|
|
limits:
|
|
type: object
|
|
properties:
|
|
cpu:
|
|
type: string
|
|
memory:
|
|
type: string
|
|
imagePullPolicy:
|
|
type: string
|
|
default: IfNotPresent
|
|
workerId:
|
|
type: string
|
|
storageSize:
|
|
type: string
|
|
default: 10Gi
|
|
status:
|
|
type: object
|
|
properties:
|
|
readyReplicas:
|
|
type: integer
|
|
phase:
|
|
type: string
|