[BUG] modules.kubernetes
is broken due to use of deprecated API version
#62621
Labels
Bug
broken, incorrect, or confusing behavior
dependency
underlying Salt dependency issue
Deprecation
k8s-modules
needs-triage
Description
Using an up-to-date version of the Kubernetes Python API bindings (v24.2.0 as of now) breaks
modules.kubernetes
, as it uses an API which was deprecated 3 years ago in Kubernetes v1.16 and announced to be deprecated in v1.9.Setup
kubeconfig
fileSteps to Reproduce the behavior
salt-call state.single pip.installed name='kubernetes>=24.2.0'
salt-call kubernetes.nodes context=default kubeconfig=/path/to/kubeconfig
Expected behavior
Provide full
modules.kubernetes
functionality with an up-to-datekubernetes
Python module, e.g. show all nodes of the cluster when executingkubernetes.nodes
.Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
The strategy of simply adding another level of
try
/except ImportError
as done in the past:...didn't work for me in this case, as it would require quite some refactoring to work with recent Kubernetes APIs.
As a workaround, I'm using
... pip.installed name='kubernetes >= 12.0.0, <= 16.0.0'
now which at least ensures the module loads, but I can't tell yet how far it'll cover my clusters functionality provided by its 24.3.0 API.The text was updated successfully, but these errors were encountered: