skaffold
skaffold copied to clipboard
Override placeholder in a required configuration
Expected behavior
This is more a feature request than an issue. Background: We have a lot of microservices where we use skaffold and the configuration is mostly the same. It would be nice (like patches) to override some fields of configurations imported from other storage (local, remote etc.)
Actual behavior
- Somewhere on a different git repo, there is a config file: recipes/gradle_jib.yaml
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: cfg
build:
local:
useDockerCLI: true
useBuildkit: true
push: false
tagPolicy:
gitCommit: {}
artifacts:
- image: placeholder
jib:
type: gradle
profiles:
- name: build
build:
local:
push: false
- Project configuration
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: project
requires:
- configs: [cfg]
git:
repo: ssh://git@repo_url
path: recipes/gradle_jib.yaml
ref: main
activeProfiles:
- name: build
profiles:
- name: build
patches:
- op: replace
path: /build/artifacts/0/image
value: project_name
This is throwing an error because the patch is applied on the build profile of the project configuration and not on the cfg configuration.
Is there maybe some way to customize the configuration imported or is this feature planned for future releases?
Information
- Skaffold version: 2.9.0
- Operating system: Mac/Linux
- Installed via: Homebrew
- Contents of skaffold.yaml: see above
similar to #8600