From 7a404d5e7cb97eb4fe5f60e5e562df560537caab Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Wed, 27 Jan 2021 13:21:49 +0200 Subject: [PATCH] Add Drone envsubst install to docs Signed-off-by: Stefan Prodan --- docs/spec/v1beta1/kustomization.md | 10 ++++++---- go.mod | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/spec/v1beta1/kustomization.md b/docs/spec/v1beta1/kustomization.md index 3f394ceb2..46e6be651 100644 --- a/docs/spec/v1beta1/kustomization.md +++ b/docs/spec/v1beta1/kustomization.md @@ -20,7 +20,7 @@ type KustomizationSpec struct { // Decrypt Kubernetes secrets before applying them on the cluster. // +optional Decryption *Decryption `json:"decryption,omitempty"` - + // The interval at which to reconcile the Kustomization. // +required Interval metav1.Duration `json:"interval"` @@ -30,7 +30,7 @@ type KustomizationSpec struct { // value to retry failures. // +optional RetryInterval *metav1.Duration `json:"retryInterval,omitempty"` - + // The KubeConfig for reconciling the Kustomization on a remote cluster. // When specified, KubeConfig takes precedence over ServiceAccountName. // +optional @@ -54,7 +54,7 @@ type KustomizationSpec struct { // A list of resources to be included in the health assessment. // +optional HealthChecks []meta.NamespacedObjectKindReference `json:"healthChecks,omitempty"` - + // A list of images used to override or set the name and tag for container images. // +optional Images []Image `json:"images,omitempty"` @@ -631,8 +631,10 @@ You can replicate the controller post-build substitutions locally using and Drone's [envsubst](https://github.com/drone/envsubst): ```console +$ $ go install github.com/drone/envsubst/cmd/envsubst + $ export region=eu-central-1 -$ kustomize build ./apps/ | envsubst +$ kustomize build ./apps/ | $GOPATH/bin/envsubst --- apiVersion: v1 kind: Namespace diff --git a/go.mod b/go.mod index edd7ee200..ad49dc85c 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ replace github.com/fluxcd/kustomize-controller/api => ./api require ( github.com/cyphar/filepath-securejoin v0.2.2 + github.com/drone/envsubst v1.0.3-0.20200804185402-58bc65f69603 github.com/fluxcd/kustomize-controller/api v0.7.2 github.com/fluxcd/pkg/apis/meta v0.7.0 github.com/fluxcd/pkg/runtime v0.8.0