Merge pull request #1473 from richardmarshall/execpluginhash

Support resource generator options in exec plugins
This commit is contained in:
Jeff Regan
2019-09-26 10:12:52 -07:00
committed by GitHub
8 changed files with 234 additions and 22 deletions

View File

@@ -3,12 +3,14 @@
# Skip the config file name argument.
shift
echo "
cat <<EOF
kind: ConfigMap
apiVersion: v1
metadata:
name: example-configmap-test
annotations:
kustomize.config.k8s.io/needs-hash: "true"
data:
username: $1
password: $2
"
EOF

View File

@@ -6,7 +6,7 @@ package main_test
import (
"testing"
"sigs.k8s.io/kustomize/v3/pkg/kusttest"
kusttest_test "sigs.k8s.io/kustomize/v3/pkg/kusttest"
plugins_test "sigs.k8s.io/kustomize/v3/pkg/plugins/test"
)
@@ -35,4 +35,7 @@ kind: ConfigMap
metadata:
name: example-configmap-test
`)
if m.Resources()[0].NeedHashSuffix() != true {
t.Errorf("expected resource to need hashing")
}
}