Skip to content

fix: kustomize render should workwith inline patches#9732

Merged
Darien-Lin merged 1 commit into
GoogleContainerTools:mainfrom
coperni:fix-kustomize-render-set-inline-patch
Feb 24, 2025
Merged

fix: kustomize render should workwith inline patches#9732
Darien-Lin merged 1 commit into
GoogleContainerTools:mainfrom
coperni:fix-kustomize-render-set-inline-patch

Conversation

@coperni

@coperni coperni commented Feb 23, 2025

Copy link
Copy Markdown
Contributor

Fixes: #9731

Description

Kustomize supports inline patches where the patch content is put inside the kustomization file as a single string. There is a bug in Skaffold where it will successfully render the Kustomization if the --set flag is not set.

Before

skaffold render -p dev --set="foo=bar"
read /Users/REDACTED/tmp/kustomize_example/overlays/prod: is a directory

After

$ skaffold render -p dev --set="foo=bar"
apiVersion: v1
data:
  foo: bar!
kind: ConfigMap
metadata:
  name: prod-basa
---
apiVersion: v1
kind: Pod
metadata:
  labels:
    app: myapp
  name: prod-myapp-pod
spec:
  containers:
    - image: nginx:123
      name: nginx
@coperni coperni requested a review from a team as a code owner February 23, 2025 14:51
@Darien-Lin Darien-Lin self-assigned this Feb 24, 2025
@Darien-Lin Darien-Lin enabled auto-merge (squash) February 24, 2025 17:20
@Darien-Lin Darien-Lin merged commit dd77187 into GoogleContainerTools:main Feb 24, 2025
@coperni coperni deleted the fix-kustomize-render-set-inline-patch branch February 25, 2025 00:07
@menahyouyeah menahyouyeah mentioned this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants