https://github.com/squaremo/pulumi-k8s-ssa-examples
Examples of using server-side apply support in Pulumi's Kubernetes SDK
https://github.com/squaremo/pulumi-k8s-ssa-examples
Last synced: 2 months ago
JSON representation
Examples of using server-side apply support in Pulumi's Kubernetes SDK
- Host: GitHub
- URL: https://github.com/squaremo/pulumi-k8s-ssa-examples
- Owner: squaremo
- Created: 2022-07-18T14:14:40.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-18T14:15:01.000Z (almost 4 years ago)
- Last Synced: 2025-03-20T03:18:54.201Z (over 1 year ago)
- Language: Go
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Kubernetes provider server-apply and patching trials
This has examples/trials of using the Pulumi Kubernetes provider with server-side apply,
and using *Patch objects.
### patch-configmap
This has an "original" config map, holding important configuration, in `original.yaml`. The Pulumi
program patches the config with another value.
**NB**:
- trying to patch the same data key leads to a conflict
- you can use the annotation on the patch `pulumi.com/patchForce: true` to make it overwrite the other field
- destroying the stack removes the extra field
- if you forced an overwrite, the data key is removed
### namespace-meta
This patches the default namespace with some additional labels. Again, about as simple as you can get.
### ensure-configmap
This uses server-side apply to "upsert" a ConfigMap -- that is, to either create or overwrite a
particular ConfigMap, depending on whether it already exists or not.
Either create the original with `kubectl apply -f original.yaml` then run `pulumi up`, or skip the
first step.