Skip to content

Commit

Permalink
POWERMON-235: Add support for Redfish
Browse files Browse the repository at this point in the history
Signed-off-by: Vimal Kumar <vimal78@gmail.com>
  • Loading branch information
vimalk78 committed Mar 2, 2024
1 parent 4d2756f commit 32036e1
Show file tree
Hide file tree
Showing 19 changed files with 622 additions and 82 deletions.
4 changes: 3 additions & 1 deletion bundle/manifests/kepler-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ metadata:
capabilities: Basic Install
categories: Monitoring
containerImage: quay.io/sustainable_computing_io/kepler-operator:0.10.0
createdAt: "2024-02-15T04:47:16Z"
createdAt: "2024-03-01T19:29:40Z"
description: 'Deploys and Manages Kepler on Kubernetes '
operators.operatorframework.io/builder: operator-sdk-v1.27.0
operators.operatorframework.io/internal-objects: |-
Expand Down Expand Up @@ -117,6 +117,7 @@ spec:
resources:
- daemonsets
- deployments
- secrets
verbs:
- create
- delete
Expand Down Expand Up @@ -155,6 +156,7 @@ spec:
- nodes/metrics
- nodes/proxy
- nodes/stats
- secrets
verbs:
- get
- list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,26 @@ spec:
- image
- namespace
type: object
redfish:
properties:
probeIntervalSec:
default: "60"
description: ProbeInterval controls how frequently power info
is queried from Redfish
pattern: \d+
type: string
secretRef:
description: SecretRef refers to the name of secret which
contains credentials to initialize RedfishClient
type: string
skipSSLVerify:
default: false
description: SkipSSLVerify controls if RedfishClient will
skip verifying server
type: boolean
required:
- secretRef
type: object
required:
- deployment
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,27 @@ spec:
type: object
type: array
type: object
redfish:
description: RedfishSpec config for
properties:
probeIntervalSec:
default: "60"
description: ProbeInterval controls how frequently power info
is queried from Redfish
pattern: \d+
type: string
secretRef:
description: SecretRef refers to the name of secret which
contains credentials to initialize RedfishClient
type: string
skipSSLVerify:
default: false
description: SkipSSLVerify controls if RedfishClient will
skip verifying server
type: boolean
required:
- secretRef
type: object
type: object
type: object
status:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,26 @@ spec:
- image
- namespace
type: object
redfish:
properties:
probeIntervalSec:
default: "60"
description: ProbeInterval controls how frequently power info
is queried from Redfish
pattern: \d+
type: string
secretRef:
description: SecretRef refers to the name of secret which
contains credentials to initialize RedfishClient
type: string
skipSSLVerify:
default: false
description: SkipSSLVerify controls if RedfishClient will
skip verifying server
type: boolean
required:
- secretRef
type: object
required:
- deployment
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,27 @@ spec:
type: object
type: array
type: object
redfish:
description: RedfishSpec config for
properties:
probeIntervalSec:
default: "60"
description: ProbeInterval controls how frequently power info
is queried from Redfish
pattern: \d+
type: string
secretRef:
description: SecretRef refers to the name of secret which
contains credentials to initialize RedfishClient
type: string
skipSSLVerify:
default: false
description: SkipSSLVerify controls if RedfishClient will
skip verifying server
type: boolean
required:
- secretRef
type: object
type: object
type: object
status:
Expand Down
2 changes: 2 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ rules:
resources:
- daemonsets
- deployments
- secrets
verbs:
- create
- delete
Expand Down Expand Up @@ -47,6 +48,7 @@ rules:
- nodes/metrics
- nodes/proxy
- nodes/stats
- secrets
verbs:
- get
- list
Expand Down
104 changes: 104 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ KeplerInternalSpec defines the desired state of KeplerInternal
<br/>
</td>
<td>true</td>
</tr><tr>
<td><b><a href="#keplerinternalspecexporterredfish">redfish</a></b></td>
<td>object</td>
<td>
<br/>
</td>
<td>false</td>
</tr></tbody>
</table>

Expand Down Expand Up @@ -265,6 +272,51 @@ The pod this Toleration is attached to tolerates any taint that matches the trip
</table>


### KeplerInternal.spec.exporter.redfish
<sup><sup>[↩ Parent](#keplerinternalspecexporter)</sup></sup>





<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Required</th>
</tr>
</thead>
<tbody><tr>
<td><b>secretRef</b></td>
<td>string</td>
<td>
SecretRef refers to the name of secret which contains credentials to initialize RedfishClient<br/>
</td>
<td>true</td>
</tr><tr>
<td><b>probeIntervalSec</b></td>
<td>string</td>
<td>
ProbeInterval controls how frequently power info is queried from Redfish<br/>
<br/>
<i>Default</i>: 60<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>skipSSLVerify</b></td>
<td>boolean</td>
<td>
SkipSSLVerify controls if RedfishClient will skip verifying server<br/>
<br/>
<i>Default</i>: false<br/>
</td>
<td>false</td>
</tr></tbody>
</table>


### KeplerInternal.spec.estimator
<sup><sup>[↩ Parent](#keplerinternalspec)</sup></sup>

Expand Down Expand Up @@ -1518,6 +1570,13 @@ KeplerSpec defines the desired state of Kepler
<br/>
</td>
<td>false</td>
</tr><tr>
<td><b><a href="#keplerspecexporterredfish">redfish</a></b></td>
<td>object</td>
<td>
RedfishSpec config for<br/>
</td>
<td>false</td>
</tr></tbody>
</table>

Expand Down Expand Up @@ -1629,6 +1688,51 @@ The pod this Toleration is attached to tolerates any taint that matches the trip
</table>


### Kepler.spec.exporter.redfish
<sup><sup>[↩ Parent](#keplerspecexporter)</sup></sup>



RedfishSpec config for

<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Required</th>
</tr>
</thead>
<tbody><tr>
<td><b>secretRef</b></td>
<td>string</td>
<td>
SecretRef refers to the name of secret which contains credentials to initialize RedfishClient<br/>
</td>
<td>true</td>
</tr><tr>
<td><b>probeIntervalSec</b></td>
<td>string</td>
<td>
ProbeInterval controls how frequently power info is queried from Redfish<br/>
<br/>
<i>Default</i>: 60<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>skipSSLVerify</b></td>
<td>boolean</td>
<td>
SkipSSLVerify controls if RedfishClient will skip verifying server<br/>
<br/>
<i>Default</i>: false<br/>
</td>
<td>false</td>
</tr></tbody>
</table>


### Kepler.status
<sup><sup>[↩ Parent](#kepler)</sup></sup>

Expand Down
6 changes: 6 additions & 0 deletions pkg/api/v1alpha1/kepler_internal_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ type InternalExporterDeploymentSpec struct {
Namespace string `json:"namespace"`
}

type InternalRedfishSpec struct {
RedfishSpec `json:",inline"`
}

type InternalExporterSpec struct {
// +kubebuilder:validation:Required
Deployment InternalExporterDeploymentSpec `json:"deployment"`

Redfish *InternalRedfishSpec `json:"redfish,omitempty"`
}

type DashboardSpec struct {
Expand Down
19 changes: 19 additions & 0 deletions pkg/api/v1alpha1/kepler_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,27 @@ type ExporterDeploymentSpec struct {
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
}

// RedfishSpec config for
type RedfishSpec struct {
// SecretRef refers to the name of secret which contains credentials to initialize RedfishClient
SecretRef string `json:"secretRef"`

// ProbeInterval controls how frequently power info is queried from Redfish
// +optional
// +kubebuilder:validation:Pattern=`\d+`
// +kubebuilder:default:="60"
ProbeInterval string `json:"probeIntervalSec,omitempty"`

// SkipSSLVerify controls if RedfishClient will skip verifying server
// +optional
// +kubebuilder:validation:Required
// +kubebuilder:default:=false
SkipSSLVerify bool `json:"skipSSLVerify,omitempty"`
}

type ExporterSpec struct {
Deployment ExporterDeploymentSpec `json:"deployment,omitempty"`
Redfish *RedfishSpec `json:"redfish,omitempty"`
}

// KeplerSpec defines the desired state of Kepler
Expand Down
41 changes: 41 additions & 0 deletions pkg/api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 32036e1

Please sign in to comment.