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

Pod is not created with Apache auto-instrumentation #3547

Closed
L3o-pold opened this issue Dec 14, 2024 · 0 comments · Fixed by #3548
Closed

Pod is not created with Apache auto-instrumentation #3547

L3o-pold opened this issue Dec 14, 2024 · 0 comments · Fixed by #3548
Labels
bug Something isn't working needs triage

Comments

@L3o-pold
Copy link
Contributor

L3o-pold commented Dec 14, 2024

Component(s)

auto-instrumentation

What happened?

Description

Pod is not created with Apache auto-instrumentation

Steps to Reproduce

k3s cluster v1.31.3+k3s1

apiVersion: apps/v1
kind: Deployment
metadata:
  name: x
  labels:
    app.kubernetes.io/name: x
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: x
  template:
    metadata:
      labels:
        app.kubernetes.io/name: x
      annotations:
        sidecar.opentelemetry.io/inject: 'true'
        instrumentation.opentelemetry.io/inject-apache-httpd: "true"
        instrumentation.opentelemetry.io/apache-httpd-container-names: "apache"
    spec:
      containers:
        - image: x
          imagePullPolicy: IfNotPresent
          name: apache
          readinessProbe:
            tcpSocket:
              port: http
          livenessProbe:
            tcpSocket:
              port: http
          ports:
            - name: http
              protocol: TCP
              containerPort: 80
          lifecycle:
            preStop:
              exec:
                command: [ "apachectl", "-k", "graceful-stop" ]

Expected Result

Pod creating successfully

Actual Result

Pod are never created with the following error:

Error creating: Pod "x-6c4dfc6c6c-t9p24" is invalid: spec.initContainers[1].lifecycle: Forbidden: may not be set for init containers without restartPolicy=Always

Kubernetes Version

v1.31.3+k3s1

Operator version

0.114.1

Collector version

0.115.1

Environment information

Environment

OS: Ubuntu 22.04.5 LTS

Log output

No response

Additional context

It worked with Nginx auto-instrumentation but not with Apache

@L3o-pold L3o-pold added bug Something isn't working needs triage labels Dec 14, 2024
@L3o-pold L3o-pold changed the title Apache autoinstrumentation not working Apache auto-instrumentation not working Dec 14, 2024
@L3o-pold L3o-pold changed the title Apache auto-instrumentation not working Pod is not created with Apache auto-instrumentation Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant