Skip to content

Commit

Permalink
upgrade kube-green to 0.7.0
Browse files Browse the repository at this point in the history
Signed-off-by: Davide Bianchi <[email protected]>
  • Loading branch information
davidebianchi committed Jan 19, 2025
1 parent 581ee23 commit a64e4db
Show file tree
Hide file tree
Showing 8 changed files with 720 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
app: kube-green
kube-green.dev/aggregate-to-manager: "true"
name: kube-green-aggregate-manager-role
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
- statefulsets
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- batch
resources:
- cronjobs
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- kube-green.com
resources:
- sleepinfos
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- kube-green.com
resources:
- sleepinfos/finalizers
verbs:
- update
- apiGroups:
- kube-green.com
resources:
- sleepinfos/status
verbs:
- get
- patch
- update
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: kube-green
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: kube-green
control-plane: controller-manager
name: kube-green-controller-manager-metrics-service
spec:
ports:
- name: https
port: 8443
protocol: TCP
targetPort: 8443
selector:
app: kube-green
control-plane: controller-manager
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
app: kube-green
name: kube-green-metrics-reader
rules:
- nonResourceURLs:
- /metrics
verbs:
- get
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: kube-green
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: kube-green
name: kube-green-webhook-service
spec:
ports:
- port: 443
protocol: TCP
targetPort: 9443
selector:
app: kube-green
control-plane: controller-manager
status:
loadBalancer: {}

Large diffs are not rendered by default.

193 changes: 193 additions & 0 deletions operators/kube-green/0.7.0/manifests/kube-green.com_sleepinfos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: kube-green/kube-green-serving-cert
controller-gen.kubebuilder.io/version: v0.16.5
creationTimestamp: null
labels:
app: kube-green
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.
Exclusion rules are evaluated in AND condition.
items:
description: Define a resource to filter, used to include or exclude
resources from the sleep.
properties:
apiVersion:
description: ApiVersion of the kubernetes resources.
type: string
kind:
description: Kind of the kubernetes resources of the specific
version.
type: string
matchLabels:
additionalProperties:
type: string
description: MatchLabels which identify the kubernetes resource
by labels
type: object
name:
description: Name which identify the kubernetes resource.
type: string
type: object
type: array
includeRef:
description: |-
IncludeRef define the resource to include from the sleep.
Inclusion rules are evaluated in AND condition.
items:
description: Define a resource to filter, used to include or exclude
resources from the sleep.
properties:
apiVersion:
description: ApiVersion of the kubernetes resources.
type: string
kind:
description: Kind of the kubernetes resources of the specific
version.
type: string
matchLabels:
additionalProperties:
type: string
description: MatchLabels which identify the kubernetes resource
by labels
type: object
name:
description: Name which identify the kubernetes resource.
type: string
type: object
type: array
patches:
description: Patches is a list of json 6902 patches to apply to the
target resources.
items:
properties:
patch:
description: Patch is the json6902 patch to apply to the target
resource.
type: string
target:
description: Target is the target resource to patch.
properties:
group:
description: Group of the Kubernetes resources.
type: string
kind:
description: Kind of the Kubernetes resources.
type: string
required:
- group
- kind
type: object
required:
- patch
- target
type: object
type: array
sleepAt:
description: |-
Hours:Minutes
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
suspendDeployments:
description: If SuspendDeployments is set to false, on sleep the deployment
of the namespace will not be suspended. By default Deployment will
be suspended.
type: boolean
suspendStatefulSets:
description: If SuspendStatefulSets is set to false, on sleep the
statefulset of the namespace will not be suspended. By default StatefulSet
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
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.
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: null
storedVersions: null
14 changes: 14 additions & 0 deletions operators/kube-green/0.7.0/metadata/annotations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
annotations:
# Core bundle annotations.
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: kube-green
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.metrics.builder: operator-sdk-v1.34.2
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4

# Annotations for testing.
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
operators.operatorframework.io.test.config.v1: tests/scorecard/
Loading

0 comments on commit a64e4db

Please sign in to comment.