Skip to content

Commit

Permalink
Test case for kubernetes-sigs#5250
Browse files Browse the repository at this point in the history
  • Loading branch information
Gekalash committed Aug 15, 2023
1 parent da4e881 commit 91b3ac3
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions api/krusty/component_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,42 @@ spec:
value: kustomize-namespace
image: busybox
name: myapp-container
`},
"components_are_applied_before_overlay_applied": {
input: []FileGen{
writeK("", `
resources:
- base
components:
- components
configMapGenerator:
- name: literals-configmap
behavior: merge
literals:
- literal_variable_one=overlay-value`),
writeK("/base", `
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
configMapGenerator:
- name: literals-configmap
literals:
- literal_variable_one=base-value`),
writeC("/components", `
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
configMapGenerator:
- name: literals-configmap
behavior: merge
literals:
- literal_variable_one=component-value`),
},
expectedOutput: `
apiVersion: v1
data:
literal_variable_one: overlay-value
kind: ConfigMap
metadata:
name: literals-configmap-h9bhhg655t
`},
}

Expand Down

0 comments on commit 91b3ac3

Please sign in to comment.