Skip to content

Instantly share code, notes, and snippets.

@negz
negz / SPEC.md
Last active September 22, 2025 22:55
Transaction-based Package Coordination System Specification

Transaction-based Package Coordination System Specification

Context and Problem Statement

GitHub Issue: crossplane/crossplane#6766

Current Problem: Crossplane's package manager makes incremental changes without validating complete operations upfront, leading to:

  • No pre-flight validation of dependency resolution
  • CRD/MRD conflicts discovered too late
  • Risky complex operations with no guarantee of success
@negz
negz / STYLE.md
Last active September 12, 2025 04:49
PR Style Guide for LLM Agents

PR Style Guide for LLM Agents

Git Commit and PR Style Guide

This guide helps LLM agents write git commits and pull requests in Nic Cope's style.

Git Commit Messages

Required Format

  • Always include: Signed-off-by: Nic Cope
@negz
negz / refactor.go
Created August 25, 2023 22:27
Inline Crossplane error constants
package main
import (
"bytes"
"flag"
"fmt"
"io/fs"
"log"
"os"
"path/filepath"
@negz
negz / fnio.yaml
Created October 5, 2022 03:56
Crossplane Composition Functions IO
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: FunctionIO
# Optional arbitrary KRM-like resource. Each function in a pipeline will be
# called with its own function config (i.e. config is not pipelined).
config:
apiVersion: database.example.org/v1alpha1
kind: Config
metadata:
name: cloudsql
spec:
@negz
negz / composition.yaml
Created August 12, 2021 05:32
Hunting for RouteTable leaks
---
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: leaktest
spec:
writeConnectionSecretsToNamespace: crossplane-system
compositeTypeRef:
apiVersion: crossplane.io/v1alpha1
kind: LeakTest
@negz
negz / conformance.log
Created May 5, 2021 00:27
Crossplane v1.2.1 conformance
00:11:48 [ .. ] verify dependencies have expected content
all modules verified
00:11:50 [ OK ] go modules dependencies verified
00:11:50 [ .. ] go test unit-tests
? github.com/crossplane/conformance/internal [no test files]
=== RUN TestCompositeResourceDefinition
apiextensions_test.go:62: Created XRD "clusterconformances.test.crossplane.io"
=== RUN TestCompositeResourceDefinition/BecomesEstablishedAndOffered
=== PAUSE TestCompositeResourceDefinition/BecomesEstablishedAndOffered
=== RUN TestCompositeResourceDefinition/CRDIsCreatedForXR
@negz
negz / transform.yaml
Last active January 23, 2021 01:35
String transform
- base:
apiVersion: identity.aws.crossplane.io/v1alpha1
kind: IAMPolicy
spec:
forProvider:
description: "policy to access dynamodb table."
patches:
- type: PatchSet
patchSetName: Metadata
- fromFieldPath: "metadata.name"
@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:
@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 / 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()