Skip to content

Commit 7f2096d

Browse files
authored
Merge pull request #316 from daudcanugerah/module/argoproj
add argoproj 3.0.12
2 parents ca38af1 + cdeb284 commit 7f2096d

File tree

7 files changed

+19747
-5634
lines changed

7 files changed

+19747
-5634
lines changed

argoproj/download_crd.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
APP_VERSION=$1
4+
5+
# Check if yq is installed
6+
if ! command -v yq &>/dev/null; then
7+
echo "Error: yq is not installed. Please install it first."
8+
echo "For Linux/macOS: brew install yq"
9+
echo "Or see: https://github.com/mikefarah/yq#install"
10+
exit 1
11+
fi
12+
13+
# Download the file
14+
echo "📥 Downloading install.yaml..."
15+
curl -sLO https://raw.githubusercontent.com/argoproj/argo-cd/${APP_VERSION}/manifests/install.yaml
16+
17+
# Process each document in the multi-document YAML
18+
echo "🔍 Processing YAML documents..."
19+
processed=0
20+
doc_index=0
21+
22+
# Use yq to split documents and process each one
23+
while true; do
24+
# Try to get the kind of the current document (compatible with both yq v3 and v4)
25+
kind=$(yq eval 'select(document_index == '$doc_index').kind' install.yaml 2>/dev/null ||
26+
yq r -d$doc_index install.yaml kind 2>/dev/null)
27+
28+
# Exit loop if we've gone past the last document
29+
if [[ -z "$kind" ]]; then
30+
break
31+
fi
32+
33+
# Get the name (try both yq v4 and v3 syntax)
34+
name=$(yq eval 'select(document_index == '$doc_index').metadata.name' install.yaml 2>/dev/null ||
35+
yq r -d$doc_index install.yaml metadata.name 2>/dev/null)
36+
37+
# Only process CustomResourceDefinitions with valid names
38+
if [[ "$kind" == "CustomResourceDefinition" && -n "$name" ]]; then
39+
filename="yaml-${name}.yaml"
40+
41+
# Extract the complete document
42+
yq eval 'select(document_index == '$doc_index')' install.yaml >"$filename" 2>/dev/null ||
43+
yq r -d$doc_index install.yaml >"$filename" 2>/dev/null
44+
45+
echo "✅ Created: $filename"
46+
((processed++))
47+
fi
48+
49+
((doc_index++))
50+
done
51+
52+
rm -rf install.yaml

argoproj/kcl.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "argoproj"
3-
version = "0.2.1"
3+
version = "3.0.12"
44
description = "`argoproj` module contains definitions for argoproj"
55

66
[dependencies]
7-
k8s = "1.31.2"
7+
k8s = "1.32.4"

argoproj/kcl.mod.lock

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
[dependencies]
22
[dependencies.k8s]
33
name = "k8s"
4-
full_name = "k8s_1.31.2"
5-
version = "1.31.2"
4+
full_name = "k8s_1.32.4"
5+
version = "1.32.4"
6+
sum = "WrltC/mTXtdzmhBZxlvM71wJL5C/UZ/vW+bF3nFvNbM="
7+
reg = "ghcr.io"
8+
repo = "kcl-lang/k8s"
9+
oci_tag = "1.32.4"

argoproj/update.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
set -Eeuo pipefail
3+
4+
./download_crd.sh "v3.0.12"
5+
kcl import -m crd -o . *.yaml
6+
rm -rf v*
7+
mv models/v* .
8+
rm -rf models/
9+
rm -rf *.yaml

argoproj/v1alpha1/argoproj_io_v1alpha1_app_project.k

Lines changed: 66 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ import k8s.apimachinery.pkg.apis.meta.v1
66

77

88
schema AppProject:
9-
"""
10-
AppProject provides a logical grouping of applications, providing controls for: * where the apps may deploy to (cluster whitelist) * what may be deployed (repository whitelist, resource whitelist/blacklist) * who can access these applications (roles, OIDC group claims bindings) * and what they can do (RBAC policies) * automation access to these roles (JWT tokens)
9+
r"""
10+
AppProject provides a logical grouping of applications, providing controls for:
11+
* where the apps may deploy to (cluster whitelist)
12+
* what may be deployed (repository whitelist, resource whitelist/blacklist)
13+
* who can access these applications (roles, OIDC group claims bindings)
14+
* and what they can do (RBAC policies)
15+
* automation access to these roles (JWT tokens)
1116

1217
Attributes
1318
----------
@@ -36,7 +41,7 @@ schema AppProject:
3641

3742

3843
schema ArgoprojIoV1alpha1AppProjectSpec:
39-
"""
44+
r"""
4045
AppProjectSpec is the specification of an AppProject
4146

4247
Attributes
@@ -47,6 +52,8 @@ schema ArgoprojIoV1alpha1AppProjectSpec:
4752
ClusterResourceWhitelist contains list of whitelisted cluster level resources
4853
description : str, default is Undefined, optional
4954
Description contains optional project description
55+
destinationServiceAccounts : [ArgoprojIoV1alpha1AppProjectSpecDestinationServiceAccountsItems0], default is Undefined, optional
56+
DestinationServiceAccounts holds information about the service accounts to be impersonated for the application sync operation for each destination.
5057
destinations : [ArgoprojIoV1alpha1AppProjectSpecDestinationsItems0], default is Undefined, optional
5158
Destinations contains list of destinations available for deployment
5259
namespaceResourceBlacklist : [ArgoprojIoV1alpha1AppProjectSpecNamespaceResourceBlacklistItems0], default is Undefined, optional
@@ -76,6 +83,8 @@ schema ArgoprojIoV1alpha1AppProjectSpec:
7683

7784
description?: str
7885

86+
destinationServiceAccounts?: [ArgoprojIoV1alpha1AppProjectSpecDestinationServiceAccountsItems0]
87+
7988
destinations?: [ArgoprojIoV1alpha1AppProjectSpecDestinationsItems0]
8089

8190
namespaceResourceBlacklist?: [ArgoprojIoV1alpha1AppProjectSpecNamespaceResourceBlacklistItems0]
@@ -98,8 +107,9 @@ schema ArgoprojIoV1alpha1AppProjectSpec:
98107

99108

100109
schema ArgoprojIoV1alpha1AppProjectSpecClusterResourceBlacklistItems0:
101-
"""
102-
GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types
110+
r"""
111+
GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying
112+
concepts during lookup stages without having partially valid types
103113

104114
Attributes
105115
----------
@@ -116,8 +126,9 @@ schema ArgoprojIoV1alpha1AppProjectSpecClusterResourceBlacklistItems0:
116126

117127

118128
schema ArgoprojIoV1alpha1AppProjectSpecClusterResourceWhitelistItems0:
119-
"""
120-
GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types
129+
r"""
130+
GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying
131+
concepts during lookup stages without having partially valid types
121132

122133
Attributes
123134
----------
@@ -133,18 +144,41 @@ schema ArgoprojIoV1alpha1AppProjectSpecClusterResourceWhitelistItems0:
133144
kind: str
134145

135146

136-
schema ArgoprojIoV1alpha1AppProjectSpecDestinationsItems0:
147+
schema ArgoprojIoV1alpha1AppProjectSpecDestinationServiceAccountsItems0:
148+
r"""
149+
ApplicationDestinationServiceAccount holds information about the service account to be impersonated for the application sync operation.
150+
151+
Attributes
152+
----------
153+
defaultServiceAccount : str, default is Undefined, required
154+
DefaultServiceAccount to be used for impersonation during the sync operation
155+
namespace : str, default is Undefined, optional
156+
Namespace specifies the target namespace for the application's resources.
157+
server : str, default is Undefined, required
158+
Server specifies the URL of the target cluster's Kubernetes control plane API.
137159
"""
160+
161+
162+
defaultServiceAccount: str
163+
164+
namespace?: str
165+
166+
server: str
167+
168+
169+
schema ArgoprojIoV1alpha1AppProjectSpecDestinationsItems0:
170+
r"""
138171
ApplicationDestination holds information about the application's destination
139172

140173
Attributes
141174
----------
142175
name : str, default is Undefined, optional
143-
Name is an alternate way of specifying the target cluster by its symbolic name
176+
Name is an alternate way of specifying the target cluster by its symbolic name. This must be set if Server is not set.
144177
namespace : str, default is Undefined, optional
145-
Namespace specifies the target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace
178+
Namespace specifies the target namespace for the application's resources.
179+
The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace
146180
server : str, default is Undefined, optional
147-
Server specifies the URL of the target cluster and must be set to the Kubernetes control plane API
181+
Server specifies the URL of the target cluster's Kubernetes control plane API. This must be set if Name is not set.
148182
"""
149183

150184

@@ -156,8 +190,9 @@ schema ArgoprojIoV1alpha1AppProjectSpecDestinationsItems0:
156190

157191

158192
schema ArgoprojIoV1alpha1AppProjectSpecNamespaceResourceBlacklistItems0:
159-
"""
160-
GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types
193+
r"""
194+
GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying
195+
concepts during lookup stages without having partially valid types
161196

162197
Attributes
163198
----------
@@ -174,8 +209,9 @@ schema ArgoprojIoV1alpha1AppProjectSpecNamespaceResourceBlacklistItems0:
174209

175210

176211
schema ArgoprojIoV1alpha1AppProjectSpecNamespaceResourceWhitelistItems0:
177-
"""
178-
GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types
212+
r"""
213+
GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying
214+
concepts during lookup stages without having partially valid types
179215

180216
Attributes
181217
----------
@@ -192,7 +228,7 @@ schema ArgoprojIoV1alpha1AppProjectSpecNamespaceResourceWhitelistItems0:
192228

193229

194230
schema ArgoprojIoV1alpha1AppProjectSpecOrphanedResources:
195-
"""
231+
r"""
196232
OrphanedResources specifies if controller should monitor orphaned resources of apps in this project
197233

198234
Attributes
@@ -210,7 +246,7 @@ schema ArgoprojIoV1alpha1AppProjectSpecOrphanedResources:
210246

211247

212248
schema ArgoprojIoV1alpha1AppProjectSpecOrphanedResourcesIgnoreItems0:
213-
"""
249+
r"""
214250
OrphanedResourceKey is a reference to a resource to be ignored from
215251

216252
Attributes
@@ -232,7 +268,7 @@ schema ArgoprojIoV1alpha1AppProjectSpecOrphanedResourcesIgnoreItems0:
232268

233269

234270
schema ArgoprojIoV1alpha1AppProjectSpecRolesItems0:
235-
"""
271+
r"""
236272
ProjectRole represents a role that has access to a project
237273

238274
Attributes
@@ -262,7 +298,7 @@ schema ArgoprojIoV1alpha1AppProjectSpecRolesItems0:
262298

263299

264300
schema ArgoprojIoV1alpha1AppProjectSpecRolesItems0JwtTokensItems0:
265-
"""
301+
r"""
266302
JWTToken holds the issuedAt and expiresAt values of a token
267303

268304
Attributes
@@ -284,7 +320,7 @@ schema ArgoprojIoV1alpha1AppProjectSpecRolesItems0JwtTokensItems0:
284320

285321

286322
schema ArgoprojIoV1alpha1AppProjectSpecSignatureKeysItems0:
287-
"""
323+
r"""
288324
SignatureKey is the specification of a key required to verify commit signatures with
289325

290326
Attributes
@@ -298,11 +334,13 @@ schema ArgoprojIoV1alpha1AppProjectSpecSignatureKeysItems0:
298334

299335

300336
schema ArgoprojIoV1alpha1AppProjectSpecSyncWindowsItems0:
301-
"""
337+
r"""
302338
SyncWindow contains the kind, time, duration and attributes that are used to assign the syncWindows to apps
303339

304340
Attributes
305341
----------
342+
andOperator : bool, default is Undefined, optional
343+
UseAndOperator use AND operator for matching applications, namespaces and clusters instead of the default OR operator
306344
applications : [str], default is Undefined, optional
307345
Applications contains a list of applications that the window will apply to
308346
clusters : [str], default is Undefined, optional
@@ -322,6 +360,8 @@ schema ArgoprojIoV1alpha1AppProjectSpecSyncWindowsItems0:
322360
"""
323361

324362

363+
andOperator?: bool
364+
325365
applications?: [str]
326366

327367
clusters?: [str]
@@ -340,7 +380,7 @@ schema ArgoprojIoV1alpha1AppProjectSpecSyncWindowsItems0:
340380

341381

342382
schema ArgoprojIoV1alpha1AppProjectStatus:
343-
"""
383+
r"""
344384
AppProjectStatus contains status information for AppProject CRs
345385

346386
Attributes
@@ -354,7 +394,7 @@ schema ArgoprojIoV1alpha1AppProjectStatus:
354394

355395

356396
schema ArgoprojIoV1alpha1AppProjectStatusJwtTokensByRoleAnon:
357-
"""
397+
r"""
358398
JWTTokens represents a list of JWT tokens
359399

360400
Attributes
@@ -368,7 +408,7 @@ schema ArgoprojIoV1alpha1AppProjectStatusJwtTokensByRoleAnon:
368408

369409

370410
schema ArgoprojIoV1alpha1AppProjectStatusJwtTokensByRoleAnonItemsItems0:
371-
"""
411+
r"""
372412
JWTToken holds the issuedAt and expiresAt values of a token
373413

374414
Attributes
@@ -387,3 +427,5 @@ schema ArgoprojIoV1alpha1AppProjectStatusJwtTokensByRoleAnonItemsItems0:
387427
iat: int
388428

389429
id?: str
430+
431+

0 commit comments

Comments
 (0)