This file contains hidden or 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
{ | |
"port": "/dev/ttyUSB0", | |
"baudrate": 2400, | |
"timeout": 5 | |
} |
This file contains hidden or 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
import paho.mqtt.client as mqtt | |
import time | |
import socket | |
import json | |
from boinc_client import Boinc # https://github.com/SplinterHead/boinc-client | |
from boinc_client.clients.rpc_client import RpcClient | |
hostname = socket.gethostname().split('.')[0] | |
global_availability_topic = f'availability/boinc_{hostname}' |
This file contains hidden or 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
{ | |
"port": "/dev/ttyS2", | |
"baudrate": 115200, | |
"timeout": 5, | |
"batteries": [ | |
{ | |
"battery_id": 1, | |
"cells": 16, | |
"gpio_de": 74, | |
"gpio_re": 75, |
This file contains hidden or 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
#!/bin/bash | |
smartctl --scan-open -j | jq .devices[] | jq '.name+" -d "+.type' -r | grep -v scsi > /tmp/tmpfs/devices.txt | |
cat /tmp/tmpfs/devices.txt | while read xdevice | |
do | |
smartctl -a $xdevice -j > /tmp/tmpfs/smart.json | |
passed=$(cat /tmp/tmpfs/smart.json | jq .smart_status.passed -r) | |
poh=$(cat /tmp/tmpfs/smart.json | jq .power_on_time.hours -r) | |
defects=$(cat /tmp/tmpfs/smart.json | jq .scsi_grown_defect_list -r) |
This file contains hidden or 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
#!/bin/bash | |
difficulty=$(gridcoinresearchd getmininginfo | jq .difficulty.current) | |
tts=$(gridcoinresearchd getmininginfo | jq '."time-to-stake_days"') | |
pending=$(gridcoinresearchd getmininginfo | jq .BoincRewardPending) | |
blocks=$(gridcoinresearchd getmininginfo | jq .blocks) | |
echo "# TYPE gridcoin_network_difficulty gauge" | |
echo "gridcoin_network_difficulty $difficulty" | |
echo "# TYPE gridcoin_tts_days gauge" |
This file contains hidden or 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
dhcp | |
tftp 40000000 u-boot-sunxi-with-spl.bin | |
sf probe | |
sf erase 0 0x100000 | |
sf write 0x40000000 0 0xa8b98 | |
# replace 0xa8b98 with the downloaded size written by the tftp command |
This file contains hidden or 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
dram_para = { | |
/* The values are from the boot0 dump from the H6 Mini eMMC image. */ | |
.dram_clk = 0x288, | |
.dram_type = 3, | |
.dram_zq = 0x3b3bfb, | |
.dram_odt_en = 1, | |
.dram_para1 = 0x310b, | |
.dram_para2 = 0x0c000000, | |
.dram_mr0 = 0x1a70, //0x1e14, | |
.dram_mr1 = 0x40, |
This file contains hidden or 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
package main | |
import ( | |
"net" | |
"fmt" | |
"bufio" | |
"encoding/xml" | |
"encoding/hex" | |
"crypto/md5" | |
"math" | |
"os" |
This file contains hidden or 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
diff --git a/pkg/kubelet/kubelet_node_status.go b/pkg/kubelet/kubelet_node_status.go | |
index cb13ec735f..f50cdab917 100644 | |
--- a/pkg/kubelet/kubelet_node_status.go | |
+++ b/pkg/kubelet/kubelet_node_status.go | |
@@ -176,6 +176,13 @@ func (kl *Kubelet) updateDefaultLabels(initialNode, existingNode *v1.Node) bool | |
} | |
} | |
+ for labelKey, labelValue := range initialNode.Labels { | |
+ if kubeletapis.IsKubeletLabel(labelKey) { |
This file contains hidden or 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
diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go | |
index 1b60f2cea45..5b245b7faa1 100644 | |
--- a/cmd/kubelet/app/options/options.go | |
+++ b/cmd/kubelet/app/options/options.go | |
@@ -144,6 +144,8 @@ type KubeletFlags struct { | |
ExperimentalNodeAllocatableIgnoreEvictionThreshold bool | |
// Node Labels are the node labels to add when registering the node in the cluster | |
NodeLabels map[string]string | |
+ // Extended resources of a node to register/update with | |
+ ExtendedResources map[string]string |