This repository has been archived by the owner on Jun 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
supplychain-templates.yaml
98 lines (88 loc) · 2.15 KB
/
supplychain-templates.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
apiVersion: experimental.kontinue.io/v1
kind: SourceTemplate
metadata:
name: git-repository-battery
spec:
url:
path: $(status.artifact.url)
revision:
path: $(status.artifact.revision)
template:
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
name: $(workload.name)-source
spec:
interval: 3m
url: $(workload.git.url)
ref: $(workload.git.ref)
gitImplementation: libgit2
ignore: ""
---
apiVersion: experimental.kontinue.io/v1
kind: BuildTemplate
metadata:
name: kpack-battery
spec:
image:
path: $(status.latestImage)
template:
apiVersion: kpack.io/v1alpha1
kind: Image
metadata:
name: $(workload.name)-image
spec:
tag: harbor-repo.vmware.com/kontinuedemo/$(workload.name)
serviceAccount: service-account
builder:
kind: ClusterBuilder
name: java-builder
source:
blob:
url: $(sources.0.url)
---
apiVersion: experimental.kontinue.io/v1
kind: OpinionTemplate
metadata:
name: opinion-service-battery
spec:
opinion:
path: $(status.template)
template:
apiVersion: opinions.local/v1alpha1
kind: WorkloadDecorator
metadata:
name: $(workload.name)-workload-template
spec:
template:
metadata:
labels:
app.kubernetes.io/part-of: $(workload.name)
annotations:
autoscaling.knative.dev/minScale: "1"
autoscaling.knative.dev/maxScale: "1"
spec:
containers:
- name: workload
image: $(images.#[name==solo-image-provider].image)
env: $(workload.env)
resources: $(workload.resources)
securityContext:
runAsUser: 1000
imagePullSecrets:
- name: registry-credentials
---
apiVersion: experimental.kontinue.io/v1
kind: ConfigTemplate
metadata:
name: cluster-sink-battery
spec:
template:
apiVersion: experimental.kontinue.io/v1
kind: WorkloadConfiguration
metadata:
name: $(workload.name)
labels:
app.tanzu.vmware.com/workload-type: web
value: $(opinions.0.opinion)