Skip to content

Conversation

@coperni
Copy link
Contributor

@coperni coperni commented Feb 23, 2025

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
11 of 12 checks passed
@coperni coperni deleted the fix-kustomize-render-set-inline-patch branch February 25, 2025 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skaffold render with Kustomize and --set fails for inline patches

2 participants