Skip to content

Skaffold needs to support arbitrary mutations to manifests #1436

Closed
@hach-que

Description

Skaffold's file sync only seems to work with pods, which isn't very useful since I'd assume most folks use deployments in production (and we want to keep the environment as close as possible between our local development and production clusters).

I've also tried using hostPath mounts, but neither Skaffold's kubectl nor kustomize support allow interpolating environment variables into that Kubernetes field. Outside using Helm (which is extreme overkill for what a simple sed command can achieve), there doesn't appear to be anyway to properly mount host paths into a container.

Skaffold really needs to support a configuration option for these use-cases something like this:

apiVersion: skaffold/v1beta2
kind: Config
build:
  # ...
deploy:
  kustomize:
    path: services/kubernetes/dev
    interpolateWith:
      - "sed ...." # some executable command that accepts the manifest files on stdin, and outputs the modified manifest files to stdout
  # or
  kubectl:
    manifests:
      - "..."
    interpolateWith:
      - "sed ...." # some executable command that accepts the manifest files on stdin, and outputs the modified manifest files to stdout

Something general like this would enable developers to cover off pretty much any additional customisation they need to do.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions