* chore(source/service): serviceTypeFilter edge case tests
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(source/service): serviceTypeFilter edge case tests
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat: reduce cyclomatic complexity of service_test
* style: indention added
* style: tab
* refactor: address PR feedback, improve tests, and reduce complexity
* fix(service): address PR feedback and fix linting
* Revert "fix(service): address PR feedback and fix linting"
This reverts commit 4cba488dc741ee1d946b105da952c09893c289c4.
* refactor: address all PR feedback - improve method naming, add test coverage, fix parameter ordering
* refactor: address latest PR feedback - convert to method, use testutils, add test coverage
* test: add coverage for pod hostname scenario
Addresses 4th to last PR comment about missing test coverage for
the case where pod.Spec.Hostname is set, which creates additional
headless domains (pod-specific hostname + base hostname)
* style: remove extra line
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* style: remove extra line
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
---------
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* feat: use transformers in pod informers to reduce memory footprint
Add a transformer to the pods informer of the pod and service sources.
Refs: #5595
Signed-off-by: Valerian Roche <valerian.roche@datadoghq.com>
* Do not use transformer when fqdnTemplate is set
* Update source/pod_test.go
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
---------
Signed-off-by: Valerian Roche <valerian.roche@datadoghq.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* fix(source/service): disable pod and endpointSlicesInformer when not required
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* fix(source/service): disable pod and endpointSlicesInformer when not required
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* fix(source/service): disable pod and endpointSlices informers when they are not needed
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* fix(source/service): disable pod and endpointSlices informers when they are not needed
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* fix(source/service): disable node informer when service type filter is activated
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
fix(source/service): disable node informer when service type filter is activated
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
fix(source/service): disable node informer when service type filter is activated
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
fix(source/service): disable node informer when service type filter is activated
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* fix(source/service): disable node informer when service type filter is activated
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* fix(source/service): disable node informer when service type filter is activated
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* chore(source/service): restructure code with filters are testable
* chore(source/service): restructure code with filters are testable
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* chore(source/service): restructure code with filters are testable
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* chore(fqdn): fqdn move to specific folder and update documentation
* chore(fqdn): fqdn move to specific folder and update documentation
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* chore(fqdn): fqdn move to specific folder and update documentation
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(fqdn): fqdn move to specific folder and update documentation
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(fqdn): fqdn move to specific folder and update documentation
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
If external-dns.alpha.kubernetes.io/target annotation is present on a
pod, it's value will be used as the target for the headless service.
If annotation external-dns.alpha.kubernetes.io/access=public is present,
NodeExternalIP of the node running the pod is used as the target for the
headless service.