0

I have a release from my Github Actions that pushed multiple image artifacts to a single release on Google Cloud Deploy. That configured with clouddeploy.yaml, skaffold.yaml and rawYaml for serving to Cloud Run.

I tried to use multiple rawYaml file on Skaffold configuration but Cloud Build returned me an error

error: the manifest contains a KRM definition with kind: Service. As a result the manifest is assumed to define a Cloud Run Service. However, 2 KRM definitions were found, a manifest may only define one Cloud Run Service

My case need to deploy different image on each child target on single multi-target but I still don't know how to fix that.

here's my clouddeploy.yaml

apiVersion: deploy.cloud.google.com/v1
kind: DeliveryPipeline
metadata:
  name: main-pipeline
description: main application pipeline
serialPipeline:
  stages:
    - targetId: prod-services
---
apiVersion: deploy.cloud.google.com/v1
kind: Target
metadata:
  name: prod-services
description: production group services
multiTarget:
  targetIds: [service-name-1, service-name-2]
---
apiVersion: deploy.cloud.google.com/v1
kind: Target
metadata:
  name: service-name-1
description: production service 1
run:
  location: projects/coolbeaver/locations/asia-southeast1
---
apiVersion: deploy.cloud.google.com/v1
kind: Target
metadata:
  name: service-name-2
description: production service 2
run:
  location: projects/coolbeaver/locations/asia-southeast1

here's my skaffold.yaml

apiVersion: skaffold/v4beta6
kind: Config

manifests:
  rawYaml:
    - services/*

deploy:
  cloudrun: {}

here's the example of config files in services/ folder

service-name-1.yaml

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: service-name-1
spec:
  template:
    spec:
      containers:
        - image: service-name-1

0 Answers0