@three14/pulumi-argocd 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +80 -0
  3. package/accountToken.d.ts +127 -0
  4. package/accountToken.js +82 -0
  5. package/accountToken.js.map +1 -0
  6. package/application.d.ts +267 -0
  7. package/application.js +226 -0
  8. package/application.js.map +1 -0
  9. package/applicationSet.d.ts +528 -0
  10. package/applicationSet.js +523 -0
  11. package/applicationSet.js.map +1 -0
  12. package/cluster.d.ts +258 -0
  13. package/cluster.js +194 -0
  14. package/cluster.js.map +1 -0
  15. package/config/index.d.ts +1 -0
  16. package/config/index.js +21 -0
  17. package/config/index.js.map +1 -0
  18. package/config/vars.d.ts +95 -0
  19. package/config/vars.js +127 -0
  20. package/config/vars.js.map +1 -0
  21. package/index.d.ts +33 -0
  22. package/index.js +78 -0
  23. package/index.js.map +1 -0
  24. package/package.json +28 -0
  25. package/project.d.ts +198 -0
  26. package/project.js +193 -0
  27. package/project.js.map +1 -0
  28. package/projectToken.d.ts +150 -0
  29. package/projectToken.js +91 -0
  30. package/projectToken.js.map +1 -0
  31. package/provider.d.ts +174 -0
  32. package/provider.js +66 -0
  33. package/provider.js.map +1 -0
  34. package/repository.d.ts +291 -0
  35. package/repository.js +135 -0
  36. package/repository.js.map +1 -0
  37. package/repositoryCertificate.d.ts +84 -0
  38. package/repositoryCertificate.js +73 -0
  39. package/repositoryCertificate.js.map +1 -0
  40. package/repositoryCredentials.d.ts +207 -0
  41. package/repositoryCredentials.js +113 -0
  42. package/repositoryCredentials.js.map +1 -0
  43. package/types/index.d.ts +3 -0
  44. package/types/index.js +11 -0
  45. package/types/index.js.map +1 -0
  46. package/types/input.d.ts +28046 -0
  47. package/types/input.js +5 -0
  48. package/types/input.js.map +1 -0
  49. package/types/output.d.ts +28045 -0
  50. package/types/output.js +5 -0
  51. package/types/output.js.map +1 -0
  52. package/utilities.d.ts +8 -0
  53. package/utilities.js +101 -0
  54. package/utilities.js.map +1 -0
@@ -0,0 +1,523 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ApplicationSet = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * Manages [application sets](https://argo-cd.readthedocs.io/en/stable/user-guide/application-set/) within ArgoCD.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as argocd from "@three14/pulumi-argocd";
16
+ *
17
+ * // Clusters Generator
18
+ * const clustersSelector = new argocd.ApplicationSet("clusters_selector", {
19
+ * metadata: {
20
+ * name: "clusters-selector",
21
+ * },
22
+ * spec: {
23
+ * generators: [{
24
+ * clusters: [{
25
+ * selector: {
26
+ * matchLabels: {
27
+ * "argocd.argoproj.io/secret-type": "cluster",
28
+ * },
29
+ * },
30
+ * }],
31
+ * }],
32
+ * template: {
33
+ * metadata: {
34
+ * name: "{{name}}-clusters-selector",
35
+ * },
36
+ * spec: {
37
+ * sources: [{
38
+ * repoUrl: "https://github.com/argoproj/argocd-example-apps/",
39
+ * targetRevision: "HEAD",
40
+ * path: "guestbook",
41
+ * }],
42
+ * destination: {
43
+ * server: "{{server}}",
44
+ * namespace: "default",
45
+ * },
46
+ * },
47
+ * },
48
+ * },
49
+ * });
50
+ * // Cluster Decision Resource Generator
51
+ * const clusterDecisionResource = new argocd.ApplicationSet("cluster_decision_resource", {
52
+ * metadata: {
53
+ * name: "cluster-decision-resource",
54
+ * },
55
+ * spec: {
56
+ * generators: [{
57
+ * clusterDecisionResources: [{
58
+ * configMapRef: "my-configmap",
59
+ * name: "quak",
60
+ * }],
61
+ * }],
62
+ * template: {
63
+ * metadata: {
64
+ * name: "{{name}}-guestbook",
65
+ * },
66
+ * spec: {
67
+ * sources: [{
68
+ * repoUrl: "https://github.com/argoproj/argocd-example-apps/",
69
+ * targetRevision: "HEAD",
70
+ * path: "guestbook",
71
+ * }],
72
+ * destination: {
73
+ * server: "{{server}}",
74
+ * namespace: "default",
75
+ * },
76
+ * },
77
+ * },
78
+ * },
79
+ * });
80
+ * // Git Generator - Directories
81
+ * const gitDirectories = new argocd.ApplicationSet("git_directories", {
82
+ * metadata: {
83
+ * name: "git-directories",
84
+ * },
85
+ * spec: {
86
+ * generators: [{
87
+ * gits: [{
88
+ * repoUrl: "https://github.com/argoproj/argo-cd.git",
89
+ * revision: "HEAD",
90
+ * directories: [
91
+ * {
92
+ * path: "applicationset/examples/git-generator-directory/cluster-addons/*",
93
+ * },
94
+ * {
95
+ * path: "applicationset/examples/git-generator-directory/excludes/cluster-addons/exclude-helm-guestbook",
96
+ * exclude: true,
97
+ * },
98
+ * ],
99
+ * }],
100
+ * }],
101
+ * template: {
102
+ * metadata: {
103
+ * name: "{{path.basename}}-git-directories",
104
+ * },
105
+ * spec: {
106
+ * sources: [{
107
+ * repoUrl: "https://github.com/argoproj/argo-cd.git",
108
+ * targetRevision: "HEAD",
109
+ * path: "{{path}}",
110
+ * }],
111
+ * destination: {
112
+ * server: "https://kubernetes.default.svc",
113
+ * namespace: "{{path.basename}}",
114
+ * },
115
+ * },
116
+ * },
117
+ * },
118
+ * });
119
+ * // Git Generator - Files
120
+ * const gitFiles = new argocd.ApplicationSet("git_files", {
121
+ * metadata: {
122
+ * name: "git-files",
123
+ * },
124
+ * spec: {
125
+ * generators: [{
126
+ * gits: [{
127
+ * repoUrl: "https://github.com/argoproj/argo-cd.git",
128
+ * revision: "HEAD",
129
+ * files: [{
130
+ * path: "applicationset/examples/git-generator-files-discovery/cluster-config/**/config.json",
131
+ * }],
132
+ * }],
133
+ * }],
134
+ * template: {
135
+ * metadata: {
136
+ * name: "{{cluster.name}}-git-files",
137
+ * },
138
+ * spec: {
139
+ * sources: [{
140
+ * repoUrl: "https://github.com/argoproj/argo-cd.git",
141
+ * targetRevision: "HEAD",
142
+ * path: "applicationset/examples/git-generator-files-discovery/apps/guestbook",
143
+ * }],
144
+ * destination: {
145
+ * server: "{{cluster.address}}",
146
+ * namespace: "guestbook",
147
+ * },
148
+ * },
149
+ * },
150
+ * },
151
+ * });
152
+ * // List Generator
153
+ * const list = new argocd.ApplicationSet("list", {
154
+ * metadata: {
155
+ * name: "list",
156
+ * },
157
+ * spec: {
158
+ * generators: [{
159
+ * lists: [{
160
+ * elements: [
161
+ * {
162
+ * cluster: "engineering-dev",
163
+ * url: "https://kubernetes.default.svc",
164
+ * },
165
+ * {
166
+ * cluster: "engineering-prod",
167
+ * url: "https://kubernetes.default.svc",
168
+ * foo: "bar",
169
+ * },
170
+ * ],
171
+ * }],
172
+ * }],
173
+ * template: {
174
+ * metadata: {
175
+ * name: "{{cluster}}-guestbook",
176
+ * },
177
+ * spec: {
178
+ * project: "my-project",
179
+ * sources: [{
180
+ * repoUrl: "https://github.com/argoproj/argo-cd.git",
181
+ * targetRevision: "HEAD",
182
+ * path: "applicationset/examples/list-generator/guestbook/{{cluster}}",
183
+ * }],
184
+ * destination: {
185
+ * server: "{{url}}",
186
+ * namespace: "guestbook",
187
+ * },
188
+ * },
189
+ * },
190
+ * },
191
+ * });
192
+ * // Matrix Generator
193
+ * const matrix = new argocd.ApplicationSet("matrix", {
194
+ * metadata: {
195
+ * name: "matrix",
196
+ * },
197
+ * spec: {
198
+ * generators: [{
199
+ * matrices: [{
200
+ * generators: [
201
+ * {
202
+ * gits: [{
203
+ * repoUrl: "https://github.com/argoproj/argo-cd.git",
204
+ * revision: "HEAD",
205
+ * directories: [{
206
+ * path: "applicationset/examples/matrix/cluster-addons/*",
207
+ * }],
208
+ * }],
209
+ * },
210
+ * {
211
+ * clusters: [{
212
+ * selector: {
213
+ * matchLabels: {
214
+ * "argocd.argoproj.io/secret-type": "cluster",
215
+ * },
216
+ * },
217
+ * }],
218
+ * },
219
+ * ],
220
+ * }],
221
+ * }],
222
+ * template: {
223
+ * metadata: {
224
+ * name: "{{path.basename}}-{{name}}",
225
+ * },
226
+ * spec: {
227
+ * project: "default",
228
+ * sources: [{
229
+ * repoUrl: "https://github.com/argoproj/argo-cd.git",
230
+ * targetRevision: "HEAD",
231
+ * path: "{{path}}",
232
+ * }],
233
+ * destination: {
234
+ * server: "{{server}}",
235
+ * namespace: "{{path.basename}}",
236
+ * },
237
+ * },
238
+ * },
239
+ * },
240
+ * });
241
+ * // Merge Generator
242
+ * const merge = new argocd.ApplicationSet("merge", {
243
+ * metadata: {
244
+ * name: "merge",
245
+ * },
246
+ * spec: {
247
+ * generators: [{
248
+ * merges: [{
249
+ * mergeKeys: ["server"],
250
+ * generators: [
251
+ * {
252
+ * clusters: [{
253
+ * values: {
254
+ * kafka: "true",
255
+ * redis: "false",
256
+ * },
257
+ * }],
258
+ * },
259
+ * {
260
+ * clusters: [{
261
+ * selector: {
262
+ * matchLabels: {
263
+ * "use-kafka": "false",
264
+ * },
265
+ * },
266
+ * values: {
267
+ * kafka: "false",
268
+ * },
269
+ * }],
270
+ * },
271
+ * {
272
+ * lists: [{
273
+ * elements: [{
274
+ * server: "https://2.4.6.8",
275
+ * "values.redis": "true",
276
+ * }],
277
+ * }],
278
+ * },
279
+ * ],
280
+ * }],
281
+ * }],
282
+ * template: {
283
+ * metadata: {
284
+ * name: "{{name}}",
285
+ * },
286
+ * spec: {
287
+ * project: "default",
288
+ * sources: [{
289
+ * repoUrl: "https://github.com/argoproj/argo-cd.git",
290
+ * path: "app",
291
+ * targetRevision: "HEAD",
292
+ * helm: {
293
+ * parameters: [
294
+ * {
295
+ * name: "kafka",
296
+ * value: "{{values.kafka}}",
297
+ * },
298
+ * {
299
+ * name: "redis",
300
+ * value: "{{values.redis}}",
301
+ * },
302
+ * ],
303
+ * },
304
+ * }],
305
+ * destination: {
306
+ * server: "{{server}}",
307
+ * namespace: "default",
308
+ * },
309
+ * },
310
+ * },
311
+ * },
312
+ * });
313
+ * // Pull Request Generator - GitHub
314
+ * const prGithub = new argocd.ApplicationSet("pr_github", {
315
+ * metadata: {
316
+ * name: "pr-github",
317
+ * },
318
+ * spec: {
319
+ * generators: [{
320
+ * pullRequests: [{
321
+ * github: {
322
+ * api: "https://git.example.com/",
323
+ * owner: "myorg",
324
+ * repo: "myrepository",
325
+ * appSecretName: "github-app-repo-creds",
326
+ * tokenRef: {
327
+ * secretName: "github-token",
328
+ * key: "token",
329
+ * },
330
+ * labels: ["preview"],
331
+ * },
332
+ * }],
333
+ * }],
334
+ * template: {
335
+ * metadata: {
336
+ * name: "myapp-{{branch}}-{{number}}",
337
+ * },
338
+ * spec: {
339
+ * project: "default",
340
+ * sources: [{
341
+ * repoUrl: "https://github.com/myorg/myrepo.git",
342
+ * path: "kubernetes/",
343
+ * targetRevision: "{{head_sha}}",
344
+ * helm: {
345
+ * parameters: [{
346
+ * name: "image.tag",
347
+ * value: "pull-{{head_sha}}",
348
+ * }],
349
+ * },
350
+ * }],
351
+ * destination: {
352
+ * server: "https://kubernetes.default.svc",
353
+ * namespace: "default",
354
+ * },
355
+ * },
356
+ * },
357
+ * },
358
+ * });
359
+ * // SCM Provider Generator - GitHub
360
+ * const scmGithub = new argocd.ApplicationSet("scm_github", {
361
+ * metadata: {
362
+ * name: "scm-github",
363
+ * },
364
+ * spec: {
365
+ * generators: [{
366
+ * scmProviders: [{
367
+ * github: {
368
+ * appSecretName: "gh-app-repo-creds",
369
+ * organization: "myorg",
370
+ * },
371
+ * }],
372
+ * }],
373
+ * template: {
374
+ * metadata: {
375
+ * name: "{{repository}}",
376
+ * },
377
+ * spec: {
378
+ * project: "default",
379
+ * sources: [{
380
+ * repoUrl: "{{url}}",
381
+ * path: "kubernetes/",
382
+ * targetRevision: "{{branch}}",
383
+ * }],
384
+ * destination: {
385
+ * server: "https://kubernetes.default.svc",
386
+ * namespace: "default",
387
+ * },
388
+ * },
389
+ * },
390
+ * },
391
+ * });
392
+ * // Progressive Sync - Rolling Update
393
+ * const progressiveSync = new argocd.ApplicationSet("progressive_sync", {
394
+ * metadata: {
395
+ * name: "progressive-sync",
396
+ * },
397
+ * spec: {
398
+ * generators: [{
399
+ * lists: [{
400
+ * elements: [
401
+ * {
402
+ * cluster: "engineering-dev",
403
+ * url: "https://1.2.3.4",
404
+ * env: "env-dev",
405
+ * },
406
+ * {
407
+ * cluster: "engineering-qa",
408
+ * url: "https://2.4.6.8",
409
+ * env: "env-qa",
410
+ * },
411
+ * {
412
+ * cluster: "engineering-prod",
413
+ * url: "https://9.8.7.6/",
414
+ * env: "env-prod",
415
+ * },
416
+ * ],
417
+ * }],
418
+ * }],
419
+ * strategy: {
420
+ * type: "RollingSync",
421
+ * rollingSyncs: [{
422
+ * steps: [
423
+ * {
424
+ * matchExpressions: [{
425
+ * key: "envLabel",
426
+ * operator: "In",
427
+ * values: ["env-dev"],
428
+ * }],
429
+ * },
430
+ * {
431
+ * matchExpressions: [{
432
+ * key: "envLabel",
433
+ * operator: "In",
434
+ * values: ["env-qa"],
435
+ * }],
436
+ * maxUpdate: "0",
437
+ * },
438
+ * {
439
+ * matchExpressions: [{
440
+ * key: "envLabel",
441
+ * operator: "In",
442
+ * values: ["env-prod"],
443
+ * }],
444
+ * maxUpdate: "10%",
445
+ * },
446
+ * ],
447
+ * }],
448
+ * },
449
+ * goTemplate: true,
450
+ * template: {
451
+ * metadata: {
452
+ * name: "{{.cluster}}-guestbook",
453
+ * labels: {
454
+ * envLabel: "{{.env}}",
455
+ * },
456
+ * },
457
+ * spec: {
458
+ * project: "default",
459
+ * sources: [{
460
+ * repoUrl: "https://github.com/infra-team/cluster-deployments.git",
461
+ * path: "guestbook/{{.cluster}}",
462
+ * targetRevision: "HEAD",
463
+ * }],
464
+ * destination: {
465
+ * server: "{{.url}}",
466
+ * namespace: "guestbook",
467
+ * },
468
+ * },
469
+ * },
470
+ * },
471
+ * });
472
+ * ```
473
+ */
474
+ class ApplicationSet extends pulumi.CustomResource {
475
+ /**
476
+ * Get an existing ApplicationSet resource's state with the given name, ID, and optional extra
477
+ * properties used to qualify the lookup.
478
+ *
479
+ * @param name The _unique_ name of the resulting resource.
480
+ * @param id The _unique_ provider ID of the resource to lookup.
481
+ * @param state Any extra arguments used during the lookup.
482
+ * @param opts Optional settings to control the behavior of the CustomResource.
483
+ */
484
+ static get(name, id, state, opts) {
485
+ return new ApplicationSet(name, state, Object.assign(Object.assign({}, opts), { id: id }));
486
+ }
487
+ /**
488
+ * Returns true if the given object is an instance of ApplicationSet. This is designed to work even
489
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
490
+ */
491
+ static isInstance(obj) {
492
+ if (obj === undefined || obj === null) {
493
+ return false;
494
+ }
495
+ return obj['__pulumiType'] === ApplicationSet.__pulumiType;
496
+ }
497
+ constructor(name, argsOrState, opts) {
498
+ let resourceInputs = {};
499
+ opts = opts || {};
500
+ if (opts.id) {
501
+ const state = argsOrState;
502
+ resourceInputs["metadata"] = state ? state.metadata : undefined;
503
+ resourceInputs["spec"] = state ? state.spec : undefined;
504
+ }
505
+ else {
506
+ const args = argsOrState;
507
+ if ((!args || args.metadata === undefined) && !opts.urn) {
508
+ throw new Error("Missing required property 'metadata'");
509
+ }
510
+ if ((!args || args.spec === undefined) && !opts.urn) {
511
+ throw new Error("Missing required property 'spec'");
512
+ }
513
+ resourceInputs["metadata"] = args ? args.metadata : undefined;
514
+ resourceInputs["spec"] = args ? args.spec : undefined;
515
+ }
516
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
517
+ super(ApplicationSet.__pulumiType, name, resourceInputs, opts);
518
+ }
519
+ }
520
+ exports.ApplicationSet = ApplicationSet;
521
+ /** @internal */
522
+ ApplicationSet.__pulumiType = 'argocd:index/applicationSet:ApplicationSet';
523
+ //# sourceMappingURL=applicationSet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applicationSet.js","sourceRoot":"","sources":["../applicationSet.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,i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