Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions examples/02-overlays/clusters/cluster-01/apps/subst.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
settings:
cluster:
name: "cluster-01"
Context: {{- toYaml $ | nindent 4 }}
name: "cluster-01"
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ resources:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
Context: {{- toYaml $ | nindent 4 }}
- containerPort: 80
4 changes: 2 additions & 2 deletions examples/common/env/dev/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ kind: Secret
metadata:
name: database-access
data:
user: (( grab $.subst.vars.cluster.name ))
password: (( grab $.subst.secrets.data.database_password ))
user: (( grab $.subst.settings.vars.cluster.name ))
password: (( grab $.subst.settings.secrets.data.database_password ))
13 changes: 13 additions & 0 deletions examples/common/env/dev/subst.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
settings:
vars:
cluster:
name: "dev-cluster"
id: 1
secrets:
data:
database_password: "dev-secret-password"
dns:
domain: "dev.company.com"
nameservers:
- "2.2.2.2"
- "2.2.2.3"
103 changes: 29 additions & 74 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,112 +1,67 @@
module github.com/bedag/subst

go 1.22.0
go 1.24.5

toolchain go1.23.0
toolchain go1.24.7

require (
github.com/BurntSushi/toml v1.4.0
github.com/MakeNowJust/heredoc v1.0.0
github.com/Masterminds/sprig/v3 v3.3.0
github.com/Shopify/ejson v1.5.2
github.com/bedag/spruce v1.32.1
github.com/Shopify/ejson v1.5.4
github.com/geofffranks/simpleyaml v0.0.0-20161109204137-c9320f076de5
github.com/rs/zerolog v1.33.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
github.com/spf13/viper v1.14.0
github.com/starkandwayne/goutils v0.0.0-20190115202530-896b8a6904be
github.com/stretchr/testify v1.9.0
github.com/stretchr/testify v1.10.0
go.uber.org/automaxprocs v1.6.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/apimachinery v0.31.0
k8s.io/client-go v0.31.0
sigs.k8s.io/kustomize/api v0.17.3
sigs.k8s.io/kustomize/kyaml v0.17.2
sigs.k8s.io/yaml v1.4.0
sigs.k8s.io/kustomize/api v0.20.1
)

require (
dario.cat/mergo v1.0.1 // indirect
github.com/Knetic/govaluate v3.0.0+incompatible // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/aws/aws-sdk-go v1.55.5 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cloudfoundry-community/vaultkv v0.7.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dustin/gojson v0.0.0-20160307161227-2e71ec9dd5ad // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/geofffranks/yaml v0.0.0-20161117152608-9f2fe4b6f295 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/cap v0.7.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-secure-stdlib/base62 v0.1.2 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/hashicorp/hcl v1.0.1-vault-7 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/onsi/gomega v1.33.1 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/smarty/assertions v1.16.0 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/ziutek/utils v0.0.0-20190626152656-eb2a3b364d6c // indirect
go.starlark.net v0.0.0-20221205180719-3fd0dac74452 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/term v0.24.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.40.0 // indirect
golang.org/x/sys v0.34.0 // indirect
golang.org/x/text v0.27.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
k8s.io/api v0.31.0 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)
Loading