Last active
February 11, 2022 18:29
-
-
Save jwntrs/bf4f1081e3664615ed640dd90e41a981 to your computer and use it in GitHub Desktop.
Nested resources
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: carto.run/v1alpha1 | |
kind: ClusterSupplyChain | |
metadata: | |
name: supply-chain | |
spec: | |
selector: | |
matchLabels: | |
workload-type: web | |
resources: | |
- name: provide-image | |
templateRef: | |
kind: ClusterImageTemplate | |
options: | |
- name: building-image | |
selector: | |
matchFields: | |
- {key: "spec.source", operation: exists} | |
resources: | |
- name: provide-source | |
templateRef: | |
kind: ClusterSourceTemplate | |
options: | |
- name: providing-and-testing-source | |
selector: | |
matchFields: | |
- {key: "metadata.labels.has-tests", operation: In, value: ["true"]} | |
resources: | |
- name: provide-source | |
templateRef: | |
kind: ClusterSourceTemplate | |
options: | |
- name: source-from-git-repo | |
selector: | |
matchFields: | |
- { key: "spec.source.url", operation: exists } | |
- name: source-from-image-registry | |
selector: | |
matchFields: | |
- { key: "spec.source.image", operation: exists } | |
- name: test-source | |
templateRef: | |
kind: ClusterSourceTemplate | |
name: source-tester | |
- name: source-from-git-repo | |
selector: | |
matchFields: | |
- { key: "spec.source.url", operation: exists } | |
- { key: "metadata.labels.has-tests", operation: NotIn, value: ["true"] } | |
- name: source-from-image-registry | |
selector: | |
matchFields: | |
- { key: "spec.source.image", operation: exists } | |
- { key: "metadata.labels.has-tests", operation: NotIn, value: ["true"] } | |
- name: image-builder | |
templateRef: | |
kind: ClusterImageTemplate | |
name: build-image | |
sources: | |
- resource: provide-source | |
name: source | |
- name: image-provider | |
selector: | |
matchFields: | |
- { key: "spec.image", operation: exists } | |
- name: configure | |
templateRef: | |
kind: ClusterConfigTemplate | |
name: configure | |
images: | |
- resource: provide-image | |
name: image | |
- name: gitops | |
templateRef: | |
kind: ClusterTemplate | |
options: | |
- name: git-pusher | |
selector: | |
matchFields: | |
- {key: "metadata.labels.target", operation: In, value: ["gitops"]} | |
- name: registry-pusher | |
selector: | |
matchFields: | |
- {key: "metadata.labels.target", operation: In, value: ["repository"]} | |
configs: | |
- resource: configure | |
name: config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment