Skip to content

aws: add integrations for CloudWatch Explore related feature #10207

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

Open
wants to merge 6 commits into
base: 3.2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -5,8 +5,11 @@
*~
_book/
lib/jemalloc
cmake-build-debug/
tests/internal/flb_tests_internal.h
tests/runtime/flb_tests_runtime.h
tests/internal/cmake-build-debug/
tests/runtime/cmake-build-debug/
build/*
include/fluent-bit/flb_info.h
include/fluent-bit/flb_plugins.h
3 changes: 3 additions & 0 deletions include/fluent-bit/flb_hash_table.h
Original file line number Diff line number Diff line change
@@ -58,6 +58,7 @@ struct flb_hash_table {
int total_count;
int cache_ttl;
int case_sensitivity;
int force_remove_pointer;
size_t size;
struct mk_list entries;
struct flb_hash_table_chain *table;
@@ -66,6 +67,8 @@ struct flb_hash_table {
struct flb_hash_table *flb_hash_table_create(int evict_mode, size_t size, int max_entries);
struct flb_hash_table *flb_hash_table_create_with_ttl(int cache_ttl, int evict_mode,
size_t size, int max_entries);
struct flb_hash_table *flb_hash_table_create_with_ttl_force_destroy(int cache_ttl, int evict_mode,
size_t size, int max_entries);
void flb_hash_table_destroy(struct flb_hash_table *ht);

void flb_hash_table_set_case_sensitivity(struct flb_hash_table *ht, int status);
49 changes: 48 additions & 1 deletion plugins/filter_aws/aws.c
Original file line number Diff line number Diff line change
@@ -804,7 +804,7 @@ static int ec2_metadata_group_should_fetch(struct flb_filter_aws *ctx,

interval = now - group->last_fetch_attempt;

if (group->last_fetch_attempt > 0 &&
if (group->last_fetch_attempt > 0 &&
interval < required_interval) {
return FLB_FALSE;
}
@@ -926,6 +926,30 @@ static int get_ec2_metadata(struct flb_filter_aws *ctx)
ctx->metadata_retrieved = FLB_TRUE;
}

if (ctx->enable_entity) {
if (!ctx->account_id) {
ret = flb_aws_imds_request_by_key(ctx->client_imds, FLB_AWS_IMDS_ACCOUNT_ID_PATH,
&ctx->account_id, &ctx->account_id_len,
"accountId");

if (ret < 0) {
flb_plg_error(ctx->ins, "Failed to get Account ID");
return -1;
}
}

if (!ctx->instance_id) {
ret = flb_aws_imds_request(ctx->client_imds, FLB_AWS_IMDS_INSTANCE_ID_PATH,
&ctx->instance_id,
&ctx->instance_id_len);
if (ret < 0) {
flb_plg_error(ctx->ins, "Failed to get instance ID");
return -1;
}
}
}

ctx->metadata_retrieved = FLB_TRUE;
return 0;
}

@@ -1104,6 +1128,23 @@ static int cb_aws_filter(const void *data, size_t bytes,
}
}

if (ctx->enable_entity &&
ctx->instance_id &&
ctx->account_id &&
ret == FLB_EVENT_ENCODER_SUCCESS) {
ret = flb_log_event_encoder_append_body_values(
&log_encoder,
FLB_LOG_EVENT_CSTRING_VALUE(FLB_FILTER_AWS_ENTITY_INSTANCE_ID_KEY),
FLB_LOG_EVENT_STRING_VALUE(ctx->instance_id,
ctx->instance_id_len));
ret = flb_log_event_encoder_append_body_values(
&log_encoder,
FLB_LOG_EVENT_CSTRING_VALUE(FLB_FILTER_AWS_ENTITY_ACCOUNT_ID_KEY),
FLB_LOG_EVENT_STRING_VALUE(ctx->account_id,
ctx->account_id_len));
}


if (ret == FLB_EVENT_ENCODER_SUCCESS) {
ret = flb_log_event_encoder_commit_record(&log_encoder);
}
@@ -1273,6 +1314,12 @@ static struct flb_config_map config_map[] = {
0, FLB_TRUE, offsetof(struct flb_filter_aws, retry_required_interval),
"Defines minimum duration between retries for fetching metadata groups"
},
{
FLB_CONFIG_MAP_BOOL, "enable_entity", "false",
0, FLB_TRUE, offsetof(struct flb_filter_aws, enable_entity),
"Enable entity prefix for fields used for constructing entity."
"This currently only affects instance ID"
},
{0}
};

9 changes: 9 additions & 0 deletions plugins/filter_aws/aws.h
Original file line number Diff line number Diff line change
@@ -27,6 +27,8 @@
#define FLB_FILTER_AWS_AVAILABILITY_ZONE_KEY_LEN 2
#define FLB_FILTER_AWS_INSTANCE_ID_KEY "ec2_instance_id"
#define FLB_FILTER_AWS_INSTANCE_ID_KEY_LEN 15
#define FLB_FILTER_AWS_ENTITY_INSTANCE_ID_KEY "aws_entity_ec2_instance_id"
#define FLB_FILTER_AWS_ENTITY_INSTANCE_ID_KEY_LEN 26
#define FLB_FILTER_AWS_INSTANCE_TYPE_KEY "ec2_instance_type"
#define FLB_FILTER_AWS_INSTANCE_TYPE_KEY_LEN 17
#define FLB_FILTER_AWS_PRIVATE_IP_KEY "private_ip"
@@ -37,6 +39,8 @@
#define FLB_FILTER_AWS_AMI_ID_KEY_LEN 6
#define FLB_FILTER_AWS_ACCOUNT_ID_KEY "account_id"
#define FLB_FILTER_AWS_ACCOUNT_ID_KEY_LEN 10
#define FLB_FILTER_AWS_ENTITY_ACCOUNT_ID_KEY "aws_entity_account_id"
#define FLB_FILTER_AWS_ENTITY_ACCOUNT_ID_KEY_LEN 21
#define FLB_FILTER_AWS_HOSTNAME_KEY "hostname"
#define FLB_FILTER_AWS_HOSTNAME_KEY_LEN 8

@@ -110,6 +114,11 @@ struct flb_filter_aws {
/* tags_* fields are related to exposing EC2 tags in log labels
* tags_enabled defines if EC2 tags functionality is enabled */
int tags_enabled;
/*
* Enable entity prefix appending. This appends
* 'aws_entity' to relevant keys
*/
int enable_entity;

/* tags_fetched defines if tag keys and values were fetched successfully
* and might be used to inject into msgpack */
24 changes: 24 additions & 0 deletions plugins/filter_kubernetes/kube_conf.c
Original file line number Diff line number Diff line change
@@ -189,6 +189,11 @@ struct flb_kube *flb_kube_conf_create(struct flb_filter_instance *ins,
flb_plg_info(ctx->ins, "https=%i host=%s port=%i",
ctx->api_https, ctx->api_host, ctx->api_port);
}

ctx->pod_hash_table = flb_hash_table_create_with_ttl_force_destroy(ctx->pod_service_map_ttl,
FLB_HASH_TABLE_EVICT_OLDER,
FLB_HASH_TABLE_SIZE,
FLB_HASH_TABLE_SIZE);
return ctx;
}

@@ -206,6 +211,10 @@ void flb_kube_conf_destroy(struct flb_kube *ctx)
flb_hash_table_destroy(ctx->namespace_hash_table);
}

if (ctx->pod_hash_table) {
flb_hash_table_destroy(ctx->pod_hash_table);
}

if (ctx->merge_log == FLB_TRUE) {
flb_free(ctx->unesc_buf);
}
@@ -214,6 +223,9 @@ void flb_kube_conf_destroy(struct flb_kube *ctx)
if (ctx->parser == NULL && ctx->regex) {
flb_regex_destroy(ctx->regex);
}
if (ctx->deploymentRegex) {
flb_regex_destroy(ctx->deploymentRegex);
}

flb_free(ctx->api_host);
flb_free(ctx->token);
@@ -228,6 +240,18 @@ void flb_kube_conf_destroy(struct flb_kube *ctx)
flb_upstream_destroy(ctx->kube_api_upstream);
}

if(ctx->pod_association_tls) {
flb_tls_destroy(ctx->pod_association_tls);
}

if (ctx->pod_association_upstream) {
flb_upstream_destroy(ctx->pod_association_upstream);
}

if (ctx->platform) {
flb_free(ctx->platform);
}

#ifdef FLB_HAVE_TLS
if (ctx->tls) {
flb_tls_destroy(ctx->tls);
68 changes: 68 additions & 0 deletions plugins/filter_kubernetes/kube_conf.h
Original file line number Diff line number Diff line change
@@ -65,8 +65,40 @@
#define FLB_KUBE_TAG_PREFIX "kube.var.log.containers."
#endif

/*
* Maximum attribute length for Entity's KeyAttributes
* values
* https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_Service.html#:~:text=Maximum%20length%20of%201024.
*/
#define KEY_ATTRIBUTES_MAX_LEN 1024
#define SERVICE_NAME_SOURCE_MAX_LEN 64

/*
* Configmap used for verifying whether if FluentBit is
* on EKS or native Kubernetes
*/
#define KUBE_SYSTEM_NAMESPACE "kube-system"
#define AWS_AUTH_CONFIG_MAP "aws-auth"

/*
* Possible platform values for Kubernetes plugin
*/
#define NATIVE_KUBERNETES_PLATFORM "k8s"
#define EKS_PLATFORM "eks"

struct kube_meta;

struct service_attributes {
char name[KEY_ATTRIBUTES_MAX_LEN];
int name_len;
char environment[KEY_ATTRIBUTES_MAX_LEN];
int environment_len;
char name_source[SERVICE_NAME_SOURCE_MAX_LEN];
int name_source_len;
int fields;

};

/* Filter context */
struct flb_kube {
/* Configuration parameters */
@@ -124,6 +156,7 @@ struct flb_kube {

/* Regex context to parse records */
struct flb_regex *regex;
struct flb_regex *deploymentRegex;
struct flb_parser *parser;

/* TLS CA certificate file */
@@ -165,6 +198,41 @@ struct flb_kube {
int kube_meta_cache_ttl;
int kube_meta_namespace_cache_ttl;

/* Configuration used for enabling pod to service name mapping*/
int use_pod_association;
char *pod_association_host;
char *pod_association_endpoint;
int pod_association_port;

/*
* TTL is used to check how long should the mapped entry
* remain in the hash table
*/
struct flb_hash_table *pod_hash_table;
int pod_service_map_ttl;
int pod_service_map_refresh_interval;
flb_sds_t pod_service_preload_cache_path;
struct flb_upstream *pod_association_upstream;
/*
* This variable holds the Kubernetes platform type
* Current checks for EKS or Native Kuberentes
*/
char *platform;
/*
* This value is used for holding the platform config
* value. Platform will be overriden with this variable
* if it's set
*/
char *set_platform;

//Agent TLS certs
struct flb_tls *pod_association_tls;
char *pod_association_host_server_ca_file;
char *pod_association_host_client_cert_file;
char *pod_association_host_client_key_file;
int pod_association_host_tls_debug;
int pod_association_host_tls_verify;

struct flb_tls *tls;
struct flb_tls *kubelet_tls;

353 changes: 344 additions & 9 deletions plugins/filter_kubernetes/kube_meta.c

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion plugins/filter_kubernetes/kube_meta.h
Original file line number Diff line number Diff line change
@@ -27,19 +27,23 @@ struct flb_kube;
struct flb_kube_meta {
int fields;

int cluster_len;
int namespace_len;
int podname_len;
int cache_key_len;
int container_name_len;
int docker_id_len;
int container_hash_len;
int container_image_len;
int workload_len;

char *cluster;
char *namespace;
char *podname;
char *container_name;
char *container_image;
char *docker_id;
char *workload;

char *container_hash; /* set only on Systemd mode */

@@ -54,20 +58,26 @@ struct flb_kube_meta {
#define FLB_KUBE_API_PORT 443
#define FLB_KUBE_API_POD_FMT "/api/v1/namespaces/%s/pods/%s"
#define FLB_KUBE_API_NAMESPACE_FMT "/api/v1/namespaces/%s"
#define FLB_KUBE_API_CONFIGMAP_FMT "/api/v1/namespaces/%s/configmaps/%s"
#define FLB_KUBELET_PODS "/pods"

/* Constants for possible kubernetes resources */
#define FLB_KUBE_POD "pod"
#define FLB_KUBE_CONFIGMAP "configmap"

int flb_kube_meta_init(struct flb_kube *ctx, struct flb_config *config);
int flb_kube_meta_fetch(struct flb_kube *ctx);
int flb_kube_dummy_meta_get(char **out_buf, size_t *out_size);
int flb_kube_meta_get(struct flb_kube *ctx,
const char *tag, int tag_len,
const char *data, size_t data_size,
const char **out_buf, size_t *out_size,
const char **namespace_out_buf,
const char **namespace_out_buf,
size_t *namespace_out_size,
struct flb_kube_meta *meta,
struct flb_kube_props *props,
struct flb_kube_meta *namespace_meta);
int flb_kube_meta_release(struct flb_kube_meta *meta);
int flb_kube_pod_association_init(struct flb_kube *ctx, struct flb_config *config);

#endif
1 change: 1 addition & 0 deletions plugins/filter_kubernetes/kube_regex.c
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@ int flb_kube_regex_init(struct flb_kube *ctx)
ctx->regex = flb_regex_create(KUBE_TAG_TO_REGEX);
}
}
ctx->deploymentRegex = flb_regex_create(DEPLOYMENT_REGEX);

if (!ctx->regex) {
return -1;
2 changes: 2 additions & 0 deletions plugins/filter_kubernetes/kube_regex.h
Original file line number Diff line number Diff line change
@@ -26,6 +26,8 @@

#define KUBE_JOURNAL_TO_REGEX "^(?<name_prefix>[^_]+)_(?<container_name>[^\\._]+)(\\.(?<container_hash>[^_]+))?_(?<pod_name>[^_]+)_(?<namespace_name>[^_]+)_[^_]+_[^_]+$"

#define DEPLOYMENT_REGEX "^(?<deployment>.+)-(?<id>[bcdfghjklmnpqrstvwxz2456789]{6,10})$"

int flb_kube_regex_init(struct flb_kube *ctx);

#endif
375 changes: 372 additions & 3 deletions plugins/filter_kubernetes/kubernetes.c

Large diffs are not rendered by default.

438 changes: 437 additions & 1 deletion plugins/out_cloudwatch_logs/cloudwatch_api.c

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions plugins/out_cloudwatch_logs/cloudwatch_api.h
Original file line number Diff line number Diff line change
@@ -35,9 +35,19 @@
/* number of characters needed to 'end' a PutLogEvents payload */
#define PUT_LOG_EVENTS_FOOTER_LEN 4

// https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_Service.html
/* Maxinum number of character limits including both the KeyAttributes key and its value */
#define KEY_ATTRIBUTES_MAX_LEN 1100
/* Maxinum number of character limits including both the Attributes key and its value */
#define ATTRIBUTES_MAX_LEN 300

/* 256KiB minus 26 bytes for the event */
#define MAX_EVENT_LEN 262118

/* Prefix used for entity fields only */
#define AWS_ENTITY_PREFIX "aws_entity"
#define AWS_ENTITY_PREFIX_LEN 10

#include "cloudwatch_logs.h"

void cw_flush_destroy(struct cw_flush *buf);
39 changes: 39 additions & 0 deletions plugins/out_cloudwatch_logs/cloudwatch_logs.c
Original file line number Diff line number Diff line change
@@ -378,6 +378,15 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins,
flb_output_upstream_set(upstream, ctx->ins);
ctx->cw_client->host = ctx->endpoint;

struct mk_list *head;
struct flb_filter_instance *f_ins;
mk_list_foreach(head, &config->filters) {
f_ins = mk_list_entry(head, struct flb_filter_instance, _head);
if (strstr(f_ins->p->name, "kubernetes")) {
ctx->kubernete_metadata_enabled = true;
}
}

/* Export context */
flb_output_set_context(ins, ctx);

@@ -530,6 +539,27 @@ static int cb_cloudwatch_exit(void *data, struct flb_config *config)
return 0;
}

void entity_destroy(entity *entity) {
if(entity->attributes) {
flb_free(entity->attributes->cluster_name);
flb_free(entity->attributes->instance_id);
flb_free(entity->attributes->namespace);
flb_free(entity->attributes->node);
flb_free(entity->attributes->platform_type);
flb_free(entity->attributes->workload);
flb_free(entity->attributes->name_source);
flb_free(entity->attributes);
}
if(entity->key_attributes) {
flb_free(entity->key_attributes->environment);
flb_free(entity->key_attributes->name);
flb_free(entity->key_attributes->type);
flb_free(entity->key_attributes->account_id);
flb_free(entity->key_attributes);
}
flb_free(entity);
}

void log_stream_destroy(struct log_stream *stream)
{
if (stream) {
@@ -539,6 +569,9 @@ void log_stream_destroy(struct log_stream *stream)
if (stream->group) {
flb_sds_destroy(stream->group);
}
if (stream->entity) {
entity_destroy(stream->entity);
}
flb_free(stream);
}
}
@@ -689,6 +722,12 @@ static struct flb_config_map config_map[] = {
"Specify the log storage class. Valid values are STANDARD (default) and INFREQUENT_ACCESS."
},

{
FLB_CONFIG_MAP_BOOL, "add_entity", "false",
0, FLB_TRUE, offsetof(struct flb_cloudwatch, add_entity),
"add entity to PutLogEvent calls"
},

/* EOF */
{0}
};
48 changes: 48 additions & 0 deletions plugins/out_cloudwatch_logs/cloudwatch_logs.h
Original file line number Diff line number Diff line change
@@ -30,6 +30,39 @@
#include <fluent-bit/flb_record_accessor.h>
#include <fluent-bit/record_accessor/flb_ra_parser.h>

/* Entity object used for associating the telemetry
* in the PutLogEvent call*/
typedef struct entity {
struct entity_key_attributes *key_attributes;
struct entity_attributes *attributes;
int filter_count;
int service_name_found;
int environment_found;
int name_source_found;
int root_filter_count;
}entity;

/* KeyAttributes used for CloudWatch Entity object
* in the PutLogEvent call*/
typedef struct entity_key_attributes {
char *type;
char *name;
char *environment;
char *account_id;
}entity_key_attributes;

/* Attributes used for CloudWatch Entity object
* in the PutLogEvent call*/
typedef struct entity_attributes {
char *platform_type;
char *cluster_name;
char *namespace;
char *workload;
char *node;
char *instance_id;
char *name_source;
}entity_attributes;

#define LOG_CLASS_STANDARD "STANDARD"
#define LOG_CLASS_STANDARD_LEN 8
#define LOG_CLASS_INFREQUENT_ACCESS "INFREQUENT_ACCESS"
@@ -94,6 +127,13 @@ struct log_stream {
unsigned long long oldest_event;
unsigned long long newest_event;

/*
* PutLogEvents entity object
* variable that store service or infrastructure
* information
*/
struct entity *entity;

struct mk_list _head;
};

@@ -159,6 +199,14 @@ struct flb_cloudwatch {

/* Plugin output instance reference */
struct flb_output_instance *ins;

/* Checks if kubernete filter is enabled
* So the plugin knows when to scrape for Entity
*/

int kubernete_metadata_enabled;

int add_entity;
};

void flb_cloudwatch_ctx_destroy(struct flb_cloudwatch *ctx);
18 changes: 18 additions & 0 deletions src/flb_hash_table.c
Original file line number Diff line number Diff line change
@@ -95,6 +95,8 @@ static inline void flb_hash_table_entry_free(struct flb_hash_table *ht,
flb_free(entry->key);
if (entry->val && entry->val_size > 0) {
flb_free(entry->val);
} else if (ht->force_remove_pointer) {
flb_free(entry->val);
}
flb_free(entry);
}
@@ -122,6 +124,7 @@ struct flb_hash_table *flb_hash_table_create(int evict_mode, size_t size, int ma
ht->total_count = 0;
ht->cache_ttl = 0;
ht->case_sensitivity = FLB_TRUE;
ht->force_remove_pointer = 0;
ht->table = flb_calloc(1, sizeof(struct flb_hash_table_chain) * size);
if (!ht->table) {
flb_errno();
@@ -154,6 +157,21 @@ struct flb_hash_table *flb_hash_table_create_with_ttl(int cache_ttl, int evict_m
return ht;
}

struct flb_hash_table *flb_hash_table_create_with_ttl_force_destroy(int cache_ttl, int evict_mode,
size_t size, int max_entries)
{
struct flb_hash_table *ht;

ht = flb_hash_table_create_with_ttl(cache_ttl,evict_mode, size, max_entries);
if (!ht) {
flb_errno();
return NULL;
}

ht->force_remove_pointer = 1;
return ht;
}

int flb_hash_table_del_ptr(struct flb_hash_table *ht, const char *key, int key_len,
void *ptr)
{
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"annotations": {
"prometheus.io/path": "/api/v1/metrics/prometheus",
"prometheus.io/port": "2020",
"prometheus.io/scrape": "true"
},
"creationTimestamp": "2019-04-03T09:29:00Z",
"labels": {
"app.kubernetes.io/name": "fluent-bit"
},
"name": "use-kubelet-disabled-daemonset",
"namespace": "options",
"resourceVersion": "74466568",
"selfLink": "/api/v1/namespaces/core/pods/base",
"uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a",
"ownerReferences": [
{
"apiVersion": "apps/v1",
"kind": "DaemonSet",
"name": "my-daemonset",
"uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst",
"controller": true,
"blockOwnerDeletion": true
}
]
},
"spec": {
"containers": [
{
"image": "fluent/fluent-bit",
"imagePullPolicy": "Always",
"name": "fluent-bit",
"resources": {},
"stdin": true,
"stdinOnce": true,
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"tty": true,
"volumeMounts": [
{
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
"name": "default-token-9ffht",
"readOnly": true
}
]
}
],
"dnsPolicy": "ClusterFirst",
"nodeName": "ip-10-49-18-80.eu-west-1.compute.internal",
"restartPolicy": "Never",
"schedulerName": "default-scheduler",
"securityContext": {},
"serviceAccount": "default",
"serviceAccountName": "default",
"terminationGracePeriodSeconds": 30,
"tolerations": [
{
"effect": "NoExecute",
"key": "node.kubernetes.io/not-ready",
"operator": "Exists",
"tolerationSeconds": 300
},
{
"effect": "NoExecute",
"key": "node.kubernetes.io/unreachable",
"operator": "Exists",
"tolerationSeconds": 300
}
],
"volumes": [
{
"name": "default-token-9ffht",
"secret": {
"defaultMode": 420,
"secretName": "default-token-9ffht"
}
}
]
},
"status": {
"conditions": [
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "Initialized"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:06Z",
"status": "True",
"type": "Ready"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "PodScheduled"
}
],
"containerStatuses": [
{
"containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16",
"image": "fluent/fluent-bit:latest",
"imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f",
"lastState": {},
"name": "fluent-bit",
"ready": true,
"restartCount": 0,
"state": {
"running": {
"startedAt": "2019-04-03T09:29:05Z"
}
}
}
],
"hostIP": "10.49.18.80",
"phase": "Running",
"podIP": "100.116.192.42",
"qosClass": "BestEffort",
"startTime": "2019-04-03T09:29:00Z"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"annotations": {
"prometheus.io/path": "/api/v1/metrics/prometheus",
"prometheus.io/port": "2020",
"prometheus.io/scrape": "true"
},
"creationTimestamp": "2019-04-03T09:29:00Z",
"labels": {
"app.kubernetes.io/name": "fluent-bit"
},
"name": "use-kubelet-disabled-deployment",
"namespace": "options",
"resourceVersion": "74466568",
"selfLink": "/api/v1/namespaces/core/pods/base",
"uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a",
"ownerReferences": [
{
"apiVersion": "apps/v1",
"kind": "ReplicaSet",
"name": "my-deployment-bcg289",
"uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst",
"controller": true,
"blockOwnerDeletion": true
}
]
},
"spec": {
"containers": [
{
"image": "fluent/fluent-bit",
"imagePullPolicy": "Always",
"name": "fluent-bit",
"resources": {},
"stdin": true,
"stdinOnce": true,
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"tty": true,
"volumeMounts": [
{
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
"name": "default-token-9ffht",
"readOnly": true
}
]
}
],
"dnsPolicy": "ClusterFirst",
"nodeName": "ip-10-49-18-80.eu-west-1.compute.internal",
"restartPolicy": "Never",
"schedulerName": "default-scheduler",
"securityContext": {},
"serviceAccount": "default",
"serviceAccountName": "default",
"terminationGracePeriodSeconds": 30,
"tolerations": [
{
"effect": "NoExecute",
"key": "node.kubernetes.io/not-ready",
"operator": "Exists",
"tolerationSeconds": 300
},
{
"effect": "NoExecute",
"key": "node.kubernetes.io/unreachable",
"operator": "Exists",
"tolerationSeconds": 300
}
],
"volumes": [
{
"name": "default-token-9ffht",
"secret": {
"defaultMode": 420,
"secretName": "default-token-9ffht"
}
}
]
},
"status": {
"conditions": [
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "Initialized"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:06Z",
"status": "True",
"type": "Ready"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "PodScheduled"
}
],
"containerStatuses": [
{
"containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16",
"image": "fluent/fluent-bit:latest",
"imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f",
"lastState": {},
"name": "fluent-bit",
"ready": true,
"restartCount": 0,
"state": {
"running": {
"startedAt": "2019-04-03T09:29:05Z"
}
}
}
],
"hostIP": "10.49.18.80",
"phase": "Running",
"podIP": "100.116.192.42",
"qosClass": "BestEffort",
"startTime": "2019-04-03T09:29:00Z"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"annotations": {
"prometheus.io/path": "/api/v1/metrics/prometheus",
"prometheus.io/port": "2020",
"prometheus.io/scrape": "true"
},
"creationTimestamp": "2019-04-03T09:29:00Z",
"labels": {
"app.kubernetes.io/name": "fluent-bit"
},
"name": "use-kubelet-disabled-pod",
"namespace": "options",
"resourceVersion": "74466568",
"selfLink": "/api/v1/namespaces/core/pods/base",
"uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a"
},
"spec": {
"containers": [
{
"image": "fluent/fluent-bit",
"imagePullPolicy": "Always",
"name": "fluent-bit",
"resources": {},
"stdin": true,
"stdinOnce": true,
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"tty": true,
"volumeMounts": [
{
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
"name": "default-token-9ffht",
"readOnly": true
}
]
}
],
"dnsPolicy": "ClusterFirst",
"nodeName": "ip-10-49-18-80.eu-west-1.compute.internal",
"restartPolicy": "Never",
"schedulerName": "default-scheduler",
"securityContext": {},
"serviceAccount": "default",
"serviceAccountName": "default",
"terminationGracePeriodSeconds": 30,
"tolerations": [
{
"effect": "NoExecute",
"key": "node.kubernetes.io/not-ready",
"operator": "Exists",
"tolerationSeconds": 300
},
{
"effect": "NoExecute",
"key": "node.kubernetes.io/unreachable",
"operator": "Exists",
"tolerationSeconds": 300
}
],
"volumes": [
{
"name": "default-token-9ffht",
"secret": {
"defaultMode": 420,
"secretName": "default-token-9ffht"
}
}
]
},
"status": {
"conditions": [
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "Initialized"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:06Z",
"status": "True",
"type": "Ready"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "PodScheduled"
}
],
"containerStatuses": [
{
"containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16",
"image": "fluent/fluent-bit:latest",
"imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f",
"lastState": {},
"name": "fluent-bit",
"ready": true,
"restartCount": 0,
"state": {
"running": {
"startedAt": "2019-04-03T09:29:05Z"
}
}
}
],
"hostIP": "10.49.18.80",
"phase": "Running",
"podIP": "100.116.192.42",
"qosClass": "BestEffort",
"startTime": "2019-04-03T09:29:00Z"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"annotations": {
"prometheus.io/path": "/api/v1/metrics/prometheus",
"prometheus.io/port": "2020",
"prometheus.io/scrape": "true"
},
"creationTimestamp": "2019-04-03T09:29:00Z",
"labels": {
"app.kubernetes.io/name": "fluent-bit"
},
"name": "use-kubelet-disabled-replicaset",
"namespace": "options",
"resourceVersion": "74466568",
"selfLink": "/api/v1/namespaces/core/pods/base",
"uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a",
"ownerReferences": [
{
"apiVersion": "apps/v1",
"kind": "ReplicaSet",
"name": "my-replicaset",
"uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst",
"controller": true,
"blockOwnerDeletion": true
}
]
},
"spec": {
"containers": [
{
"image": "fluent/fluent-bit",
"imagePullPolicy": "Always",
"name": "fluent-bit",
"resources": {},
"stdin": true,
"stdinOnce": true,
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"tty": true,
"volumeMounts": [
{
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
"name": "default-token-9ffht",
"readOnly": true
}
]
}
],
"dnsPolicy": "ClusterFirst",
"nodeName": "ip-10-49-18-80.eu-west-1.compute.internal",
"restartPolicy": "Never",
"schedulerName": "default-scheduler",
"securityContext": {},
"serviceAccount": "default",
"serviceAccountName": "default",
"terminationGracePeriodSeconds": 30,
"tolerations": [
{
"effect": "NoExecute",
"key": "node.kubernetes.io/not-ready",
"operator": "Exists",
"tolerationSeconds": 300
},
{
"effect": "NoExecute",
"key": "node.kubernetes.io/unreachable",
"operator": "Exists",
"tolerationSeconds": 300
}
],
"volumes": [
{
"name": "default-token-9ffht",
"secret": {
"defaultMode": 420,
"secretName": "default-token-9ffht"
}
}
]
},
"status": {
"conditions": [
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "Initialized"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:06Z",
"status": "True",
"type": "Ready"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "PodScheduled"
}
],
"containerStatuses": [
{
"containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16",
"image": "fluent/fluent-bit:latest",
"imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f",
"lastState": {},
"name": "fluent-bit",
"ready": true,
"restartCount": 0,
"state": {
"running": {
"startedAt": "2019-04-03T09:29:05Z"
}
}
}
],
"hostIP": "10.49.18.80",
"phase": "Running",
"podIP": "100.116.192.42",
"qosClass": "BestEffort",
"startTime": "2019-04-03T09:29:00Z"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {},
"items": [{
"metadata": {
"annotations": {
"prometheus.io/path": "/api/v1/metrics/prometheus",
"prometheus.io/port": "2020",
"prometheus.io/scrape": "true"
},
"creationTimestamp": "2019-04-03T09:29:00Z",
"labels": {
"app.kubernetes.io/name": "fluent-bit"
},
"name": "use-kubelet-enabled-daemonset",
"namespace": "options",
"resourceVersion": "74466568",
"selfLink": "/api/v1/namespaces/core/pods/base",
"uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a",
"ownerReferences": [
{
"apiVersion": "apps/v1",
"kind": "DaemonSet",
"name": "my-daemonset",
"uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst",
"controller": true,
"blockOwnerDeletion": true
}
]
},
"spec": {
"containers": [{
"image": "fluent/fluent-bit",
"imagePullPolicy": "Always",
"name": "fluent-bit",
"resources": {},
"stdin": true,
"stdinOnce": true,
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"tty": true,
"volumeMounts": [{
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
"name": "default-token-9ffht",
"readOnly": true
}]
}],
"dnsPolicy": "ClusterFirst",
"nodeName": "ip-10-49-18-80.eu-west-1.compute.internal",
"restartPolicy": "Never",
"schedulerName": "default-scheduler",
"securityContext": {},
"serviceAccount": "default",
"serviceAccountName": "default",
"terminationGracePeriodSeconds": 30,
"tolerations": [{
"effect": "NoExecute",
"key": "node.kubernetes.io/not-ready",
"operator": "Exists",
"tolerationSeconds": 300
},
{
"effect": "NoExecute",
"key": "node.kubernetes.io/unreachable",
"operator": "Exists",
"tolerationSeconds": 300
}
],
"volumes": [{
"name": "default-token-9ffht",
"secret": {
"defaultMode": 420,
"secretName": "default-token-9ffht"
}
}]
},
"status": {
"conditions": [{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "Initialized"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:06Z",
"status": "True",
"type": "Ready"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "PodScheduled"
}
],
"containerStatuses": [{
"containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16",
"image": "fluent/fluent-bit:latest",
"imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f",
"lastState": {},
"name": "fluent-bit",
"ready": true,
"restartCount": 0,
"state": {
"running": {
"startedAt": "2019-04-03T09:29:05Z"
}
}
}],
"hostIP": "10.49.18.80",
"phase": "Running",
"podIP": "100.116.192.42",
"qosClass": "BestEffort",
"startTime": "2019-04-03T09:29:00Z"
}
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {},
"items": [{
"metadata": {
"annotations": {
"prometheus.io/path": "/api/v1/metrics/prometheus",
"prometheus.io/port": "2020",
"prometheus.io/scrape": "true"
},
"creationTimestamp": "2019-04-03T09:29:00Z",
"labels": {
"app.kubernetes.io/name": "fluent-bit"
},
"name": "use-kubelet-enabled-deployment",
"namespace": "options",
"resourceVersion": "74466568",
"selfLink": "/api/v1/namespaces/core/pods/base",
"uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a",
"ownerReferences": [
{
"apiVersion": "apps/v1",
"kind": "ReplicaSet",
"name": "my-deployment-bcg289",
"uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst",
"controller": true,
"blockOwnerDeletion": true
}
]
},
"spec": {
"containers": [{
"image": "fluent/fluent-bit",
"imagePullPolicy": "Always",
"name": "fluent-bit",
"resources": {},
"stdin": true,
"stdinOnce": true,
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"tty": true,
"volumeMounts": [{
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
"name": "default-token-9ffht",
"readOnly": true
}]
}],
"dnsPolicy": "ClusterFirst",
"nodeName": "ip-10-49-18-80.eu-west-1.compute.internal",
"restartPolicy": "Never",
"schedulerName": "default-scheduler",
"securityContext": {},
"serviceAccount": "default",
"serviceAccountName": "default",
"terminationGracePeriodSeconds": 30,
"tolerations": [{
"effect": "NoExecute",
"key": "node.kubernetes.io/not-ready",
"operator": "Exists",
"tolerationSeconds": 300
},
{
"effect": "NoExecute",
"key": "node.kubernetes.io/unreachable",
"operator": "Exists",
"tolerationSeconds": 300
}
],
"volumes": [{
"name": "default-token-9ffht",
"secret": {
"defaultMode": 420,
"secretName": "default-token-9ffht"
}
}]
},
"status": {
"conditions": [{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "Initialized"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:06Z",
"status": "True",
"type": "Ready"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "PodScheduled"
}
],
"containerStatuses": [{
"containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16",
"image": "fluent/fluent-bit:latest",
"imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f",
"lastState": {},
"name": "fluent-bit",
"ready": true,
"restartCount": 0,
"state": {
"running": {
"startedAt": "2019-04-03T09:29:05Z"
}
}
}],
"hostIP": "10.49.18.80",
"phase": "Running",
"podIP": "100.116.192.42",
"qosClass": "BestEffort",
"startTime": "2019-04-03T09:29:00Z"
}
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {},
"items": [{
"metadata": {
"annotations": {
"prometheus.io/path": "/api/v1/metrics/prometheus",
"prometheus.io/port": "2020",
"prometheus.io/scrape": "true"
},
"creationTimestamp": "2019-04-03T09:29:00Z",
"labels": {
"app.kubernetes.io/name": "fluent-bit"
},
"name": "use-kubelet-enabled-pod",
"namespace": "options",
"resourceVersion": "74466568",
"selfLink": "/api/v1/namespaces/core/pods/base",
"uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a"
},
"spec": {
"containers": [{
"image": "fluent/fluent-bit",
"imagePullPolicy": "Always",
"name": "fluent-bit",
"resources": {},
"stdin": true,
"stdinOnce": true,
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"tty": true,
"volumeMounts": [{
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
"name": "default-token-9ffht",
"readOnly": true
}]
}],
"dnsPolicy": "ClusterFirst",
"nodeName": "ip-10-49-18-80.eu-west-1.compute.internal",
"restartPolicy": "Never",
"schedulerName": "default-scheduler",
"securityContext": {},
"serviceAccount": "default",
"serviceAccountName": "default",
"terminationGracePeriodSeconds": 30,
"tolerations": [{
"effect": "NoExecute",
"key": "node.kubernetes.io/not-ready",
"operator": "Exists",
"tolerationSeconds": 300
},
{
"effect": "NoExecute",
"key": "node.kubernetes.io/unreachable",
"operator": "Exists",
"tolerationSeconds": 300
}
],
"volumes": [{
"name": "default-token-9ffht",
"secret": {
"defaultMode": 420,
"secretName": "default-token-9ffht"
}
}]
},
"status": {
"conditions": [{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "Initialized"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:06Z",
"status": "True",
"type": "Ready"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "PodScheduled"
}
],
"containerStatuses": [{
"containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16",
"image": "fluent/fluent-bit:latest",
"imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f",
"lastState": {},
"name": "fluent-bit",
"ready": true,
"restartCount": 0,
"state": {
"running": {
"startedAt": "2019-04-03T09:29:05Z"
}
}
}],
"hostIP": "10.49.18.80",
"phase": "Running",
"podIP": "100.116.192.42",
"qosClass": "BestEffort",
"startTime": "2019-04-03T09:29:00Z"
}
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {},
"items": [{
"metadata": {
"annotations": {
"prometheus.io/path": "/api/v1/metrics/prometheus",
"prometheus.io/port": "2020",
"prometheus.io/scrape": "true"
},
"creationTimestamp": "2019-04-03T09:29:00Z",
"labels": {
"app.kubernetes.io/name": "fluent-bit"
},
"name": "use-kubelet-enabled-replicaset",
"namespace": "options",
"resourceVersion": "74466568",
"selfLink": "/api/v1/namespaces/core/pods/base",
"uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a",
"ownerReferences": [
{
"apiVersion": "apps/v1",
"kind": "ReplicaSet",
"name": "my-replicaset",
"uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst",
"controller": true,
"blockOwnerDeletion": true
}
]
},
"spec": {
"containers": [{
"image": "fluent/fluent-bit",
"imagePullPolicy": "Always",
"name": "fluent-bit",
"resources": {},
"stdin": true,
"stdinOnce": true,
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"tty": true,
"volumeMounts": [{
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
"name": "default-token-9ffht",
"readOnly": true
}]
}],
"dnsPolicy": "ClusterFirst",
"nodeName": "ip-10-49-18-80.eu-west-1.compute.internal",
"restartPolicy": "Never",
"schedulerName": "default-scheduler",
"securityContext": {},
"serviceAccount": "default",
"serviceAccountName": "default",
"terminationGracePeriodSeconds": 30,
"tolerations": [{
"effect": "NoExecute",
"key": "node.kubernetes.io/not-ready",
"operator": "Exists",
"tolerationSeconds": 300
},
{
"effect": "NoExecute",
"key": "node.kubernetes.io/unreachable",
"operator": "Exists",
"tolerationSeconds": 300
}
],
"volumes": [{
"name": "default-token-9ffht",
"secret": {
"defaultMode": 420,
"secretName": "default-token-9ffht"
}
}]
},
"status": {
"conditions": [{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "Initialized"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:06Z",
"status": "True",
"type": "Ready"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "PodScheduled"
}
],
"containerStatuses": [{
"containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16",
"image": "fluent/fluent-bit:latest",
"imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f",
"lastState": {},
"name": "fluent-bit",
"ready": true,
"restartCount": 0,
"state": {
"running": {
"startedAt": "2019-04-03T09:29:05Z"
}
}
}],
"hostIP": "10.49.18.80",
"phase": "Running",
"podIP": "100.116.192.42",
"qosClass": "BestEffort",
"startTime": "2019-04-03T09:29:00Z"
}
}]
}
Original file line number Diff line number Diff line change
@@ -17,7 +17,17 @@
"namespace": "options",
"resourceVersion": "74466568",
"selfLink": "/api/v1/namespaces/core/pods/base",
"uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a"
"uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a",
"ownerReferences": [
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"name": "my-deployment",
"uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst",
"controller": true,
"blockOwnerDeletion": true
}
]
},
"spec": {
"containers": [{
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {},
"items": [{
"metadata": {
"annotations": {
"prometheus.io/path": "/api/v1/metrics/prometheus",
"prometheus.io/port": "2020",
"prometheus.io/scrape": "true"
},
"creationTimestamp": "2019-04-03T09:29:00Z",
"labels": {
"app.kubernetes.io/name": "fluent-bit"
},
"name": "use-pod-association-enabled-fallback-env",
"namespace": "options",
"resourceVersion": "74466568",
"selfLink": "/api/v1/namespaces/core/pods/base",
"uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a"
},
"spec": {
"containers": [{
"image": "fluent/fluent-bit",
"imagePullPolicy": "Always",
"name": "fluent-bit",
"resources": {},
"stdin": true,
"stdinOnce": true,
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"tty": true,
"volumeMounts": [{
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
"name": "default-token-9ffht",
"readOnly": true
}]
}],
"dnsPolicy": "ClusterFirst",
"nodeName": "ip-10-49-18-80.eu-west-1.compute.internal",
"restartPolicy": "Never",
"schedulerName": "default-scheduler",
"securityContext": {},
"serviceAccount": "default",
"serviceAccountName": "default",
"terminationGracePeriodSeconds": 30,
"tolerations": [{
"effect": "NoExecute",
"key": "node.kubernetes.io/not-ready",
"operator": "Exists",
"tolerationSeconds": 300
},
{
"effect": "NoExecute",
"key": "node.kubernetes.io/unreachable",
"operator": "Exists",
"tolerationSeconds": 300
}
],
"volumes": [{
"name": "default-token-9ffht",
"secret": {
"defaultMode": 420,
"secretName": "default-token-9ffht"
}
}]
},
"status": {
"conditions": [{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "Initialized"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:06Z",
"status": "True",
"type": "Ready"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "PodScheduled"
}
],
"containerStatuses": [{
"containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16",
"image": "fluent/fluent-bit:latest",
"imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f",
"lastState": {},
"name": "fluent-bit",
"ready": true,
"restartCount": 0,
"state": {
"running": {
"startedAt": "2019-04-03T09:29:05Z"
}
}
}],
"hostIP": "10.49.18.80",
"phase": "Running",
"podIP": "100.116.192.42",
"qosClass": "BestEffort",
"startTime": "2019-04-03T09:29:00Z"
}
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {},
"items": [{
"metadata": {
"annotations": {
"prometheus.io/path": "/api/v1/metrics/prometheus",
"prometheus.io/port": "2020",
"prometheus.io/scrape": "true"
},
"creationTimestamp": "2019-04-03T09:29:00Z",
"labels": {
"app.kubernetes.io/name": "fluent-bit"
},
"name": "use-pod-association-enabled",
"namespace": "options",
"resourceVersion": "74466568",
"selfLink": "/api/v1/namespaces/core/pods/base",
"uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a"
},
"spec": {
"containers": [{
"image": "fluent/fluent-bit",
"imagePullPolicy": "Always",
"name": "fluent-bit",
"resources": {},
"stdin": true,
"stdinOnce": true,
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"tty": true,
"volumeMounts": [{
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
"name": "default-token-9ffht",
"readOnly": true
}]
}],
"dnsPolicy": "ClusterFirst",
"nodeName": "ip-10-49-18-80.eu-west-1.compute.internal",
"restartPolicy": "Never",
"schedulerName": "default-scheduler",
"securityContext": {},
"serviceAccount": "default",
"serviceAccountName": "default",
"terminationGracePeriodSeconds": 30,
"tolerations": [{
"effect": "NoExecute",
"key": "node.kubernetes.io/not-ready",
"operator": "Exists",
"tolerationSeconds": 300
},
{
"effect": "NoExecute",
"key": "node.kubernetes.io/unreachable",
"operator": "Exists",
"tolerationSeconds": 300
}
],
"volumes": [{
"name": "default-token-9ffht",
"secret": {
"defaultMode": 420,
"secretName": "default-token-9ffht"
}
}]
},
"status": {
"conditions": [{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "Initialized"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:06Z",
"status": "True",
"type": "Ready"
},
{
"lastProbeTime": null,
"lastTransitionTime": "2019-04-03T09:29:00Z",
"status": "True",
"type": "PodScheduled"
}
],
"containerStatuses": [{
"containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16",
"image": "fluent/fluent-bit:latest",
"imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f",
"lastState": {},
"name": "fluent-bit",
"ready": true,
"restartCount": 0,
"state": {
"running": {
"startedAt": "2019-04-03T09:29:05Z"
}
}
}],
"hostIP": "10.49.18.80",
"phase": "Running",
"podIP": "100.116.192.42",
"qosClass": "BestEffort",
"startTime": "2019-04-03T09:29:00Z"
}
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-disabled-daemonset","namespace_name":"options","aws_entity_workload":"my-daemonset","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-disabled-deployment","namespace_name":"options","aws_entity_workload":"my-deployment","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-disabled-pod","namespace_name":"options","aws_entity_workload":"use-kubelet-disabled-pod","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-disabled-replicaset","namespace_name":"options","aws_entity_workload":"my-replicaset","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled-daemonset","namespace_name":"options","aws_entity_workload":"my-daemonset","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled-deployment","namespace_name":"options","aws_entity_workload":"my-deployment","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled-pod","namespace_name":"options","aws_entity_workload":"use-kubelet-enabled-pod","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled-replicaset","namespace_name":"options","aws_entity_workload":"my-replicaset","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-pod-association-enabled-fallback-env","namespace_name":"options","aws_entity_service_name":"test-service","aws_entity_environment":"eks:test-cluster/options","aws_entity_name_source":"Instrumentation","aws_entity_platform":"eks","aws_entity_cluster":"test-cluster","aws_entity_workload":"use-pod-association-enabled-fallback-env","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-pod-association-enabled","namespace_name":"options","aws_entity_service_name":"test-service","aws_entity_environment":"test-environment","aws_entity_name_source":"Instrumentation","aws_entity_workload":"use-pod-association-enabled","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"use-pod-association-enabled-fallback-env": {
"ServiceName": "test-service",
"ServiceNameSource": "Instrumentation"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"use-pod-association-enabled": {
"ServiceName": "test-service",
"Environment": "test-environment",
"ServiceNameSource": "Instrumentation"
}
}
314 changes: 218 additions & 96 deletions tests/runtime/filter_kubernetes.c

Large diffs are not rendered by default.