Skip to content

K8s integrations feature#366

Closed
ghost wants to merge 10 commits intomasterfrom
unknown repository
Closed

K8s integrations feature#366
ghost wants to merge 10 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Nov 15, 2017

This will allow you to include "datadog_agent::integrations::kubernetes".

@irabinovitch irabinovitch requested a review from truthbk November 15, 2017 19:10
Copy link
Copy Markdown
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for the most part, just a small comment. We'd also be missing the spec tests which are really must before we can merge. You should be able to get plenty of inspiration from the existing tests.

Thanks for this 🙇

Comment thread manifests/integrations/kubernetes.pp Outdated
$dst = "${datadog_agent::conf_dir}/kubernetes.yaml"
}

package { 'dd-check-kubernetes':
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not always true, we bundle a check with the agent, so what you should ensure here is the agent is installed not dd-check-kubernetes (I think that's actually taken care of by the include datadog-agent directive above).

Comment thread manifests/integrations/kubernetes.pp Outdated
# Sample Usage:
#
# class { 'datadog_agent::integrations::kubernetes' :
# api_server_url => 'https://kubernetes:443',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll want to cover auth as well the the certificate options in kubernetes.yaml as well

if $::datadog_agent::agent6_enable {
$dst = "${datadog_agent::conf6_dir}/kubernetes.yaml"
} else {
$dst = "${datadog_agent::conf_dir}/kubernetes.yaml"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont forget kube_state_metrics as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is technically a "different" integration, would need it's own manifest.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see. I'll add the manifest for it.

@irabinovitch
Copy link
Copy Markdown

Have you considered enabling autodiscovery here as well? service_discovery_backend: docker should be set, unless they override with one of the others.

https://docs.datadoghq.com/guides/autodiscovery/

Copy link
Copy Markdown
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spec tests are still missing... could you please add them? 🙇

@@ -0,0 +1,22 @@
init_config:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kubernetes_state is a different integration, if you want to add this you'll need to have a separate manifest for it: manifests/integrations/kubernetes_state.pp

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah maybe I miss understood @irabinovitch request to not forget kubernetes_state_metrics. I reviewed the dd docs, but nothing states what is added to the yaml. Only the kubernetes pods file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added the tests, but these are my first spec tests ever. So please let me know if I miss understood anything or what to rework.

#
# init_retries: 5

instances:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's a use case where we'd want to support multiple instances for the kubernetes integration... Is that correct? Just double-checking in case you want to add the support for that now. It's no biggie, as it's fairly easy to add (maybe not in the most idiomatic way) while retaining backward compatibility, we can always add it in the future.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ill just leave that out for now then.

@truthbk
Copy link
Copy Markdown
Member

truthbk commented Nov 23, 2017

merged #369 based off this PR and with spec tests fixed. Closing. Thanks @lowkeyshift

@truthbk truthbk closed this Nov 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants