-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a `KeplerInternal` CRD which is a internal API of Kepler Operator. Kepler CRD is now a facade for `KeplerInternal` Creating a `Kepler` now creates a corresponding `keplerinternal` CR with appropriate spec initialised. The KeplerInternal Controller responds creation of `kepler-internal` by deploying kepler. This separation allows for providing stable API - Kepler or other higher level api (such as `powermon.openshift.io - PowerMonitoring`) which provides a limited set of stable functionalities to users. NOTE: KeplerInternal API can break at any point in time, so its usage is highly discouraged other than for testing experimental features. Signed-off-by: Sunil Thaha <[email protected]>
- Loading branch information
Showing
16 changed files
with
1,535 additions
and
477 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
234 changes: 234 additions & 0 deletions
234
bundle/manifests/kepler.system.sustainable.computing.io_keplerinternals.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.12.1 | ||
creationTimestamp: null | ||
name: keplerinternals.kepler.system.sustainable.computing.io | ||
spec: | ||
group: kepler.system.sustainable.computing.io | ||
names: | ||
kind: KeplerInternal | ||
listKind: KeplerInternalList | ||
plural: keplerinternals | ||
singular: keplerinternal | ||
scope: Cluster | ||
versions: | ||
- additionalPrinterColumns: | ||
- jsonPath: .spec.exporter.deployment.port | ||
name: Port | ||
type: integer | ||
- jsonPath: .status.desiredNumberScheduled | ||
name: Desired | ||
type: integer | ||
- jsonPath: .status.currentNumberScheduled | ||
name: Current | ||
type: integer | ||
- jsonPath: .status.numberReady | ||
name: Ready | ||
type: integer | ||
- jsonPath: .status.updatedNumberScheduled | ||
name: Up-to-date | ||
type: integer | ||
- jsonPath: .status.numberAvailable | ||
name: Available | ||
type: integer | ||
- jsonPath: .metadata.creationTimestamp | ||
name: Age | ||
type: date | ||
- jsonPath: .spec.exporter.deployment.nodeSelector | ||
name: Node-Selector | ||
priority: 10 | ||
type: string | ||
- jsonPath: .spec.exporter.deployment.tolerations | ||
name: Tolerations | ||
priority: 10 | ||
type: string | ||
name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: KeplerInternal is the Schema for the keplers internal 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: KeplerInternalSpec defines the desired state of Kepler | ||
properties: | ||
exporter: | ||
properties: | ||
deployment: | ||
properties: | ||
nodeSelector: | ||
additionalProperties: | ||
type: string | ||
default: | ||
kubernetes.io/os: linux | ||
description: Defines which Nodes the Pod is scheduled on | ||
type: object | ||
port: | ||
default: 9103 | ||
format: int32 | ||
maximum: 65535 | ||
minimum: 1 | ||
type: integer | ||
tolerations: | ||
default: | ||
- effect: "" | ||
key: "" | ||
operator: Exists | ||
value: "" | ||
description: If specified, define Pod's tolerations | ||
items: | ||
description: The pod this Toleration is attached to tolerates | ||
any taint that matches the triple <key,value,effect> using | ||
the matching operator <operator>. | ||
properties: | ||
effect: | ||
description: Effect indicates the taint effect to match. | ||
Empty means match all taint effects. When specified, | ||
allowed values are NoSchedule, PreferNoSchedule and | ||
NoExecute. | ||
type: string | ||
key: | ||
description: Key is the taint key that the toleration | ||
applies to. Empty means match all taint keys. If the | ||
key is empty, operator must be Exists; this combination | ||
means to match all values and all keys. | ||
type: string | ||
operator: | ||
description: Operator represents a key's relationship | ||
to the value. Valid operators are Exists and Equal. | ||
Defaults to Equal. Exists is equivalent to wildcard | ||
for value, so that a pod can tolerate all taints of | ||
a particular category. | ||
type: string | ||
tolerationSeconds: | ||
description: TolerationSeconds represents the period | ||
of time the toleration (which must be of effect NoExecute, | ||
otherwise this field is ignored) tolerates the taint. | ||
By default, it is not set, which means tolerate the | ||
taint forever (do not evict). Zero and negative values | ||
will be treated as 0 (evict immediately) by the system. | ||
format: int64 | ||
type: integer | ||
value: | ||
description: Value is the taint value the toleration | ||
matches to. If the operator is Exists, the value should | ||
be empty, otherwise just a regular string. | ||
type: string | ||
type: object | ||
type: array | ||
type: object | ||
type: object | ||
type: object | ||
status: | ||
description: KeplerStatus defines the observed state of Kepler | ||
properties: | ||
conditions: | ||
items: | ||
properties: | ||
lastTransitionTime: | ||
description: lastTransitionTime is the last time the condition | ||
transitioned from one status to another. This should be when | ||
the underlying condition changed. If that is not known, then | ||
using the time when the API field changed is acceptable. | ||
format: date-time | ||
type: string | ||
message: | ||
description: message is a human readable message indicating | ||
details about the transition. This may be an empty string. | ||
maxLength: 32768 | ||
type: string | ||
observedGeneration: | ||
description: observedGeneration represents the .metadata.generation | ||
that the condition was set based upon. For instance, if .metadata.generation | ||
is currently 12, but the .status.conditions[x].observedGeneration | ||
is 9, the condition is out of date with respect to the current | ||
state of the instance. | ||
format: int64 | ||
minimum: 0 | ||
type: integer | ||
reason: | ||
description: reason contains a programmatic identifier indicating | ||
the reason for the condition's last transition. | ||
type: string | ||
status: | ||
description: status of the condition, one of True, False, Unknown. | ||
type: string | ||
type: | ||
description: Type of Kepler Condition - Reconciled, Available | ||
... | ||
type: string | ||
required: | ||
- lastTransitionTime | ||
- message | ||
- reason | ||
- status | ||
- type | ||
type: object | ||
type: array | ||
x-kubernetes-list-type: atomic | ||
currentNumberScheduled: | ||
description: The number of nodes that are running at least 1 kepler | ||
pod and are supposed to run the kepler pod. | ||
format: int32 | ||
type: integer | ||
desiredNumberScheduled: | ||
description: The total number of nodes that should be running the | ||
kepler pod (including nodes correctly running the kepler pod). | ||
format: int32 | ||
type: integer | ||
numberAvailable: | ||
description: The number of nodes that should be running the kepler | ||
pod and have one or more of the kepler pod running and available | ||
format: int32 | ||
type: integer | ||
numberMisscheduled: | ||
description: The number of nodes that are running the kepler pod, | ||
but are not supposed to run the kepler pod. | ||
format: int32 | ||
type: integer | ||
numberReady: | ||
description: numberReady is the number of nodes that should be running | ||
the kepler pod and have one or more of the kepler pod running with | ||
a Ready Condition. | ||
format: int32 | ||
type: integer | ||
numberUnavailable: | ||
description: The number of nodes that should be running the kepler | ||
pod and have none of the kepler pod running and available | ||
format: int32 | ||
type: integer | ||
updatedNumberScheduled: | ||
description: The total number of nodes that are running updated kepler | ||
pod | ||
format: int32 | ||
type: integer | ||
required: | ||
- conditions | ||
- currentNumberScheduled | ||
- desiredNumberScheduled | ||
- numberMisscheduled | ||
- numberReady | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: null | ||
storedVersions: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.