-
Notifications
You must be signed in to change notification settings - Fork 813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[kube] Allow to run agent on the node #3401
Conversation
- added bearer_token_path for serviceaccount token auth - added api_server_host and api_server_port options
utils/kubernetes/kubeutil.py
Outdated
k8_check_config = check_yaml(k8_config_file_path) | ||
return len(k8_check_config['instances']) > 0 | ||
except Exception: | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we log.debug the exception at least? This kind of silent catch-all is difficult to debug
Hi @sophaskins, from last time we talked I think you could be interested in this. Anything else you think we should make configurable? |
Yes! I definitely am! I've been spending this week forward porting our patches on top of 5.14.1 (from 5.10.1 - yikes!), so it's fresh in my mind. These are definitely things that we'd love to see! It makes things a bit messier, but I'd like to be able to specify whether or not the apiserver uses TLS. We have our apiserver pods bind to self.tls_settings = self._init_tls_settings(instance)
# apiserver
- self.kubernetes_api_url = 'https://%s/api/v1' % (os.environ.get('KUBERNETES_SERVICE_HOST') or self.DEFAULT_MASTER_NAME)
+ if instance.get('kubernetes_api_url'):
+ # when running on master nodes _outside_ of a pod, it's useful
+ # to directly specify the non-tls "insecure address/port"
+ # note that if you use this option, you need to specify the full base
+ # url, ie http://kubernetes:1234/api/v1
+ self.kubernetes_api_url = instance.get('kubernetes_api_url')
+ else:
+ self.kubernetes_api_url = 'https://%s/api/v1' % (os.environ.get('KUBERNETES_SERVICE_HOST') or
+ self.DEFAULT_MASTER_NAME)
# kubelet
try: Since none of the blocks in |
Thanks for your input. I'll switch to a unique |
Hi @sophaskins |
Yes! I think that is perfect - thanks <3 |
What does this PR do?
kubernetes.yaml
is present and valid, enable k8s tagging for Docker and SD metricsSister PR for configuration: DataDog/integrations-core#508
Tested on container (datadog/dev-dd-agent:xvello_kube_on_host image) and deb package on ubuntu host.
fixes #3221