Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Uncore release (#26)
Browse files Browse the repository at this point in the history
* P-States functionality added to the Power Manager (#6)

* Race conditions (#10)

* Uncore topology (#12)

* Dependencies (#11)

* README Updates/cleanup for uncore (#22)

* Uncore integration (#23)

* Update uncore_controller.go (#24)

* adding fuzzing and fixing unit tests (#29)

* update go version and deps (#31)

* Lint (#36)

* non N-SKU bugfix (#30)

* increase memory allocated (#37)

* user role added (#19)

---------

Co-authored-by: Danilczuk, Lukasz <lukasz.danilczuk@intel.com>

* Sequence diagram, Power architectural diagram and power components diagrams added (#18)

* Logging (#8)

* rebased and squashed the branch

* adjusted default log lvl, gofmt

---------

Co-authored-by: Danilczuk, Lukasz <lukasz.danilczuk@intel.com>

* Bump k8s.io/klog/v2 from 2.80.1 to 2.90.1 (#35)

Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.80.1 to 2.90.1.
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](kubernetes/klog@v2.80.1...v2.90.1)

---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/go-logr/logr from 1.2.3 to 1.2.4 (#34)

Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/go-logr/logr/releases)
- [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md)
- [Commits](go-logr/logr@v1.2.3...v1.2.4)

---
updated-dependencies:
- dependency-name: github.com/go-logr/logr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump google.golang.org/grpc from 1.50.1 to 1.54.0 (#33)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.50.1 to 1.54.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.50.1...v1.54.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#32)

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ReadME for Uncore release updated with Helm chat to be added (#26)

---------

Co-authored-by: Danilczuk, Lukasz <lukasz.danilczuk@intel.com>

* removed useless leader election on node agent, fixed namespace validation, lints (#38)

* update leader election name on the operator (#42)

* Bump Power library version (#43)

* Sequence diagrams updated, each functionality now has its own diagram (#40)

* versions bump (#44)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Lukasz Danilczuk <lukasz.danilczuk@intel.com>
Co-authored-by: Aaron Dorney <85556203+adorney99@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored May 4, 2023
1 parent 8f495bb commit 9e19402
Show file tree
Hide file tree
Showing 98 changed files with 3,876 additions and 1,219 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@
*.swo
*~

# ignore sum files as well
#go.mod
#go.sum
go.work
go.work.sum
6 changes: 6 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
run:
skip-files:
# exclude tests
- "_test\\.go$"
output:
sort-results: true
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ build: generate manifests install

# Build the Manager and Node Agent images
images: generate manifests install
docker build -f build/Dockerfile -t intel/power-operator:v2.1.0 .
docker build -f build/Dockerfile.nodeagent -t intel/power-node-agent:v2.1.0 .
docker build -f build/Dockerfile -t intel/power-operator:v2.2.0 .
docker build -f build/Dockerfile.nodeagent -t intel/power-node-agent:v2.2.0 .

# Run against the configured Kubernetes cluster in ~/.kube/config
run: generate fmt vet manifests
Expand Down
657 changes: 487 additions & 170 deletions README.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions api/v1/powernode_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type PowerNodeStatus struct {

type PowerNodeCPUState struct {
// The CPUs that are currently part of the Shared pool on a Node
SharedPool []int `json:"sharedPool,omitempty"`
SharedPool []uint `json:"sharedPool,omitempty"`

// Pods that are requesting CPUs in the Guaranteed QoS class
GuaranteedPods []GuaranteedPod `json:"guaranteedPods,omitempty"`
Expand Down Expand Up @@ -97,7 +97,7 @@ type Container struct {
Pod string `json:"pod,omitempty"`

// The exclusive CPUs given to this Container
ExclusiveCPUs []int `json:"exclusiveCpus,omitempty"`
ExclusiveCPUs []uint `json:"exclusiveCpus,omitempty"`

// The PowerProfile that the Container is utilizing
PowerProfile string `json:"powerProfile,omitempty"`
Expand All @@ -111,15 +111,15 @@ type WorkloadInfo struct {
Name string `json:"name,omitempty"`

// The CPUs that are utilizing the PowerWorkload
CpuIds []int `json:"cores,omitempty"`
CpuIds []uint `json:"cores,omitempty"`
}

type SharedPoolInfo struct {
// The name or either Default or Shared pool
Profile string `json:"name,omitempty"`

// The cores that are a part of this Shared Pool
CpuIds []int `json:"sharedPoolCpuIds,omitempty"`
CpuIds []uint `json:"sharedPoolCpuIds,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down
4 changes: 2 additions & 2 deletions api/v1/powerworkload_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type WorkloadNode struct {

Containers []Container `json:"containers,omitempty"`

CpuIds []int `json:"cpuIds,omitempty"`
CpuIds []uint `json:"cpuIds,omitempty"`
}

// PowerWorkloadSpec defines the desired state of PowerWorkload
Expand All @@ -44,7 +44,7 @@ type PowerWorkloadSpec struct {

// Reserved CPUs are the CPUs that have been reserved by Kubelet for use by the Kubernetes admin process
// This list must match the list in the user's Kubelet configuration
ReservedCPUs []int `json:"reservedCPUs,omitempty"`
ReservedCPUs []uint `json:"reservedCPUs,omitempty"`

// The labels signifying the nodes the user wants to use
PowerNodeSelector map[string]string `json:"powerNodeSelector,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion api/v1/timeofday_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type TimeOfDaySpec struct {

// Schedule for adjusting performance mode
Schedule []ScheduleInfo `json:"schedule"`
ReservedCPUs *[]int `json:"reservedCPUs,omitempty"`
ReservedCPUs *[]uint `json:"reservedCPUs,omitempty"`
}

// TimeOfDayStatus defines the observed state of TimeOfDay
Expand Down
2 changes: 1 addition & 1 deletion api/v1/timeofdaycronjob_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type TimeOfDayCronJobSpec struct {
TimeZone *string `json:"timeZone"`
Profile *string `json:"profile"`
Pods *map[string]map[string]string `json:"pods,omitempty"`
ReservedCPUs *[]int `json:"reservedCPUs,omitempty"`
ReservedCPUs *[]uint `json:"reservedCPUs,omitempty"`
CState *CStatesSpec `json:"cState,omitempty"`
}

Expand Down
72 changes: 72 additions & 0 deletions api/v1/uncore_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// UncoreSpec defines the desired state of Uncore
type UncoreSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

SysMax *uint `json:"sysMax,omitempty"`
SysMin *uint `json:"sysMin,omitempty"`
DieSelectors *[]DieSelector `json:"dieSelector,omitempty"`
}

type DieSelector struct {
Package *uint `json:"package"`
Die *uint `json:"die,omitempty"`
Min *uint `json:"min"`
Max *uint `json:"max"`
}

// UncoreStatus defines the observed state of Uncore
type UncoreStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// Uncore is the Schema for the uncores API
type Uncore struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec UncoreSpec `json:"spec,omitempty"`
Status UncoreStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// UncoreList contains a list of Uncore
type UncoreList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Uncore `json:"items"`
}

func init() {
SchemeBuilder.Register(&Uncore{}, &UncoreList{})
}
Loading

0 comments on commit 9e19402

Please sign in to comment.