Created
March 30, 2020 21:19
-
-
Save peterjanes/ab76834e9889d9be9c2aef7cfcf5c995 to your computer and use it in GitHub Desktop.
Curious kustomize behaviour - `kustomize build use` will apply the transformer to the generated secret but not to the local service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: apple | |
spec: | |
ports: | |
- port: 7002 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: kustomize.config.k8s.io/v1beta1 | |
kind: Kustomization | |
resources: | |
- ../shared/ | |
- apple.yaml |
Makes sense now that I look at it again: the transformation is performed before the resource is "imported" into the other kustomization, rather than being a shared configuration.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Before running, put the files prefixed with
use-*
in ause/
directory and those prefixed withshared-*
inshared/
. Notice that themySecret
resource is transformed but theapple
resource is not.