An experienced operators guide to streaming Kubernetes workload logs into Quickwit.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% cargo clean; cargo build | |
Compiling libc v0.2.148 | |
Compiling proc-macro2 v1.0.67 | |
Compiling unicode-ident v1.0.12 | |
Compiling memchr v2.6.3 | |
Compiling syn v1.0.109 | |
Compiling rustix v0.38.14 | |
Compiling version_check v0.9.4 | |
Compiling bitflags v2.4.0 | |
Compiling either v1.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FROM /opt/homebrew/include/rdkit/GraphMol/ROMol.h | |
// | |
// Copyright (C) 2003-2022 Greg Landrum and other RDKit contributors | |
// | |
// @@ All Rights Reserved @@ | |
// This file is part of the RDKit. | |
// The contents are covered by the terms of the BSD license | |
// which is included in the file license.txt, found at the root | |
// of the RDKit source tree. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use k8s_openapi::api::coordination::v1::{Lease as KubeLease, LeaseSpec as KubeLeaseSpec}; | |
use chrono::{Local, Utc}; | |
use k8s_openapi::apimachinery::pkg::apis::meta::v1::MicroTime; | |
use std::time::Duration; | |
use kube::api::{PatchParams, PostParams, ObjectMeta}; | |
use kube::Api; | |
use tokio::task::JoinHandle; | |
use tokio::sync::oneshot::Sender; | |
const LEASE_DURATION_SECONDS: u64 = 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import json | |
import subprocess | |
import pprint | |
### | |
### Compare the EC2 state with that state of pods in your kube cluster | |
### Loads from EC2 with the awscli and loads from kube with kubectl | |
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Kops < Formula | |
desc "Production Grade K8s Installation, Upgrades, and Management" | |
homepage "https://github.com/kubernetes/kops" | |
url "https://github.com/kubernetes/kops/archive/1.7.1.tar.gz" | |
sha256 "044c5c7a737ed3acf53517e64bb27d3da8f7517d2914df89efeeaf84bc8a722a" | |
head "https://github.com/tureus/kops.git", :revision => "1.6.2-allow-no-igw" | |
# head "https://github.com/k8s-for-greeks/kops.git", :revision => "k8s-for-greeks-integration" | |
bottle do | |
cellar :any_skip_relocation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LP-XLANGE-OSX:tmp xlange$ echo "hi" >> deleteme/file.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/xlange/.cargo/bin/cargo test --color=always -- --nocapture | |
Compiling whaletail v0.1.0 (file:///Users/xlange/IdeaProjects/whale-tail) | |
warning: unused import: `test::Bencher` | |
--> src/lib.rs:22:9 | |
| | |
22 | use test::Bencher; | |
| ^^^^^^^^^^^^^ | |
| | |
= note: #[warn(unused_imports)] on by default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[bench] | |
fn parse_file(b: &mut Bencher) { | |
use std::fs::{ File }; | |
use std::io::{ Seek, SeekFrom }; | |
let mut f = File::open("/Users/xlange/30ece7c43b7c302f43e54ac9f299ca36efb8184375eac0563c9340a15100ee3c-json.log").unwrap(); | |
b.iter(|| { | |
{ | |
use std::io::{BufRead, BufReader}; |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LP-XLANGE-OSX:kubernetes xlange$ ./hack/godep-save.sh | |
+ set -o errexit | |
+ set -o nounset | |
+ set -o pipefail | |
++ dirname ./hack/godep-save.sh | |
+ KUBE_ROOT=./hack/.. | |
+ source ./hack/../hack/lib/init.sh | |
++ set -o errexit | |
++ set -o nounset | |
++ set -o pipefail |
NewerOlder