110 lines
4.3 KiB
YAML
110 lines
4.3 KiB
YAML
---
|
|
apiVersion: apiextensions.k8s.io/v1
|
|
kind: CustomResourceDefinition
|
|
metadata:
|
|
annotations:
|
|
controller-gen.kubebuilder.io/version: v0.4.1
|
|
creationTimestamp: null
|
|
name: sleepinfos.kube-green.com
|
|
spec:
|
|
group: kube-green.com
|
|
names:
|
|
kind: SleepInfo
|
|
listKind: SleepInfoList
|
|
plural: sleepinfos
|
|
singular: sleepinfo
|
|
scope: Namespaced
|
|
versions:
|
|
- name: v1alpha1
|
|
schema:
|
|
openAPIV3Schema:
|
|
description: SleepInfo is the Schema for the sleepinfos 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: SleepInfoSpec defines the desired state of SleepInfo
|
|
properties:
|
|
excludeRef:
|
|
description: ExcludeRef define the resource to exclude from the sleep.
|
|
items:
|
|
properties:
|
|
apiVersion:
|
|
description: ApiVersion of the kubernetes resources. Supported
|
|
api version is "apps/v1".
|
|
type: string
|
|
kind:
|
|
description: Kind of the kubernetes resources of the specific
|
|
version. Supported kind is "Deployment".
|
|
type: string
|
|
name:
|
|
description: Name which identify the kubernetes resource.
|
|
type: string
|
|
required:
|
|
- apiVersion
|
|
- kind
|
|
- name
|
|
type: object
|
|
type: array
|
|
sleepAt:
|
|
description: "Hours:Minutes \n Accept cron schedule for both hour
|
|
and minute. For example, *:*/2 is set to configure a run every even
|
|
minute."
|
|
type: string
|
|
suspendCronJobs:
|
|
description: If SuspendCronjobs is set to true, on sleep the cronjobs
|
|
of the namespace will be suspended.
|
|
type: boolean
|
|
timeZone:
|
|
description: Time zone to set the schedule, in IANA time zone identifier.
|
|
It is not required, default to UTC. For example, for the Italy time
|
|
zone set Europe/Rome.
|
|
type: string
|
|
wakeUpAt:
|
|
description: "Hours:Minutes \n Accept cron schedule for both hour
|
|
and minute. For example, *:*/2 is set to configure a run every even
|
|
minute. It is not required."
|
|
type: string
|
|
weekdays:
|
|
description: "Weekdays are in cron notation. \n For example, to configure
|
|
a schedule from monday to friday, set it to \"1-5\""
|
|
type: string
|
|
required:
|
|
- sleepAt
|
|
- weekdays
|
|
type: object
|
|
status:
|
|
description: SleepInfoStatus defines the observed state of SleepInfo
|
|
properties:
|
|
lastScheduleTime:
|
|
description: Information when was the last time the run was successfully
|
|
scheduled.
|
|
format: date-time
|
|
type: string
|
|
operation:
|
|
description: The operation type handled in last schedule. SLEEP or
|
|
WAKE_UP are the possibilities
|
|
type: string
|
|
type: object
|
|
type: object
|
|
served: true
|
|
storage: true
|
|
subresources:
|
|
status: {}
|
|
status:
|
|
acceptedNames:
|
|
kind: ""
|
|
plural: ""
|
|
conditions: []
|
|
storedVersions: []
|