Skip to content

Commit

Permalink
operator kube-green (0.5.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidebianchi authored Oct 7, 2023
1 parent 726bbca commit de06d0f
Show file tree
Hide file tree
Showing 8 changed files with 646 additions and 0 deletions.
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
control-plane: controller-manager
name: kube-green-controller-manager-metrics-service
spec:
ports:
- name: https
port: 8443
protocol: TCP
targetPort: https
selector:
app: kube-green
control-plane: controller-manager
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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: 2bd226ed.kube-green.com
kind: ConfigMap
metadata:
labels:
app: kube-green
name: kube-green-manager-config
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,17 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: 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.

118 changes: 118 additions & 0 deletions operators/kube-green/0.5.2/manifests/kube-green.com_sleepinfos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
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.10.0
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.
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 are "Deployment" and "CronJob".
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
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
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
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: null
storedVersions: null
14 changes: 14 additions & 0 deletions operators/kube-green/0.5.2/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.29.0
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3

# Annotations for testing.
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
operators.operatorframework.io.test.config.v1: tests/scorecard/
70 changes: 70 additions & 0 deletions operators/kube-green/0.5.2/tests/scorecard/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
apiVersion: scorecard.operatorframework.io/v1alpha3
kind: Configuration
metadata:
name: config
stages:
- parallel: true
tests:
- entrypoint:
- scorecard-test
- basic-check-spec
image: quay.io/operator-framework/scorecard-test:v1.4.2
labels:
suite: basic
test: basic-check-spec-test
storage:
spec:
mountPath: {}
- entrypoint:
- scorecard-test
- olm-bundle-validation
image: quay.io/operator-framework/scorecard-test:v1.4.2
labels:
suite: olm
test: olm-bundle-validation-test
storage:
spec:
mountPath: {}
- entrypoint:
- scorecard-test
- olm-crds-have-validation
image: quay.io/operator-framework/scorecard-test:v1.4.2
labels:
suite: olm
test: olm-crds-have-validation-test
storage:
spec:
mountPath: {}
- entrypoint:
- scorecard-test
- olm-crds-have-resources
image: quay.io/operator-framework/scorecard-test:v1.4.2
labels:
suite: olm
test: olm-crds-have-resources-test
storage:
spec:
mountPath: {}
- entrypoint:
- scorecard-test
- olm-spec-descriptors
image: quay.io/operator-framework/scorecard-test:v1.4.2
labels:
suite: olm
test: olm-spec-descriptors-test
storage:
spec:
mountPath: {}
- entrypoint:
- scorecard-test
- olm-status-descriptors
image: quay.io/operator-framework/scorecard-test:v1.4.2
labels:
suite: olm
test: olm-status-descriptors-test
storage:
spec:
mountPath: {}
storage:
spec:
mountPath: {}

0 comments on commit de06d0f

Please sign in to comment.