Skip to content

Commit a742a8e

Browse files
authored
Revert "feat: remove product crd (#997)" (#1029)
This reverts commit b138614.
1 parent 247d5ed commit a742a8e

File tree

2 files changed

+266
-0
lines changed

2 files changed

+266
-0
lines changed

charts/gitops-runtime/templates/_components/gitops-operator/crds/_all.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
{{- include "gitops-operator.crds.promotion-flow" $context }}
1212
---
1313
{{- include "gitops-operator.crds.promotion-template" $context }}
14+
---
15+
{{- include "gitops-operator.crds.product" $context }}
1416
---
1517
{{- if not (get .Values.global "runtime").singleNamespace }}
1618
{{- include "gitops-operator.crds.restricted-gitsource" $context }}
Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
{{- define "gitops-operator.crds.product" }}
2+
{{- if .Values.crds.install }}
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
name: products.codefresh.io
7+
annotations:
8+
{{- if .Values.crds.keep }}
9+
"helm.sh/resource-policy": keep
10+
{{- end }}
11+
{{- with .Values.crds.annotations }}
12+
{{- toYaml . | nindent 4 }}
13+
{{- end }}
14+
labels:
15+
app.kubernetes.io/name: products.codefresh.io
16+
app.kubernetes.io/part-of: gitops-operator
17+
{{- with .Values.crds.additionalLabels }}
18+
{{- toYaml . | nindent 4}}
19+
{{- end }}
20+
spec:
21+
group: codefresh.io
22+
names:
23+
kind: Product
24+
listKind: ProductList
25+
plural: products
26+
shortNames:
27+
- prod
28+
singular: product
29+
scope: Namespaced
30+
versions:
31+
- name: v1beta1
32+
schema:
33+
openAPIV3Schema:
34+
description: Product is the Schema for the products API
35+
properties:
36+
apiVersion:
37+
description: |-
38+
APIVersion defines the versioned schema of this representation of an object.
39+
Servers should convert recognized schemas to the latest internal value, and
40+
may reject unrecognized values.
41+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
42+
type: string
43+
kind:
44+
description: |-
45+
Kind is a string value representing the REST resource this object represents.
46+
Servers may infer this from the endpoint the client submits requests to.
47+
Cannot be updated.
48+
In CamelCase.
49+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
50+
type: string
51+
metadata:
52+
type: object
53+
spec:
54+
description: ProductSpec defines the desired state of Product
55+
properties:
56+
promotionFlows:
57+
description: PromotionFlows is an array of promotion flows and their
58+
relevant matchers.
59+
items:
60+
description: ProductPromotionFlowsSelectors defines all selectors
61+
to use one specific PromotionFlow
62+
properties:
63+
gitTriggerSelectors:
64+
description: List of selectors based on git trigger info
65+
items:
66+
description: Selector based on git trigger info
67+
properties:
68+
key:
69+
description: Key field to use for the expression
70+
enum:
71+
- commitMessage
72+
- gitRevision
73+
type: string
74+
operator:
75+
description: Operator used for filtering 'key' value
76+
enum:
77+
- In
78+
- NotIn
79+
type: string
80+
values:
81+
description: Filter values for operator
82+
items:
83+
type: string
84+
minItems: 1
85+
type: array
86+
required:
87+
- key
88+
- operator
89+
- values
90+
type: object
91+
minItems: 1
92+
type: array
93+
name:
94+
description: Promotion flow name
95+
type: string
96+
required:
97+
- name
98+
type: object
99+
minItems: 1
100+
type: array
101+
promotionTemplate:
102+
description: PromotionTemplate is used to define a custom template
103+
for the product
104+
properties:
105+
promotion:
106+
additionalProperties:
107+
properties:
108+
jsonPaths:
109+
description: JsonPaths is an array of json paths inside
110+
the file,
111+
items:
112+
type: string
113+
minItems: 1
114+
type: array
115+
required:
116+
- jsonPaths
117+
type: object
118+
description: Promotion is the definition on how to promote this
119+
application
120+
type: object
121+
versionSource:
122+
description: VersionSource is the source of the application version
123+
properties:
124+
file:
125+
description: File is the file name of the source
126+
type: string
127+
jsonPath:
128+
description: JsonPath is the json path inside the file, to
129+
the version information
130+
type: string
131+
required:
132+
- file
133+
- jsonPath
134+
type: object
135+
type: object
136+
promotionTemplateRef:
137+
description: PromotionTemplateRef is the name of associated promotion
138+
template
139+
type: string
140+
type: object
141+
type: object
142+
served: true
143+
storage: false
144+
- name: v1beta2
145+
schema:
146+
openAPIV3Schema:
147+
description: Product is the Schema for the products API
148+
properties:
149+
apiVersion:
150+
description: |-
151+
APIVersion defines the versioned schema of this representation of an object.
152+
Servers should convert recognized schemas to the latest internal value, and
153+
may reject unrecognized values.
154+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
155+
type: string
156+
kind:
157+
description: |-
158+
Kind is a string value representing the REST resource this object represents.
159+
Servers may infer this from the endpoint the client submits requests to.
160+
Cannot be updated.
161+
In CamelCase.
162+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
163+
type: string
164+
metadata:
165+
type: object
166+
spec:
167+
description: ProductSpec defines the desired state of Product
168+
properties:
169+
concurrency:
170+
description: Concurrency specifies policy used for concurrent promotions
171+
enum:
172+
- queue
173+
- terminate
174+
type: string
175+
promotionFlows:
176+
description: PromotionFlows is an array of promotion flows and their
177+
relevant matchers.
178+
items:
179+
description: ProductPromotionFlowsSelectors defines all selectors
180+
to use one specific PromotionFlow
181+
properties:
182+
gitTriggerSelectors:
183+
description: List of selectors based on git trigger info
184+
items:
185+
description: Selector based on git trigger info
186+
properties:
187+
key:
188+
description: Key field to use for the expression
189+
enum:
190+
- commitMessage
191+
- gitRevision
192+
type: string
193+
operator:
194+
description: Operator used for filtering 'key' value
195+
enum:
196+
- In
197+
- NotIn
198+
type: string
199+
values:
200+
description: Filter values for operator
201+
items:
202+
type: string
203+
minItems: 1
204+
type: array
205+
required:
206+
- key
207+
- operator
208+
- values
209+
type: object
210+
minItems: 1
211+
type: array
212+
name:
213+
description: Promotion flow name
214+
type: string
215+
required:
216+
- name
217+
type: object
218+
minItems: 1
219+
type: array
220+
promotionTemplate:
221+
description: PromotionTemplate is used to define a custom template
222+
for the product
223+
properties:
224+
promotion:
225+
additionalProperties:
226+
properties:
227+
jsonPaths:
228+
description: JsonPaths is an array of json paths inside
229+
the file,
230+
items:
231+
type: string
232+
minItems: 1
233+
type: array
234+
required:
235+
- jsonPaths
236+
type: object
237+
description: Promotion is the definition on how to promote this
238+
application
239+
type: object
240+
versionSource:
241+
description: VersionSource is the source of the application version
242+
properties:
243+
file:
244+
description: File is the file name of the source
245+
type: string
246+
jsonPath:
247+
description: JsonPath is the json path inside the file, to
248+
the version information
249+
type: string
250+
required:
251+
- file
252+
- jsonPath
253+
type: object
254+
type: object
255+
promotionTemplateRef:
256+
description: PromotionTemplateRef is the name of associated promotion
257+
template
258+
type: string
259+
type: object
260+
type: object
261+
served: true
262+
storage: true
263+
{{- end }}
264+
{{- end }}

0 commit comments

Comments
 (0)