Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
INCLUDE_KUBERNETES=$(INCLUDE_KUBERNETES) \
KUBERNETES_VERSION=$(KUBERNETES_VERSION) \
KUBERNETES_CNI_VERSION=$(KUBERNETES_CNI_VERSION) \
K8s_GCR_IO_PAUSE_VERSION=$(K8s_GCR_IO_PAUSE_VERSION) \
INCLUDE_KUBERNETES_MASTER=$(INCLUDE_KUBERNETES_MASTER) \
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
Expand Down
1 change: 0 additions & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ then
## Install Kubernetes
echo '[INFO] Install kubernetes'
install_kubernetes ${KUBERNETES_VERSION}
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install kubernetes-cni=${KUBERNETES_CNI_VERSION}
else
echo '[INFO] Skipping Install kubernetes'
fi
Expand Down
3 changes: 1 addition & 2 deletions rules/config
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ INCLUDE_MACSEC = y

# INCLUDE_KUBERNETES - if set to y kubernetes packages are installed to be able to
# run as worker node in kubernetes cluster.
INCLUDE_KUBERNETES = n
INCLUDE_KUBERNETES ?= n

KUBE_DOCKER_PROXY = http://172.16.1.1:3128/

Expand All @@ -179,7 +179,6 @@ KUBE_DOCKER_PROXY = http://172.16.1.1:3128/
# NOTE: As a worker node it has to run version compatible to kubernetes master.
#
KUBERNETES_VERSION = 1.22.2-00
KUBERNETES_CNI_VERSION = 0.8.7-00
K8s_GCR_IO_PAUSE_VERSION = 3.5

# INCLUDE_KUBERNETES_MASTER - if set to y kubernetes packages are installed o be able
Expand Down
6 changes: 6 additions & 0 deletions src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@
USE_K8S_PROXY: ""
}

ENABLED_FEATURE_SET = {"telemetry", "snmp"}

def log_debug(m):
msg = "{}: {}".format(inspect.stack()[1][3], m)
syslog.syslog(syslog.LOG_DEBUG, msg)
Expand Down Expand Up @@ -260,6 +262,8 @@ def run(self):
key, op, fvs = subscriber.pop()
if not key:
continue
if subscriber.getTableName() == FEATURE_TABLE and key not in ENABLED_FEATURE_SET:
continue
log_debug("Received message : '%s'" % str((key, op, fvs)))
for callback in (self.callbacks
[subscriber.getDbConnector().getDbName()]
Expand All @@ -280,6 +284,8 @@ def set_node_labels(server):
labels["sonic_version"] = version_info['build_version']
labels["hwsku"] = device_info.get_hwsku() if not UNIT_TESTING else "mock"
labels["deployment_type"] = dep_type
platform = device_info.get_platform()
labels["worker.sonic/platform"] = platform if platform is not None else ""
server.mod_db_entry(STATE_DB_NAME,
KUBE_LABEL_TABLE, KUBE_LABEL_SET_KEY, labels)

Expand Down