Skip to content

Instantly share code, notes, and snippets.

apiVersion: example.com/v1
kind: Foo
metadata:
annotations:
argocd.argoproj.io/sync-wave: "-1"
name: my-foo

Self-hosting a terraform registry

The /.well-known/terraform.json file must be at the root of your domain, as per RFC 8615
{
  "providers.v1": "/v1/providers/"
}
@ndrpnt
ndrpnt / collect_docker_events.md
Last active August 2, 2021 20:07
Collect Docker (system) events with any log management stack

Why?

Docker (system) events are only available through the Docker Engine API, e.g. with the Docker client docker events or docker system events commands. Sadly, few log forwarders have a facility to collect these events.

How?

Most log forwarders can natively collect containers' logs. Let's create a container that spits Docker events to stdout.

@ndrpnt
ndrpnt / Example.md
Last active October 29, 2019 08:52
[Spark 1.6] Returns a new DataFrame with nested structures flattened (and arrays exploded (one row for each element))

Before:

root
 |-- a: struct (nullable = true)
 |    |-- b: string (nullable = true)
 |    |-- c: array (nullable = true)
 |    |    |-- element: struct (containsNull = true)
 |    |    |    |-- d: array (nullable = true)
 |    |    |    |    |-- element: string (containsNull = true)
 |    |    |    |-- e: string (nullable = true)