GoogleContainerTools / skaffold

Easy and Repeatable Kubernetes Development

Home Page:https://skaffold.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modules activated by profiles?

seagullmouse opened this issue · comments

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, but all, config1 and config2 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

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

Excellent, I'll give this a go, thanks for explaining this. 👍