Skip to content

Instantly share code, notes, and snippets.

View jotak's full-sized avatar

Joel Takvorian jotak

View GitHub Profile
apiVersion: v1
kind: Pod
metadata:
name: hacker
spec:
containers:
- image: quay.io/jotak/hey-ho:0.1
imagePullPolicy: IfNotPresent
name: hacker
securityContext:
@jotak
jotak / README.md
Last active July 28, 2023 15:41
PCA on k8s
@jotak
jotak / README.md
Last active July 6, 2021 12:40
ovn-kubernetes + kind + podman

KIND + podman

There's an experimental support for podman in KIND, enabled with KIND_EXPERIMENTAL_PROVIDER=podman.

E.g.

KIND_EXPERIMENTAL_PROVIDER=podman kind create cluster
@jotak
jotak / kafka-service-entry.yml
Created March 10, 2020 16:23
Kafka Service Entry (strimzi)
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: kafka-service-entry
spec:
hosts:
# - messaging-kafka-0.messaging-kafka-brokers.kafka
- messaging-kafka-brokers.kafka.svc.cluster.local
- messaging-kafka-bootstrap.kafka.svc.cluster.local
ports:
@jotak
jotak / md-crd.yaml
Last active January 8, 2020 16:35
Monitoring dashboards new CRD
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: monitoringdashboards.monitoring.kiali.io
labels:
app: kiali
version: ${OPERATOR_VERSION_LABEL}
spec:
group: monitoring.kiali.io
@jotak
jotak / jvm-dashboard.json
Created September 20, 2019 07:29
Dummy JVM Grafana dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@jotak
jotak / dashboard.json
Created September 16, 2019 13:52
Dummy Grafana App Dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@jotak
jotak / README.md
Created June 24, 2019 12:34
Prometheus pod behind basic-auth nginx sidecar

There's a simple docker image that contains pre-configured nginx proxy for prometheus, with a Basic Authentication with admin/admin credentials: jotak/nginx-basicauth-sidecar. It listens on 8080 and redirect to 9090 (where prometheus is expected to be). To rebuild the image, take a look at https://github.com/eicnix/sidecar-proxy-example

Steps

  • Modify your prometheus deployment and add this container description:
        - image: jotak/nginx-basicauth-sidecar
 imagePullPolicy: IfNotPresent
@jotak
jotak / index.md
Last active March 26, 2019 15:10
Missing some meta-programming in Go

One issue I'm currently facing in Go (looks like it's not an isolated problem) is the lack of meta-programming.

I want to create a simple function that turns any slice into a map, being provided a key-getter function.

I wish I could write something like this:

type KeySupplier<T> func(obj T) string

func Index<T>(arr []T, keySupplier KeySupplier<T>) map[string]T {
@jotak
jotak / index.js
Last active June 28, 2018 14:08
Reproducer - react-ace issue #300
import React, { Component } from 'react';
import { render } from 'react-dom';
import AceEditor from '../src/ace.js';
import 'brace/mode/yaml';
import 'brace/theme/eclipse';
/*eslint-disable no-alert, no-console */
const yamlSource1 = `Initial
text`;