Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

The Deployment "jaeger" is invalid #120

Open
yuya894 opened this issue Oct 10, 2019 · 14 comments · May be fixed by #121
Open

The Deployment "jaeger" is invalid #120

yuya894 opened this issue Oct 10, 2019 · 14 comments · May be fixed by #121

Comments

@yuya894
Copy link

yuya894 commented Oct 10, 2019

Requirement - what kind of business use case are you trying to solve?

$ kubectl create -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml

in

$ kubectl version | cut -c 52-72
 GitVersion:"v1.16.1"
 GitVersion:"v1.16.0"
$ minikube version
minikube version: v1.4.0
commit: 7969c25a98a018b94ea87d949350f3271e9d64b6

Problem - what in Jaeger blocks you from solving the requirement?

appear this message & jaeger-query not access on browser

The Deployment "jaeger" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"app":"jaeger", "app.kubernetes.io/component":"all-in-one", "app.kubernetes.io/name":"jaeger"}: `selector` does not match template `labels`

Proposal - what do you suggest to solve the problem or improve the existing situation?

Change the yml according to kubernates 1.16 api

changed yml
apiVersion: v1
kind: List
items:
- apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: jaeger
    labels:
      app: jaeger
      app.kubernetes.io/name: jaeger
      app.kubernetes.io/component: all-in-one
  spec:
    selector:
      matchLabels:
        app: jaeger
    replicas: 1
    strategy:
      type: Recreate
    template:
      metadata:
        labels:
          app: jaeger
          app.kubernetes.io/name: jaeger
          app.kubernetes.io/component: all-in-one
        annotations:
          prometheus.io/scrape: "true"
          prometheus.io/port: "16686"
      spec:
          containers:
          -   env:
              - name: COLLECTOR_ZIPKIN_HTTP_PORT
                value: "9411"
              image: jaegertracing/all-in-one
              name: jaeger
              ports:
                - containerPort: 5775
                  protocol: UDP
                - containerPort: 6831
                  protocol: UDP
                - containerPort: 6832
                  protocol: UDP
                - containerPort: 5778
                  protocol: TCP
                - containerPort: 16686
                  protocol: TCP
                - containerPort: 9411
                  protocol: TCP
              readinessProbe:
                httpGet:
                  path: "/"
                  port: 14269
                initialDelaySeconds: 5
- apiVersion: v1
  kind: Service
  metadata:
    name: jaeger-query
    labels:
      app: jaeger
      app.kubernetes.io/name: jaeger
      app.kubernetes.io/component: query
  spec:
    selector:
      matchLabels:
        app: jaeger-query
    ports:
      - name: query-http
        port: 80
        protocol: TCP
        targetPort: 16686
    selector:
      app.kubernetes.io/name: jaeger
      app.kubernetes.io/component: all-in-one
    type: LoadBalancer
- apiVersion: v1
  kind: Service
  metadata:
    name: jaeger-collector
    labels:
      app: jaeger
      app.kubernetes.io/name: jaeger
      app.kubernetes.io/component: collector
  spec:
    selector:
      matchLabels:
        app: jaeger-collector
    ports:
    - name: jaeger-collector-tchannel
      port: 14267
      protocol: TCP
      targetPort: 14267
    - name: jaeger-collector-http
      port: 14268
      protocol: TCP
      targetPort: 14268
    - name: jaeger-collector-zipkin
      port: 9411
      protocol: TCP
      targetPort: 9411
    selector:
      app.kubernetes.io/name: jaeger
      app.kubernetes.io/component: all-in-one
    type: ClusterIP
- apiVersion: v1
  kind: Service
  metadata:
    name: jaeger-agent
    labels:
      app: jaeger
      app.kubernetes.io/name: jaeger
      app.kubernetes.io/component: agent
  spec:
    selector:
      matchLabels:
        app: jaeger-agent
    ports:
    - name: agent-zipkin-thrift
      port: 5775
      protocol: UDP
      targetPort: 5775
    - name: agent-compact
      port: 6831
      protocol: UDP
      targetPort: 6831
    - name: agent-binary
      port: 6832
      protocol: UDP
      targetPort: 6832
    - name: agent-configs
      port: 5778
      protocol: TCP
      targetPort: 5778
    clusterIP: None
    selector:
      app.kubernetes.io/name: jaeger
      app.kubernetes.io/component: all-in-one
- apiVersion: v1
  kind: Service
  metadata:
    name: zipkin
    labels:
      app: jaeger
      app.kubernetes.io/name: jaeger
      app.kubernetes.io/component: zipkin
  spec:
    selector:
      matchLabels:
        app: zipkin
    ports:
    - name: jaeger-collector-zipkin
      port: 9411
      protocol: TCP
      targetPort: 9411
    clusterIP: None
    selector:
      app.kubernetes.io/name: jaeger
      app.kubernetes.io/component: all-in-one
@yuya894 yuya894 changed the title The Deployment "jaeger" is invalid (failed kubectl create all-in-one) The Deployment "jaeger" is invalid Oct 10, 2019
@jpkrohling
Copy link
Collaborator

@boyoyon8 would you be open to sending your recommended change as a PR?

@Dean-Coakley
Copy link

I am experiencing this issue too. Any updates @fredrikssongustav ?

@jpkrohling
Copy link
Collaborator

@fredrikssongustav, if you are stuck, let us know and we can try to help!

@fredrikssongustav
Copy link

@jpkrohling I got kinda stuck on it. Or well, I was able to run the build successfully in minikube by running the commands in bash that travisci goes through here https://travis-ci.org/jaegertracing/jaeger-kubernetes/jobs/625339244?utm_medium=notification&utm_source=github_status and concluded something was fishy about travis. And frankly, I was able to apply the necessary configurations from my fork so I was able to debug my jaeger setup locally and kinda forgot about this 😅

But I'd love to close it if you have any ideas?

@jpkrohling
Copy link
Collaborator

That specific job is failing due to formatting problems:

[WARNING] Missing header in: /home/travis/build/jaegertracing/jaeger-kubernetes/travis/install-start-minikube.sh
...
[ERROR] Failed to execute goal com.mycila:license-maven-plugin:3.0:check (default) on project jaegertracing-kubernetes-parent: Some files do not have the expected license header -> [Help 1]

This one can be fixed with mvn license:format.

@Dean-Coakley
Copy link

Would love to get this resolved as it breaks our Opentracing example for most users: https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/opentracing#step-2---deploy-a-tracer

Happy to try opening a PR sometime next week if not resolved. - I'm not very knowledgable about TravisCI either though. 😄

@jpkrohling
Copy link
Collaborator

No need to be a Travis expert: with a local minikube, you should be able to perform ./mvnw clean verify -Pall-in-one. If it passes, chances are high that CI will pass.

@Dean-Coakley
Copy link

Dean-Coakley commented Feb 11, 2020

@jpkrohling On my minikube when running ./mvnw clean verify -Pall-in-one I get:

[ERROR] Failed to execute goal org.apache.maven.plugins:
maven-failsafe-plugin:2.20.1:
integration-test (run-integration-tests) on project jaegertracing-kubernetes-all-in-one: 
Execution run-integration-tests of goal org.apache.maven.plugins:maven-failsafe-plugin:2.20.1:integration-test failed.:
NullPointerException -> [Help 1]

¯\_(ツ)_/¯

@fredrikssongustav
Copy link

@jpkrohling
Copy link
Collaborator

I got a different one when running locally:

$ ./mvnw clean verify -Pcassandra,elasticsearch,all-in-one
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] jaegertracing-kubernetes-parent
[INFO] jaegertracing-kubernetes-deployment-itest
[INFO] jaegertracing-kubernetes-all-in-one
[INFO] jaegertracing-kubernetes-production
[INFO] jaegertracing-kubernetes-production-elasticsearch
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building jaegertracing-kubernetes-parent 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ jaegertracing-kubernetes-parent ---
[INFO] 
[INFO] --- license-maven-plugin:3.0:check (default) @ jaegertracing-kubernetes-parent ---
[INFO] Checking licenses...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building jaegertracing-kubernetes-deployment-itest 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ jaegertracing-kubernetes-deployment-itest ---
[INFO] Deleting /mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/jaegertracing-kubernetes-deployment-itest/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ jaegertracing-kubernetes-deployment-itest ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/jaegertracing-kubernetes-deployment-itest/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ jaegertracing-kubernetes-deployment-itest ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/jaegertracing-kubernetes-deployment-itest/target/classes
[WARNING] /mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/jaegertracing-kubernetes-deployment-itest/src/main/java/io/jaegertracing/kubernetes/deployment/BaseETest.java: /mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/jaegertracing-kubernetes-deployment-itest/src/main/java/io/jaegertracing/kubernetes/deployment/BaseETest.java uses or overrides a deprecated API.
[WARNING] /mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/jaegertracing-kubernetes-deployment-itest/src/main/java/io/jaegertracing/kubernetes/deployment/BaseETest.java: Recompile with -Xlint:deprecation for details.
[INFO] 
[INFO] --- license-maven-plugin:3.0:check (default) @ jaegertracing-kubernetes-deployment-itest ---
[INFO] Checking licenses...
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ jaegertracing-kubernetes-deployment-itest ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/jaegertracing-kubernetes-deployment-itest/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ jaegertracing-kubernetes-deployment-itest ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.20.1:test (default-test) @ jaegertracing-kubernetes-deployment-itest ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ jaegertracing-kubernetes-deployment-itest ---
[INFO] Building jar: /mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/jaegertracing-kubernetes-deployment-itest/target/jaegertracing-kubernetes-deployment-itest-0.0.1-SNAPSHOT.jar
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building jaegertracing-kubernetes-all-in-one 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ jaegertracing-kubernetes-all-in-one ---
[INFO] Deleting /mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/all-in-one/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ jaegertracing-kubernetes-all-in-one ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ jaegertracing-kubernetes-all-in-one ---
[INFO] No sources to compile
[INFO] 
[INFO] --- license-maven-plugin:3.0:check (default) @ jaegertracing-kubernetes-all-in-one ---
[INFO] Checking licenses...
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ jaegertracing-kubernetes-all-in-one ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ jaegertracing-kubernetes-all-in-one ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/all-in-one/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.20.1:test (default-test) @ jaegertracing-kubernetes-all-in-one ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ jaegertracing-kubernetes-all-in-one ---
[INFO] Building jar: /mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/all-in-one/target/jaegertracing-kubernetes-all-in-one-0.0.1-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-failsafe-plugin:2.20.1:integration-test (run-integration-tests) @ jaegertracing-kubernetes-all-in-one ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.jaegertracing.kubernetes.AllInOneETest
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Initializing Session:ac61f9ba
Using Kubernetes at: https://192.168.39.192:8443/
Creating namespace: itest-ac61f9ba...
To switch to the new namespace: kubectl config set-context `kubectl config current-context` --namespace=itest-ac61f9ba
Feb 12, 2020 12:24:37 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading io/jaegertracing/kubernetes/jaegertracing-kubernetes-deployment-itest/0.0.1-SNAPSHOT/maven-metadata.xml from http://repo1.maven.org/maven2/. Reason: 
org.eclipse.aether.transfer.MetadataTransferException: Could not transfer metadata io.jaegertracing.kubernetes:jaegertracing-kubernetes-deployment-itest:0.0.1-SNAPSHOT/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/io/jaegertracing/kubernetes/jaegertracing-kubernetes-deployment-itest/0.0.1-SNAPSHOT/maven-metadata.xml from http://repo1.maven.org/maven2/io/jaegertracing/kubernetes/jaegertracing-kubernetes-deployment-itest/0.0.1-SNAPSHOT/maven-metadata.xml
Applying kubernetes configuration from: jar:file:/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/all-in-one/target/jaegertracing-kubernetes-all-in-one-0.0.1-SNAPSHOT.jar!/jaeger-all-in-one-template.yml
Deleting namespace: itest-ac61f9ba...
Namespace: itest-ac61f9ba, successfully deleted
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.445 s <<< FAILURE! - in io.jaegertracing.kubernetes.AllInOneETest
[ERROR] io.jaegertracing.kubernetes.AllInOneETest  Time elapsed: 3.443 s  <<< ERROR!
java.lang.RuntimeException: io.fabric8.kubernetes.clnt.v3_1.KubernetesClientException: Failure executing: POST at: https://192.168.39.192:8443/apis/extensions/v1/namespaces/itest-ac61f9ba/deployments. Message: the server could not find the requested resource. Received status: Status(apiVersion=v1, code=404, details=StatusDetails(causes=[], group=null, kind=null, name=null, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=the server could not find the requested resource, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=NotFound, status=Failure, additionalProperties={}).
Caused by: io.fabric8.kubernetes.clnt.v3_1.KubernetesClientException: Failure executing: POST at: https://192.168.39.192:8443/apis/extensions/v1/namespaces/itest-ac61f9ba/deployments. Message: the server could not find the requested resource. Received status: Status(apiVersion=v1, code=404, details=StatusDetails(causes=[], group=null, kind=null, name=null, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=the server could not find the requested resource, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=NotFound, status=Failure, additionalProperties={}).

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Errors: 
[ERROR]   AllInOneETest.io.jaegertracing.kubernetes.AllInOneETest » Runtime io.fabric8.k...
[INFO] 
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-failsafe-plugin:2.20.1:verify (verify) @ jaegertracing-kubernetes-all-in-one ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] jaegertracing-kubernetes-parent .................... SUCCESS [  1.100 s]
[INFO] jaegertracing-kubernetes-deployment-itest .......... SUCCESS [  2.166 s]
[INFO] jaegertracing-kubernetes-all-in-one ................ FAILURE [  5.126 s]
[INFO] jaegertracing-kubernetes-production ................ SKIPPED
[INFO] jaegertracing-kubernetes-production-elasticsearch .. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.553 s
[INFO] Finished at: 2020-02-12T12:24:39+01:00
[INFO] Final Memory: 35M/356M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.20.1:verify (verify) on project jaegertracing-kubernetes-all-in-one: There are test failures.
[ERROR] 
[ERROR] Please refer to /mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-kubernetes/all-in-one/target/failsafe-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :jaegertracing-kubernetes-all-in-one

@pavolloffay: have you seen this before? Looks like the Arquillian tests are failing both on master and for this PR.

@Dean-Coakley
Copy link

@pavolloffay ping. 😬

Sounds like the all-in-one test is failing on master, which is preventing the merge of this PR.
Can you take a look? Any suggestions?

@pavolloffay
Copy link
Member

Were you able to run the test locally?

@Dean-Coakley
Copy link

Running ./mvnw clean verify -Pall-in-one locally gives me:

[ERROR] Failed to execute goal org.apache.maven.plugins:
maven-failsafe-plugin:2.20.1:
integration-test (run-integration-tests) on project jaegertracing-kubernetes-all-in-one: 
Execution run-integration-tests of goal org.apache.maven.plugins:maven-failsafe-plugin:2.20.1:integration-test failed.:
NullPointerException -> [Help 1]

Currently testing against master.

I'm not sure if that is helpful. Or if that's what you meant.

@Rulox
Copy link

Rulox commented Apr 10, 2020

@pavolloffay any update on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants