Skip to content

Commit

Permalink
operator snapscheduler (3.4.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnStrunk authored May 9, 2024
1 parent b3101c3 commit 4d2a401
Show file tree
Hide file tree
Showing 7 changed files with 761 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: snapscheduler
app.kubernetes.io/instance: controller-manager-metrics-service
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: service
app.kubernetes.io/part-of: snapscheduler
control-plane: controller-manager
name: snapscheduler-controller-manager-metrics-service
spec:
ports:
- name: https
port: 8443
targetPort: https
selector:
control-plane: controller-manager
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
data:
controller_manager_config.yaml: |
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
kind: ControllerManagerConfig
health:
healthProbeBindAddress: :8081
metrics:
bindAddress: 127.0.0.1:8080
webhook:
port: 9443
leaderElection:
leaderElect: true
resourceName: cd2d8e9f.backube
leaderElectionReleaseOnCancel: true
kind: ConfigMap
metadata:
name: snapscheduler-manager-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: snapscheduler
app.kubernetes.io/instance: metrics-reader
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrole
app.kubernetes.io/part-of: snapscheduler
name: snapscheduler-metrics-reader
rules:
- nonResourceURLs:
- /metrics
verbs:
- get
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
creationTimestamp: null
name: snapshotschedules.snapscheduler.backube
spec:
group: snapscheduler.backube
names:
kind: SnapshotSchedule
listKind: SnapshotScheduleList
plural: snapshotschedules
singular: snapshotschedule
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.schedule
name: Schedule
type: string
- jsonPath: .spec.retention.expires
name: Max age
type: string
- jsonPath: .spec.retention.maxCount
name: Max num
type: integer
- jsonPath: .spec.disabled
name: Disabled
type: boolean
- jsonPath: .status.nextSnapshotTime
name: Next snapshot
type: string
name: v1
schema:
openAPIV3Schema:
description: SnapshotSchedule defines a schedule for taking automated snapshots
of PVC(s)
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: SnapshotScheduleSpec defines the desired state of SnapshotSchedule
properties:
claimSelector:
description: A filter to select which PVCs to snapshot via this schedule
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
disabled:
description: Indicates that this schedule should be temporarily disabled
type: boolean
retention:
description: Retention determines how long this schedule's snapshots
will be kept.
properties:
expires:
description: |-
The length of time (time.Duration) after which a given Snapshot will be
deleted.
pattern: ^\d+(h|m|s)$
type: string
maxCount:
description: The maximum number of snapshots to retain per PVC
format: int32
minimum: 1
type: integer
type: object
schedule:
description: |-
Schedule is a Cronspec specifying when snapshots should be taken. See
https://en.wikipedia.org/wiki/Cron for a description of the format.
pattern: ^(@(annually|yearly|monthly|weekly|daily|hourly))|((((\d+,)*\d+|(\d+(\/|-)\d+)|\*(\/\d+)?)\s?){5})$
type: string
snapshotTemplate:
description: A template to customize the Snapshots.
properties:
labels:
additionalProperties:
type: string
description: |-
A list of labels that should be added to each Snapshot created by this
schedule.
type: object
snapshotClassName:
description: The name of the VolumeSnapshotClass to be used when
creating Snapshots.
type: string
type: object
type: object
status:
description: SnapshotScheduleStatus defines the observed state of SnapshotSchedule
properties:
conditions:
description: Conditions is a list of conditions related to operator
reconciliation.
items:
description: |-
Condition represents the state of the operator's
reconciliation functionality.
properties:
lastHeartbeatTime:
format: date-time
type: string
lastTransitionTime:
format: date-time
type: string
message:
type: string
reason:
type: string
status:
type: string
type:
description: ConditionType is the state of the operator's reconciliation
functionality.
type: string
required:
- status
- type
type: object
type: array
lastSnapshotTime:
description: The time of the most recent snapshot taken by this schedule
format: date-time
type: string
nextSnapshotTime:
description: The time of the next scheduled snapshot
format: date-time
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
Loading

0 comments on commit 4d2a401

Please sign in to comment.