Skip to content

Skaffold apply fails for helm renderer with multiple namespace resources #8475

@gsquared94

Description

@gsquared94

Repro:
Agones Helm chart deploys to multiple namespaces agones-system and kube-system.

helm repo add agones https://agones.dev/chart/stable
helm repo update
helm install my-release --namespace agones-system --create-namespace agones/agones

If we setup this in Skaffold, the skaffold.yaml looks like:

apiVersion: skaffold/v2beta29
kind: Config
deploy:
  helm:
    releases:
    - name: agones
      repo: https://agones.dev/chart/stable/
      remoteChart: agones
      namespace: agones-system

Running skaffold render --output render.yaml creates a rendered manifest file, but trying to deploy using skaffold apply command fails with the error:

the namespace from the provided object does not match the namespace agones-system

This failure happens on every repeat deployment excluding the first time deployment.
This command invoked by Skaffold here fails if there are multiple namespaces in the rendered manifests and the resources already exist:

kubectl --context kind-kind --namespace agones-system create --dry-run=client -oyaml -f render.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/frictionIssues causing user pain that do not have a workaroundpriority/p1High impact feature/bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions