https://github.com/spinnaker/sponnet
Jsonnet library specifically for Spinnaker
https://github.com/spinnaker/sponnet
Last synced: 5 months ago
JSON representation
Jsonnet library specifically for Spinnaker
- Host: GitHub
- URL: https://github.com/spinnaker/sponnet
- Owner: spinnaker
- License: apache-2.0
- Created: 2020-02-05T15:32:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T19:13:01.000Z (over 2 years ago)
- Last Synced: 2025-01-04T22:19:50.687Z (6 months ago)
- Language: Jsonnet
- Size: 112 KB
- Stars: 24
- Watchers: 28
- Forks: 31
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sponnet
![]()
A [Jsonnet](https://jsonnet.org/) library specifically for Spinnaker.
## Example
```js
local sponnet = import 'pipeline.libsonnet';local parameters = [
{
name: "image_tag",
description: "The docker image tag to deploy",
required: true,
}
];local patchKubernetesDeployment = sponnet.stages
.patchManifest("Update deployment")
.withAccount("my-k8s-cluster")
.withApplication("my-app")
.withNamespace("default")
.withManifestName("deployment", "my-app")
.withPatchBody([
{
"spec": {
"template": {
"spec": {
"containers": [
{
"image": "my-app-docker-image:${parameters.image_tag}",
"name": "app"
}
]
}
}
}
}
]);sponnet.pipeline()
.withParameters(parameters)
.withStages(patchKubernetesDeployment)
```More examples can be found in [demo](demo)
Can also be combined with a Jsonnet [Terraform provider](https://registry.terraform.io/providers/alxrem/jsonnet/latest/docs) to allow the management of Spinnaker resources using [Terraform](https://www.terraform.io/).