Skip to content

Instantly share code, notes, and snippets.

@negz
negz / delayedconfig.yaml
Created December 14, 2019 02:22
@bassam's DelayedConfig proposal
apiVersion: core.crossplane.io
kind: DelayedConfig
metadata:
# Is this cluster scoped? Namespaced
name: secureazuresql
spec:
engine: helm.sh
# This is a schemaless []string. It defines all the values that can be set.
values:
- administratorLogin
@negz
negz / kinds.sh
Last active March 18, 2019 22:09
Gitlab Kubernetes Kinds
$ grep "kind:" gitlab.yml|awk -F ':' '{ print $2 }'|sed 's/"//g'|sort -u
Certificate # certmanager CRD
ClusterIssuer # certmanager CRD
ClusterRole
ClusterRoleBinding
ConfigMap
CustomResourceDefinition # Only used by certmanager chart
Deployment
HorizontalPodAutoscaler
Ingress
@negz
negz / retval.go
Last active March 15, 2019 00:33
Crossplane API musings
import (
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"github.com/crossplaneio/crossplane/pkg/apis/cooltype/v1alpha1"
)
// Result of a Sync or Delete call.
type Result struct {
@negz
negz / client_state.json
Created October 11, 2018 07:11
linkerd unable to reach API server
// 20181010231740
// http://tfk-negz-ing-8gmr.REDACTED:9990/client_state.json
{
"/$/inet/localhost/8001": {
"state": "bound",
"addresses": [
"localhost:8001"
]
},
{
"/%/io.l5d.k8s.daemonset/kube-system/http-incoming/l5d/#/io.l5d.k8s.http/live/8080/tasking-api": {
"state": "bound",
"addresses": [
"REDACTED.0.52:4141",
"REDACTED.2.173:4141",
"REDACTED.0.232:4141"
]
}
}
{
"/$/inet/localhost/8001": {
"state": "bound",
"addresses": [
"localhost:8001"
]
},
"/%/io.l5d.k8s.daemonset/kube-system/http-incoming/l5d/#/io.l5d.k8s.http/live/80/nginx": {
"state": "bound",
"addresses": [
@negz
negz / requested.sh
Created February 21, 2018 04:47
Kubernetes Cluster requested resources
#!/bin/bash
set -e
KUBECTL="kubectl"
NODES=$($KUBECTL get nodes --no-headers -o custom-columns=NAME:.metadata.name)
function usage() {
local node_count=0
local total_percent_cpu=0
@negz
negz / linkerd-init-container.yaml
Created January 31, 2018 01:46
linkerd init container for transparent HTTP proxy
initContainers:
- name: linkerd-transparent-proxy
env:
- name: L5D_HOST
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: L5D_PORT
value: "4140"
image: googlecontainer/debian-iptables-amd64:v9
@negz
negz / linkerd-client-state.json
Created January 30, 2018 23:52
linkerd HTTPS failure
{
"/$/inet/localhost/8001": {
"state": "bound",
"addresses": [
"localhost:8001"
]
},
"/$/io.buoyant.rinet/443/www.example.org": {
"state": "bound",
"addresses": [
@negz
negz / cloudSettings
Last active September 18, 2021 06:18
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-09-18T06:18:33.218Z","extensionVersion":"v3.4.3"}