Skip to content
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

[Operator] Service definition in Operator for AWS controller (NLB+ACM) to expose OTEL-Collector outside of k8s #1493

Open
szibis opened this issue Jan 15, 2025 · 0 comments

Comments

@szibis
Copy link

szibis commented Jan 15, 2025

Four services are exposed in the operator itself, but all of them are in the K8s cluster and accessible.
The only way, but not very flexible (cert-manager for external cert and ingress externally exposed), is to use Ingress, which is available at https://github.com/open-telemetry/opentelemetry-operator/blob/main/docs/api.md
I would like to expose AWS NLB from the collector definition as a k8s service as bellow.

apiVersion: v1
kind: Service
metadata:
annotations:
  external-dns.alpha.kubernetes.io/hostname: {{ .Values.hostname }}
  service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: "app=otel-collector,env={{ .Values.env }}"
  service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
  service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
  service.beta.kubernetes.io/aws-load-balancer-scheme: internal
  service.beta.kubernetes.io/aws-load-balancer-ssl-cert: {{ $certArn }}
  service.beta.kubernetes.io/aws-load-balancer-ssl-ports: '4317,4318'
  service.beta.kubernetes.io/aws-load-balancer-type: external
labels:
  app.kubernetes.io/instance: opentelemetry-stack.otel-collector
  app.kubernetes.io/managed-by: Helm
  app.kubernetes.io/name: otel-collector
  helm.sh/chart: opentelemetry-stack
name: otel-collector-lb
namespace: opentelemetry-stack
spec:
ports:
  - name: otlp-grpc
    port: 4317
    protocol: TCP
    targetPort: 4317
  - name: otlp-http
    port: 4318
    protocol: TCP
    targetPort: 4318
selector:
  app.kubernetes.io/instance: opentelemetry-kube-stack.otel-collector
  app.kubernetes.io/name: otel-collector
type: LoadBalancer

AWS NLB with ACM cert termination is the simplest way to implement and expose in k8s.
It would be great to be able to add a custom service in the operator collector scope.

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

No branches or pull requests

1 participant