Modules activated by profiles?
seagullmouse opened this issue · comments
Matthew Hersee commented
My requirement is as follows
- Use profiles to conditionally build and deploy a large set of images
- These images are separated into modules
core
config should always be run, butall
,config1
andconfig2
should only run based on the profiles- I can't work out the
skaffold.yaml
, my pseudo-skaffold.yaml is below
apiVersion: skaffold/v4beta10
kind: Config
metadata:
name: example
requires:
- configs: ["core"]
profiles:
- name: all
requires:
- configs: ["config1", "config2"]
- name: config1
requires:
- configs: ["config1"]
- name: config2
requires:
- configs: ["config2"]
Please advise
Charles Gardner commented
This already works.
apiVersion: skaffold/v4beta10
kind: Config
metadata:
name: example
requires:
- configs:
- core
activatedProfiles:
- name: config1
activatedBy:
- all
- name: config2
activatedBy:
- all
profiles:
- name: all
---
apiVersion: skaffold/v4beta10
kind: Config
metadata:
name: config1
profiles:
- name: all
---
apiVersion: skaffold/v4beta10
kind: Config
metadata:
name: config2
profiles:
- name: all
Matthew Hersee commented
Excellent, I'll give this a go, thanks for explaining this. 👍