@heynixie/pulumi-k8s
v0.70.1
Published
A Pulumi component that runs nixie on Kubernetes
Readme
A Pulumi component that runs nixie on Kubernetes.
The component registers nixie's StatefulSet, the web client and the backup job in one namespace, in
the shape each nixie release ships. Each release of nixie publishes the component at its own
version, so a deployment takes a change to that shape with a version bump. To start, install the
package beside your Pulumi SDKs, call createNixie with your namespace and images, and point your
ingress at the two Services it returns.
Install
The package ships an ES module with its type declarations, so a Pulumi program on Node or on Bun
loads it. It takes @pulumi/pulumi 3 and @pulumi/kubernetes 4 as peer dependencies, which your
program installs.
bun add @heynixie/pulumi-k8sFeatures
- nixie's pod. One replica on a
ReadWriteOnceclaim, with the configuration, the encrypted secrets and a git-sync container that follows your definitions repo on GitHub. - The web client. A Deployment that rolls out after nixie and calls its API by the Service.
- The backup. A CronJob that runs the release's backup image on nixie's staging folder, and ships each snapshot set to your 2 restic repositories.
- Moving onto it. Each resource keeps its own Pulumi name and an alias to the stack, so a stack that declared the same resources itself moves onto the component with no replacement.
Configuration
createNixie(name, args, opts) takes the per-deployment values in args, and their types in
src/types.ts describe each one. Pass your Kubernetes provider in opts.
import { createNixie, nixieAPIPort, nixieWebPort } from '@heynixie/pulumi-k8s';
const nixie = createNixie(
'nixie',
{
namespace: 'assistant',
image: 'ghcr.io/zgeoff/nixie:<version>@sha256:<digest>',
web: { image: 'ghcr.io/zgeoff/nixie-web:<version>@sha256:<digest>' },
config: configText,
secretsFile: sopsFileText,
ageKey: ageKeySecret,
definitions: { repository: '<owner>/<repo>', ref: 'live', deployKey: deployKeySecret },
storageClassName: 'local-path',
},
{ provider: cluster },
);Documentation
The Kubernetes architecture covers the shape.
