Skip to content

Instantly share code, notes, and snippets.

{
"/%/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"
]
}
}
@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"
]
},
@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 / 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 / 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 / one-to-many.yaml
Last active March 21, 2021 17:06
Modelling a simple Wordpress application
# In this YAML an ApplicationDefinition defines the schema of a
# Wordpress, while a Composition specifies what resources the
# Wordpress will be composed of, and how they'll be created.
---
apiVersion: crossplane.io/v1alpha1
kind: ApplicationDefinition
metadata:
name: wordpresses.apps.example.org
spec:
crdSpecTemplate:
@negz
negz / rg.yaml
Created April 22, 2020 22:53
An example ReplicationGroup
---
apiVersion: cache.aws.crossplane.io/v1beta1
kind: ReplicationGroup
metadata:
name: aws-redis
labels:
example: "true"
spec:
writeConnectionSecretToRef:
namespace: crossplane-system
@negz
negz / testwithsetupandteardown.go
Last active April 27, 2020 22:06
Common setup code in Go tests
func TestDoTheThing(t *testing.T) {
cases := map[string]struct{
thingArg string
want bool
}{
// Add test cases here.
}
SetupTheThing()
@negz
negz / tfschema.json
Created June 9, 2020 23:23
Terraform AWS Schema
This file has been truncated, but you can view the full file.
{
"format_version": "0.1",
"provider_schemas": {
"aws": {
"provider": {
"version": 0,
"block": {
"attributes": {
"access_key": {
"type": "string",
@negz
negz / defcomp.yaml
Last active June 26, 2020 09:16
A hypothetical Helm release managed resource
---
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: InfrastructureDefinition
metadata:
name: wordpressinstances.apps.example.org
spec:
crdSpecTemplate:
group: apps.example.org
version: v1alpha1
names: