centreon-plugins
centreon-plugins copied to clipboard
fix(plugin) kubenetes api
Fix unrelevant path on latest k8s version for cronjob api and ingresses api
/usr/lib/centreon/plugins//centreon_kubernetes_api.pl --plugin=cloud::kubernetes::plugin --mode=list-ingresses --custommode='api' --hostname=172.16.5.223 --port='6443' --proto='https' --token='***' --config-file='' --proxyurl='' --namespace='default' --timeout='10'
List ingresses:
[uid: 80b37c13-dea7-42cb-bb5d-e49cf0765d5c] [name: apache-ingress] [namespace: default]
/usr/lib/centreon/plugins//centreon_kubernetes_api.pl --plugin=cloud::kubernetes::plugin --mode=cronjob-status --custommode='api' --hostname=172.16.5.223 --port='6443' --proto='https' --token='***' --config-file='' --proxyurl='' --namespace='default' --timeout='10' --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE" --filter-name='.*' --filter-namespace='.*' --warning-status='' --critical-status='' --verbose
OK: All CronJobs status are ok
do you know what kube version you client have and since which this path became unrevelent ? we can't change the api we use if other client have an older version still active, that would force them to update.
Client version is
Client Version: v1.30.0
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.0
No idea when it got officially release
You need an option to override the path and be backward compatible
Fixed with https://github.com/centreon/centreon-plugins/pull/5109 taking account of Quentin's comment.