module KubernetesMetadata::TestApiAdapter
Public Instance Methods
api_valid?()
click to toggle source
# File lib/fluent/plugin/kubernetes_metadata_test_api_adapter.rb, line 26 def api_valid? true end
get_namespace(namespace_name)
click to toggle source
# File lib/fluent/plugin/kubernetes_metadata_test_api_adapter.rb, line 29 def get_namespace(namespace_name) return { metadata: { name: namespace_name, uid: namespace_name + 'uuid', labels: { foo_ns: 'bar_ns' } } } end
get_pod(pod_name, namespace_name)
click to toggle source
# File lib/fluent/plugin/kubernetes_metadata_test_api_adapter.rb, line 41 def get_pod(pod_name, namespace_name) return { metadata: { name: pod_name, namespace: namespace_name, uid: namespace_name + namespace_name + "uuid", labels: { foo: 'bar' } }, spec: { nodeName: 'aNodeName', containers: [{ name: 'foo', image: 'bar' }, { name: 'bar', image: 'foo' }] }, status: { podIP: '172.17.0.8' } } end