Skip to content

Instantly share code, notes, and snippets.

View epk's full-sized avatar

Aditya epk

  • Vancouver, Canada
  • 05:36 (UTC -08:00)
View GitHub Profile
apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
profiles:
- schedulerName: default-scheduler
pluginConfig:
- name: PodTopologySpread
args:
defaultConstraints:
- maxSkew: 3
topologyKey: "kubernetes.io/hostname"
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: validate-networkpolicy-namespace-selector
spec:
validationFailureAction: Enforce
rules:
- name: validate-networkpolicy-namespace-selector
match:
resources:
@epk
epk / go.mod
Last active March 22, 2023 23:43
module github.com/epk/play
go 1.20
require (
k8s.io/client-go v0.26.3
sigs.k8s.io/controller-runtime v0.14.5
)
require (
@epk
epk / proxy.go
Last active March 15, 2023 01:14
package proxy
import (
"context"
"net/http"
"net/http/httputil"
"net/url"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
@epk
epk / README.md
Last active February 19, 2023 06:56
Enable Hubble UI on GKE Dataplane V2

Enable Hubble UI on GKE Dataplane V2

Dataplane V2 does not support L7 visibility so you will be limited to L4 flows.

  1. Add the following to cilium-config ConfigMap's data in kube-system:
kubectl --namespace kube-system edit configmap cilium-config
enable-hubble: "true"
node:
id: identity-aware-proxy
cluster: identity-aware-proxy
admin:
address:
socket_address:
address: 0.0.0.0
port_value: 9901
@epk
epk / go.mod
Last active January 9, 2023 06:54
Envoy ALS
module test
go 1.19
require (
buf.build/gen/go/envoyproxy/envoy/bufbuild/connect-go v1.4.1-20221219165829-f29edaef12a2.1
buf.build/gen/go/envoyproxy/envoy/protocolbuffers/go v1.28.1-20221219165829-f29edaef12a2.4
github.com/bufbuild/connect-go v1.4.1
github.com/bufbuild/connect-grpchealth-go v1.0.0
golang.org/x/net v0.4.0
{ config, lib, pkgs, ... }:
let
baseconfig = { allowUnfree = true; };
unstable = import <nixos-unstable> { config = baseconfig; };
in {
imports =
{
/*************************
Go
*************************/
"go.useLanguageServer": true,
"[go]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},