Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sokunthea.eang committed Oct 29, 2023
1 parent d1b4532 commit 7e09bf4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion examples/powermanger/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func setCPUFrequency(frequency int) error {
Low: "shared",
}
fmt.Printf("applying %s profile...\n", m[frequency])
command := fmt.Sprintf("kubectl apply -f - <<EOF\napiVersion: \"power.intel.com/v1\"\nkind: PowerWorkload\nmetadata:\n # Replace <NODE_NAME> with the Node you intend this PowerWorkload to be associated with\n name: shared-node-1.kt-cluster.ntu-cloud-pg0.utah.cloudlab.us-workload\n namespace: intel-power\nspec:\n # Replace <NODE_NAME> with the Node you intend this PowerWorkload to be associated with\n name: \"shared-node-1.kt-cluster.ntu-cloud-pg0.utah.cloudlab.us-workload\"\n allCores: true\n powerNodeSelector:\n # The label must be as below, as this workload will be specific to the Node\n kubernetes.io/hostname: node-1.kt-cluster.ntu-cloud-pg0.utah.cloudlab.us\n powerProfile: \"%s\"\nEOF", m[frequency])
command := fmt.Sprintf("kubectl apply -f - <<EOF\napiVersion: \"power.intel.com/v1\"\nkind: PowerWorkload\nmetadata:\n name: shared-node-1.kt-cluster.ntu-cloud-pg0.utah.cloudlab.us-workload\n namespace: intel-power\nspec:\n name: \"shared-node-1.kt-cluster.ntu-cloud-pg0.utah.cloudlab.us-workload\"\n allCores: true\n powerNodeSelector:\n kubernetes.io/hostname: node-1.kt-cluster.ntu-cloud-pg0.utah.cloudlab.us\n powerProfile: \"shared\"\nEOF", m[frequency])
cmd := exec.Command("bash", "-c", command)

// Capture and check for any errors.
Expand Down
4 changes: 0 additions & 4 deletions examples/powermanger/shared-workload.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
apiVersion: "power.intel.com/v1"
kind: PowerWorkload
metadata:
# Replace <NODE_NAME> with the Node you intend this PowerWorkload to be associated with
name: shared-node-1.kt-cluster.ntu-cloud-pg0.utah.cloudlab.us-workload
namespace: intel-power
spec:
# Replace <NODE_NAME> with the Node you intend this PowerWorkload to be associated with
name: "shared-node-1.kt-cluster.ntu-cloud-pg0.utah.cloudlab.us-workload"
allCores: true
powerNodeSelector:
# The label must be as below, as this workload will be specific to the Node
kubernetes.io/hostname: node-1.kt-cluster.ntu-cloud-pg0.utah.cloudlab.us
# Replace this value with the intended shared PowerProfile
powerProfile: "shared"

0 comments on commit 7e09bf4

Please sign in to comment.