Skip to content

Instantly share code, notes, and snippets.

View jitran's full-sized avatar
🏀
https://gist.github.com/jitran

Ji Tran jitran

🏀
https://gist.github.com/jitran
View GitHub Profile
@jitran
jitran / fluentd_kubernetes_dynamic_config.yaml
Last active July 25, 2018 09:51
Dynamic FluentD Configuration for Kubernetes cluster logs using kubernetes_metadata, rewrite_tag_filter, and forest plugins
apiVersion: v1
data:
fluentd.conf: |
# Capture the kubernetes pod container logs
<source>
@type tail
format json
path /var/log/containers/*.log
pos_file /var/log/kubernetes.pos
time_format %Y-%m-%dT%H:%M:%S
@jitran
jitran / Puppet-Spec-Rakefile
Last active August 29, 2015 14:08
Rakefile for running spec tests for puppet modules
require 'rake'
require 'rspec/core/rake_task'
require 'yaml'
namespace :spec do
desc 'Run unit tests'
task :unit do
FileList["modules/*/Rakefile"].each do |project|
dir = project.pathmap("%d")
sh "cd #{dir}; rake spec:unit"