--- 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: - additionalPrinterColumns: - jsonPath: .spec.type name: Type type: string - jsonPath: .spec.functionRef name: Function type: string - jsonPath: .status.active name: Active type: boolean - jsonPath: .status.url name: URL type: string - jsonPath: .metadata.creationTimestamp name: Age type: date name: v1alpha1 schema: openAPIV3Schema: description: Trigger — ресурс для управления способом вызова Function. 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 — желаемое состояние триггера. properties: enabled: default: true description: |- Enabled — если false, Deployment функции масштабируется до 0 (функция не принимает запросы). При true — функция запускается. По умолчанию true. Позволяет "заморозить" функцию без удаления ресурса. type: boolean functionRef: description: FunctionRef — имя Function ресурса в том же namespace type: string preWarmSeconds: default: 300 description: |- PreWarmSeconds — за сколько секунд до запуска прогреть контейнер. Актуально для cron: запускаем pod заранее чтобы избежать cold start. format: int32 type: integer schedule: description: 'Schedule — расписание в формате cron (только для type=cron, например: "0 2 * * *")' type: string type: description: 'Type — тип триггера: http или cron' enum: - http - cron type: string required: - enabled - functionRef - type type: object status: description: TriggerStatus — наблюдаемое состояние триггера (заполняет контроллер). properties: active: description: Active — активен ли триггер в данный момент type: boolean lastScheduleTime: description: LastScheduleTime — время последнего запуска по расписанию (только для type=cron) format: date-time type: string message: description: Message — человекочитаемое сообщение об ошибке или статусе type: string url: description: URL — публичный URL для вызова функции (только для type=http) type: string type: object type: object served: true storage: true subresources: status: {}