Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote path for Kustomization patches being watched #8976

Closed
BenasB opened this issue Jul 28, 2023 · 4 comments · Fixed by #8979
Closed

Remote path for Kustomization patches being watched #8976

BenasB opened this issue Jul 28, 2023 · 4 comments · Fixed by #8979
Labels
kind/bug Something isn't working

Comments

@BenasB
Copy link

BenasB commented Jul 28, 2023

Hi! I'm trying to use Skaffold alongside Kustomize. I have a remote patch called delete-object.yaml

$patch: delete
apiVersion: "*"
kind: "*"
metadata:
  name: "*"

and in my project I have the kustomization.yaml where I do:

patches:
  - target:
      kind: Route
    path: https://<my-remote-url>/delete-object.yaml

Running kubectl kustomize works fine (no kind: Route objects in the result).

Running skaffold dev starts everything up, however fails to watch the remote file:

$ skaffold dev
Generating tags...
 - email-api -> email-api:60a36c8
Checking cache...
 - email-api: Found Locally
Tags used in deployment:
 - email-api -> email-api:4401fa0b3bbb28bc94141a66e9b2ccf25d85703c713048d0ed28b6c9084da34a
Starting deploy...
 - configmap/email-api-config created
 - configmap/env-config created
 - secret/email-api-secrets created
 - service/email-api-service created
 - deployment.apps/email-api created
Waiting for deployments to stabilize...
 - deployment/email-api: waiting for rollout to finish: 0 of 1 updated replicas are available...
 - deployment/email-api is ready.
Deployments stabilized in 6.984 seconds
Port forwarding service/email-api-service in namespace default, remote port 80 -> http://127.0.0.1:80
Listing files to watch...
 - email-api
Cleaning up...
 - configmap "email-api-config" deleted
 - configmap "env-config" deleted
 - secret "email-api-secrets" deleted
[email-api] [11:08:58 INF] Now listening on: http://[::]:8000
[email-api] [11:08:58 INF] Application started. Press Ctrl+C to shut down.
[email-api] [11:08:58 INF] Hosting environment: Development
[email-api] [11:08:58 INF] Content root path: /app/
 - service "email-api-service" deleted
 - deployment.apps "email-api" deleted
unable to stat file "C:\\repos\\EmailApi\\Kubernetes\\Overlays\\Development\\https:\\<my-remote-url>\\delete-object.yaml": CreateFile C:\repos\EmailApi\Kubernetes\Overlays\Development\https:\<my-remote-url>\delete-object.yaml: The filename, directory name, or volume label syntax is incorrect.

Expected behavior

Remote patch file is ignored in the watch process and skaffold dev does not automatically close after deploying

Actual behavior

Skaffold tries to watch the remote file, fails and ends the skaffold dev

Information

  • Skaffold version: v2.6.0
  • Operating system: Windows 10
  • Installed via: downloaded standalone binary from skaffold.dev
  • Contents of skaffold.yaml:
apiVersion: skaffold/v4beta5
kind: Config
metadata:
  name: emailapi
build:
  artifacts:
    - image: email-api
      docker:
        dockerfile: Dockerfile.dev
  local:
    useBuildkit: true
manifests:
  kustomize:
    paths:
      - Kubernetes\Overlays\Development
portForward:
  - resourceType: service
    resourceName: email-api-service
    namespace: default
    port: 80

Steps to reproduce the behavior

Sorry, can't present a repository at this time, however, should be straightforward to reproduce following the description at the top.

https://github.com/BenasB/skaffold-kustomize-remote-patch-repro

@ericzzzzzzz ericzzzzzzz added the needs-reproduction needs reproduction from the maintainers to validate the issue is truly a skaffold bug label Jul 28, 2023
@BenasB
Copy link
Author

BenasB commented Jul 29, 2023

Got some time to reproduce it! @ericzzzzzzz

@ericzzzzzzz
Copy link
Contributor

Hi @BenasB Thank you for reporting this issue, i'll send a pr to fix this on early next week. Have a nice weekend!

@ericzzzzzzz ericzzzzzzz added kind/bug Something isn't working and removed needs-reproduction needs reproduction from the maintainers to validate the issue is truly a skaffold bug labels Jul 31, 2023
@BenasB
Copy link
Author

BenasB commented Aug 1, 2023

I'm not familiar with the release schedule for this project, any ETA when I can test this out? Much thanks for the help, appreciate it

@ericzzzzzzz
Copy link
Contributor

The change will be in skaffold v2.7.0, but the release date has not been determined yet. To test the change, you can install edge version https://skaffold.dev/docs/install/#standalone-binary which is built from the latest commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants