Skip to content

Instantly share code, notes, and snippets.

- alert: FluxHelmReleaseNotReady
annotations:
description: |-
{{ $labels.exported_namespace }}/{{ $labels.name }} is not ready for the last 15 minutes
namespace: `{{ $labels.exported_namespace }}`
name: `{{ $labels.name }}`
status: `{{ $labels.status }}`
summary: |-
{{ $labels.exported_namespace }}/{{ $labels.name }} is not ready
expr: gotk_reconcile_condition{kind="HelmRelease",status!~"True|Deleted",type="Ready",exported_namespace!="kubernetes-dashboard"} == 1
@yershalom
yershalom / reverst_tree_interview.py
Created October 14, 2022 05:58
Reverse a binary tree to satisfy the ego of a L2 Google engineer
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
def reverse_tree(tree):
if tree is None:
return
if tree.left is None and tree.right is None:
return
if tree.left is None:
tree.left = tree.right
tree.right = None
Status: │
│ Conditions: │
│ Last Transition Time: 2021-02-17T09:09:57Z │
│ Message: Helm uninstall failed: uninstall: Release not loaded: linkerd: release: not found │
#!/bin/bash
apt-get update
apt-get install nginx
cat << EOF > /etc/nginx/sites-available/azure
server {
listen 80 default_server;
listen [::]:80 default_server;
@yershalom
yershalom / rolling_restart_es.sh
Created October 23, 2019 14:42
Script for ES rolling restart
START_TIME=`date +%s`
# Set global vars
HOSTNAME=`hostname | cut -d"-" -f-2`
IP=`ip addr show | grep inet | grep "inet6\|127.0.0.1" -v | awk '{ print $2 }' | tail -1 | cut -d"/" -f1`
REGISTERED_SERVER_COUNT=0
I_RAISED_THE_FLAG="false"
# Verify that elasticsearch is running
curl -s -XGET localhost:9200 2>&1 | grep $HOSTNAME 2>&1 >/dev/null || exit 123
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
pipeline {
agent {
node {
label 'master'
}
}
stages {
stage('android') {
steps {
pipeline {
agent {
node {
label 'master'
}
}
stages {
stage('android') {
steps {
import React, { Component } from 'react'
import WordArt from 'react-wordart'
class Example extends Component {
render () {
return (
<WordArt text='I Love WordArt' theme={`rainbow`} fontSize={100} />
)
}