Skip to content

Commit f6e2d69

Browse files
committed
feat: add helm chart
Signed-off-by: emirot <emirot.nolan@gmail.com>
1 parent fe20186 commit f6e2d69

12 files changed

Lines changed: 372 additions & 59 deletions

chart/templates/crd/argocdcommitstatuses.promoter.argoproj.io.yaml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ spec:
9696
properties:
9797
name:
9898
description: Name is the name of the object to refer to.
99+
maxLength: 253
100+
minLength: 1
101+
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
99102
type: string
100103
required:
101104
- name
@@ -161,12 +164,14 @@ spec:
161164
ApplicationsSelected represents the Argo CD applications that are selected by the commit status.
162165
This field is sorted by environment (same order as the referenced PromotionStrategy), then namespace, then name.
163166
items:
164-
description: ApplicationsSelected represents the Argo CD applications that are selected by the commit status.
167+
description: |-
168+
ApplicationsSelected represents the Argo CD applications that are selected by the commit status. The fields in this
169+
struct are all required, since the controller should always fully construct this information.
165170
properties:
166171
clusterName:
167172
description: |-
168173
ClusterName is the name of the cluster that the application manifest is deployed to. An empty string indicates
169-
the local cluster.
174+
the local cluster. There is no minimum length, since the local cluster is represented by an empty string.
170175
type: string
171176
environment:
172177
description: Environment is the syncSource.targetBranch of the Argo CD application (in effect, its environment).
@@ -178,15 +183,30 @@ spec:
178183
type: string
179184
name:
180185
description: Name is the name of the Argo CD application.
186+
maxLength: 253
187+
minLength: 1
188+
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
181189
type: string
182190
namespace:
183191
description: Namespace is the namespace of the Argo CD application.
192+
maxLength: 63
193+
minLength: 1
194+
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
184195
type: string
185196
phase:
186197
description: Phase is the current phase of the commit status.
198+
enum:
199+
- pending
200+
- success
201+
- failure
187202
type: string
188203
sha:
189-
description: Sha is the commit SHA that this status is associated with.
204+
description: |-
205+
Sha is the commit SHA that this status is associated with.
206+
Supports both SHA-1 (40 chars) and SHA-256 (64 chars) Git hash formats.
207+
maxLength: 64
208+
minLength: 40
209+
pattern: ^([a-f0-9]{40}|[a-f0-9]{64})$
190210
type: string
191211
required:
192212
- clusterName

chart/templates/crd/changetransferpolicies.promoter.argoproj.io.yaml

Lines changed: 105 additions & 20 deletions
Large diffs are not rendered by default.

chart/templates/crd/clusterscmproviders.promoter.argoproj.io.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ spec:
6969
properties:
7070
domain:
7171
description: Domain is the domain of the fake SCM provider. This is used for testing purposes.
72+
maxLength: 253
73+
minLength: 1
7274
type: string
7375
type: object
7476
forgejo:
@@ -78,6 +80,8 @@ spec:
7880
description: |-
7981
Domain is the Forgejo domain, such as "codeberg.org" or "forgejo.mycompany.com".
8082
There is no default domain since Forgejo is not a service like Gitlab or Github.
83+
maxLength: 253
84+
minLength: 1
8185
type: string
8286
required:
8387
- domain
@@ -100,6 +104,7 @@ spec:
100104
appID:
101105
description: AppID is the GitHub App ID.
102106
format: int64
107+
minimum: 0
103108
type: integer
104109
domain:
105110
description: |-
@@ -128,6 +133,9 @@ spec:
128133
Domain is the GitLab domain, such as "gitlab.mycompany.com". If using the default GitLab domain, leave this field
129134
empty.
130135
type: string
136+
x-kubernetes-validations:
137+
- message: Instead of setting the domain to gitlab.com, leave the field blank
138+
rule: self != "gitlab.com"
131139
type: object
132140
secretRef:
133141
description: SecretRef contains the credentials required to auth to a specific provider

chart/templates/crd/commitstatuses.promoter.argoproj.io.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,31 +58,39 @@ spec:
5858
description: CommitStatusSpec defines the desired state of CommitStatus
5959
properties:
6060
description:
61+
description: Description is a short description of the commit status.
6162
type: string
6263
gitRepositoryRef:
6364
description: ObjectReference is a reference to an object by name. It is used to refer to objects in the same namespace.
6465
properties:
6566
name:
6667
description: Name is the name of the object to refer to.
68+
maxLength: 253
69+
minLength: 1
70+
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
6771
type: string
6872
required:
6973
- name
7074
type: object
7175
name:
76+
description: Name is the name of the commit status.
7277
minLength: 1
7378
type: string
7479
phase:
7580
default: pending
76-
description: CommitStatusPhase represents the phase of a commit status.
81+
description: Phase is the state of the commit status. This will be mapped to the appropriate equivalent in the SCM.
7782
enum:
7883
- pending
7984
- success
8085
- failure
8186
type: string
8287
sha:
88+
description: |-
89+
SHA is the commit SHA to set the status on.
90+
Supports both SHA-1 (40 chars) and SHA-256 (64 chars) Git hash formats.
8391
maxLength: 64
84-
minLength: 1
85-
pattern: ^[a-fA-F0-9]+$
92+
minLength: 40
93+
pattern: ^([a-f0-9]{40}|[a-f0-9]{64})$
8694
type: string
8795
url:
8896
description: Url is a URL that the user can follow to see more details about the status
@@ -165,14 +173,19 @@ spec:
165173
type: string
166174
phase:
167175
default: pending
168-
description: CommitStatusPhase represents the phase of a commit status.
176+
description: Phase is the state of the commit status. This will be mapped to the appropriate equivalent in the SCM.
169177
enum:
170178
- pending
171179
- success
172180
- failure
173181
- ""
174182
type: string
175183
sha:
184+
description: |-
185+
Sha is the commit SHA that the status is set on.
186+
Supports both SHA-1 (40 chars) and SHA-256 (64 chars) Git hash formats.
187+
maxLength: 64
188+
pattern: ^([a-f0-9]{40}|[a-f0-9]{64})$
176189
type: string
177190
required:
178191
- id

0 commit comments

Comments
 (0)