Giter Club home page Giter Club logo

Comments (10)

jimmidyson avatar jimmidyson commented on May 28, 2024

I've just checked & that only looks like it's added if you set the kubernetes_url config param. It comes from the pod spec retrieved from the api server.

from fluent-plugin-kubernetes_metadata_filter.

jchauncey avatar jchauncey commented on May 28, 2024

Ah k yeah I have the k8s api set but I'm getting null for that value in the
logs. I'll investigate further. Thanks
On Jan 14, 2016 12:54 PM, "Jimmi Dyson" [email protected] wrote:

I've just checked & that only looks like it's added if you set the
kubernetes_url config param. It comes from the pod spec retrieved from
the api server.


Reply to this email directly or view it on GitHub
#9 (comment)
.

from fluent-plugin-kubernetes_metadata_filter.

jimmidyson avatar jimmidyson commented on May 28, 2024

It gets the host value from the get pods - should be able to see it in kubectl get pods <podName> -oyaml & look for spec.host (nested object so just it will be on separate lines).

If it doesn't show that can you share the YAML for the pod so I can see what's wrong & try to fix?

from fluent-plugin-kubernetes_metadata_filter.

jchauncey avatar jchauncey commented on May 28, 2024
spec:
  containers:
  - args:
    - start
    - web
    env:
    - name: PORT
      value: "5000"
    - name: SLUG_URL
      value: http://10.100.115.0:9000/git/home/foo:git-0bcdbff30f986e0cdea5c3f427e6a174fac5ca3b/push/slug.tgz
    - name: DEBUG
      value: "1"
    - name: DEIS_APP
      value: foo
    - name: DEIS_RELEASE
      value: v2
    - name: DOCKERIMAGE
      value: "1"
    image: quay.io/deisci/slugrunner:v2-beta
    imagePullPolicy: Always
    livenessProbe:
      httpGet:
        path: /
        port: 5000
        scheme: HTTP
      initialDelaySeconds: 10
      timeoutSeconds: 1
    name: foo-web
    readinessProbe:
      httpGet:
        path: /
        port: 5000
        scheme: HTTP
      initialDelaySeconds: 10
      timeoutSeconds: 1
    resources: {}
    terminationMessagePath: /dev/termination-log
    volumeMounts:
    - mountPath: /var/run/secrets/object/store
      name: minio-user
      readOnly: true
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: default-token-g4s5i
      readOnly: true
  dnsPolicy: ClusterFirst
  nodeName: 192.168.64.2
  restartPolicy: Always
  serviceAccount: default
  serviceAccountName: default
  terminationGracePeriodSeconds: 30
  volumes:
  - name: minio-user
    secret:
      secretName: minio-user
  - name: default-token-g4s5i
    secret:
      secretName: default-token-g4s5i
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: null
    status: "True"
    type: Ready
  containerStatuses:
  - containerID: docker://8d1b4dde9d7e0e3323571179f1617c67d7377559a6214f255e286d3f222ca636
    image: quay.io/deisci/slugrunner:v2-beta
    imageID: docker://bfc3e9335c6bd79659da5db384cc887a277bbe3d085e6962d5073d2dbbcb7428
    lastState: {}
    name: foo-web
    ready: true
    restartCount: 0
    state:
      running:
        startedAt: 2016-01-15T20:37:24Z
  hostIP: 192.168.64.2
  phase: Running
  podIP: 172.17.0.16
  startTime: 2016-01-15T20:36:52Z

from fluent-plugin-kubernetes_metadata_filter.

jchauncey avatar jchauncey commented on May 28, 2024

so thats the pod yaml created from a deis app. So its definitely missing spec.host.

from fluent-plugin-kubernetes_metadata_filter.

jimmidyson avatar jimmidyson commented on May 28, 2024

OK I see spec.nodeName - perhaps we should check both if one isn't present? Fancy submitting a PR for that?

from fluent-plugin-kubernetes_metadata_filter.

jchauncey avatar jchauncey commented on May 28, 2024

sure thing.

from fluent-plugin-kubernetes_metadata_filter.

jimmidyson avatar jimmidyson commented on May 28, 2024

Looks like this was a v1beta3 thing. Prefer spec.nodeName please in your PR.

Sorry about this!

from fluent-plugin-kubernetes_metadata_filter.

jimmidyson avatar jimmidyson commented on May 28, 2024

In fact I'm happy to only use spec.nodeName tbh, drop spec.host completely.

from fluent-plugin-kubernetes_metadata_filter.

jchauncey avatar jchauncey commented on May 28, 2024

alright sounds good

from fluent-plugin-kubernetes_metadata_filter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.