feat: operator-sdk scaffold with Function and Trigger CRDs

- operator-sdk init --domain kube5s.ru
- CRD: Function, Trigger (sless.kube5s.ru)
- controllers: FunctionReconciler, TriggerReconciler (stubs)
- internal/ structure: api, storage/postgres, storage/s3, builder, config
- fix: controller-tools bumped v0.11.1→v0.14.0 (Go 1.23 compat)
This commit is contained in:
“Naeel”
2026-03-07 08:16:39 +04:00
parent 205aecae50
commit 3e10ac1d63
63 changed files with 2829 additions and 1 deletions
@@ -0,0 +1,54 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
name: functions.sless.kube5s.ru
spec:
group: sless.kube5s.ru
names:
kind: Function
listKind: FunctionList
plural: functions
singular: function
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: Function is the Schema for the functions API
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: FunctionSpec defines the desired state of Function
properties:
foo:
description: Foo is an example field of Function. Edit function_types.go
to remove/update
type: string
type: object
status:
description: FunctionStatus defines the observed state of Function
type: object
type: object
served: true
storage: true
subresources:
status: {}
@@ -0,0 +1,54 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
name: triggers.sless.kube5s.ru
spec:
group: sless.kube5s.ru
names:
kind: Trigger
listKind: TriggerList
plural: triggers
singular: trigger
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: Trigger is the Schema for the triggers API
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: TriggerSpec defines the desired state of Trigger
properties:
foo:
description: Foo is an example field of Trigger. Edit trigger_types.go
to remove/update
type: string
type: object
status:
description: TriggerStatus defines the observed state of Trigger
type: object
type: object
served: true
storage: true
subresources:
status: {}