@pulumi/harness 0.16.7 → 0.16.8
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.
- package/autostopping/alert.d.ts +2 -2
- package/autostopping/alert.js +2 -2
- package/autostopping/gcpProxy.d.ts +4 -4
- package/autostopping/gcpProxy.js +4 -4
- package/autostopping/ruleEcs.d.ts +4 -4
- package/autostopping/ruleEcs.js +4 -4
- package/autostopping/ruleRds.d.ts +5 -5
- package/autostopping/ruleRds.js +5 -5
- package/autostopping/ruleScaleGroup.d.ts +12 -12
- package/autostopping/ruleScaleGroup.js +12 -12
- package/autostopping/ruleVm.d.ts +22 -22
- package/autostopping/ruleVm.js +22 -22
- package/chaos/actionTemplate.d.ts +55 -55
- package/chaos/actionTemplate.js +55 -55
- package/chaos/experimentTemplate.d.ts +84 -84
- package/chaos/experimentTemplate.js +84 -84
- package/chaos/faultTemplate.d.ts +124 -124
- package/chaos/faultTemplate.js +124 -124
- package/chaos/imageRegistry.d.ts +6 -6
- package/chaos/imageRegistry.js +6 -6
- package/chaos/securityGovernanceCondition.d.ts +19 -19
- package/chaos/securityGovernanceCondition.js +19 -19
- package/chaos/securityGovernanceConditionV3.d.ts +13 -13
- package/chaos/securityGovernanceConditionV3.js +13 -13
- package/chaos/securityGovernanceRule.d.ts +21 -21
- package/chaos/securityGovernanceRule.js +21 -21
- package/chaos/securityGovernanceRuleV3.d.ts +9 -9
- package/chaos/securityGovernanceRuleV3.js +9 -9
- package/cluster/orchestrator.d.ts +1 -1
- package/cluster/orchestrator.js +1 -1
- package/cluster/orchestratorConfig.d.ts +9 -9
- package/cluster/orchestratorConfig.js +9 -9
- package/encryptedText.d.ts +3 -3
- package/encryptedText.js +3 -3
- package/environment.d.ts +7 -7
- package/environment.js +7 -7
- package/infrastructureDefinition.d.ts +13 -13
- package/infrastructureDefinition.js +13 -13
- package/package.json +2 -2
- package/platform/appDynamicsConnector.d.ts +8 -8
- package/platform/appDynamicsConnector.js +8 -8
- package/platform/artifactoryConnector.d.ts +12 -12
- package/platform/artifactoryConnector.js +12 -12
- package/platform/awsCCConnector.d.ts +4 -4
- package/platform/awsCCConnector.js +4 -4
- package/platform/azureCloudCostConnector.d.ts +12 -12
- package/platform/azureCloudCostConnector.js +12 -12
- package/platform/azureCloudProviderConnector.d.ts +31 -31
- package/platform/azureCloudProviderConnector.js +31 -31
- package/platform/bitbucketConnector.d.ts +27 -27
- package/platform/bitbucketConnector.js +27 -27
- package/platform/connectorCustomhealthsource.d.ts +6 -6
- package/platform/connectorCustomhealthsource.js +6 -6
- package/platform/connectorGcpKms.d.ts +15 -15
- package/platform/connectorGcpKms.js +15 -15
- package/platform/connectorRancher.d.ts +3 -3
- package/platform/connectorRancher.js +3 -3
- package/platform/dbSchema.d.ts +32 -32
- package/platform/dbSchema.js +32 -32
- package/platform/elasticsearchConnector.d.ts +8 -8
- package/platform/elasticsearchConnector.js +8 -8
- package/platform/environment.d.ts +11 -11
- package/platform/environment.js +11 -11
- package/platform/environmentClustersMapping.d.ts +6 -6
- package/platform/environmentClustersMapping.js +6 -6
- package/platform/filters.d.ts +4 -4
- package/platform/filters.js +4 -4
- package/platform/gcpCloudCostConnector.d.ts +4 -4
- package/platform/gcpCloudCostConnector.js +4 -4
- package/platform/gcpSecretManagerConnector.d.ts +8 -8
- package/platform/gcpSecretManagerConnector.js +8 -8
- package/platform/getEnvironmentClustersMapping.d.ts +12 -12
- package/platform/getEnvironmentClustersMapping.js +12 -12
- package/platform/getPolicySet.d.ts +8 -8
- package/platform/getPolicySet.js +8 -8
- package/platform/gitOpsAgent.d.ts +4 -4
- package/platform/gitOpsAgent.js +4 -4
- package/platform/gitOpsApplications.d.ts +9 -9
- package/platform/gitOpsApplications.js +9 -9
- package/platform/gitOpsGnupg.d.ts +3 -3
- package/platform/gitOpsGnupg.js +3 -3
- package/platform/gitOpsRepoCert.d.ts +1 -1
- package/platform/gitOpsRepoCert.js +1 -1
- package/platform/gitOpsRepoCred.d.ts +5 -5
- package/platform/gitOpsRepoCred.js +5 -5
- package/platform/gitopsAppProjectMapping.d.ts +12 -0
- package/platform/gitopsAppProjectMapping.d.ts.map +1 -1
- package/platform/gitopsAppProjectMapping.js +2 -0
- package/platform/gitopsAppProjectMapping.js.map +1 -1
- package/platform/gitopsApplicationset.d.ts +59 -59
- package/platform/gitopsApplicationset.js +59 -59
- package/platform/harLifecycleRule.d.ts +20 -20
- package/platform/harLifecycleRule.js +20 -20
- package/platform/harRegistry.d.ts +69 -69
- package/platform/harRegistry.js +69 -69
- package/platform/iacmAnsibleInventory.d.ts +11 -11
- package/platform/iacmAnsibleInventory.js +11 -11
- package/platform/iacmAnsiblePlaybook.d.ts +10 -10
- package/platform/iacmAnsiblePlaybook.js +10 -10
- package/platform/idpScorecard.d.ts +14 -14
- package/platform/idpScorecard.js +14 -14
- package/platform/idpScorecardCheck.d.ts +9 -9
- package/platform/idpScorecardCheck.js +9 -9
- package/platform/infraVariableSet.d.ts +21 -21
- package/platform/infraVariableSet.js +21 -21
- package/platform/infrastructure.d.ts +7 -7
- package/platform/infrastructure.js +7 -7
- package/platform/kubernetesConnector.d.ts +17 -17
- package/platform/kubernetesConnector.js +17 -17
- package/platform/monitoredService.d.ts +123 -123
- package/platform/monitoredService.js +123 -123
- package/platform/notificationRule.d.ts +10 -10
- package/platform/notificationRule.js +10 -10
- package/platform/pipeline.d.ts +9 -9
- package/platform/pipeline.js +9 -9
- package/platform/pipelineCentralNotificationRule.d.ts +22 -22
- package/platform/pipelineCentralNotificationRule.js +22 -22
- package/platform/pipelineFilters.d.ts +43 -43
- package/platform/pipelineFilters.js +43 -43
- package/platform/prometheusConnector.d.ts +6 -6
- package/platform/prometheusConnector.js +6 -6
- package/platform/repo.d.ts +4 -4
- package/platform/repo.js +4 -4
- package/platform/resourceGroup.d.ts +23 -23
- package/platform/resourceGroup.js +23 -23
- package/platform/secretFile.d.ts +10 -10
- package/platform/secretFile.js +10 -10
- package/platform/secretText.d.ts +13 -13
- package/platform/secretText.js +13 -13
- package/platform/secretWinrm.d.ts +89 -89
- package/platform/secretWinrm.js +89 -89
- package/platform/service.d.ts +10 -10
- package/platform/service.js +10 -10
- package/platform/slo.d.ts +17 -17
- package/platform/slo.js +17 -17
- package/platform/splunkConnector.d.ts +11 -11
- package/platform/splunkConnector.js +11 -11
- package/platform/templateFilters.d.ts +4 -4
- package/platform/templateFilters.js +4 -4
- package/platform/usergroup.d.ts +21 -21
- package/platform/usergroup.js +21 -21
- package/platform/variables.d.ts +4 -4
- package/platform/variables.js +4 -4
- package/platform/workspace.d.ts +32 -32
- package/platform/workspace.js +32 -32
- package/platformCcmFilters.d.ts +4 -4
- package/platformCcmFilters.js +4 -4
- package/service/discoveryAgent.d.ts +62 -62
- package/service/discoveryAgent.js +62 -62
- package/service/discoverySetting.d.ts +2 -2
- package/service/discoverySetting.js +2 -2
- package/service/kubernetes.d.ts +4 -4
- package/service/kubernetes.js +4 -4
- package/sshCredential.d.ts +3 -3
- package/sshCredential.js +3 -3
- package/userGroup.d.ts +6 -6
- package/userGroup.js +6 -6
|
@@ -61,25 +61,8 @@ const utilities = __importStar(require("../utilities"));
|
|
|
61
61
|
* // ----------------------------------------------------------------------------
|
|
62
62
|
* // Basic template with single fault
|
|
63
63
|
* const simpleFault = new harness.chaos.ExperimentTemplate("simple_fault", {
|
|
64
|
-
* orgId: _this.id,
|
|
65
|
-
* projectId: thisHarnessPlatformProject.id,
|
|
66
|
-
* hubIdentity: projectLevel.identity,
|
|
67
|
-
* identity: "simple-pod-delete",
|
|
68
|
-
* name: "Simple Pod Delete Experiment",
|
|
69
|
-
* description: "Basic experiment with single pod delete fault",
|
|
70
|
-
* tags: [
|
|
71
|
-
* "kubernetes",
|
|
72
|
-
* "pod-delete",
|
|
73
|
-
* "simple",
|
|
74
|
-
* ],
|
|
75
64
|
* spec: {
|
|
76
|
-
* infraType: "KubernetesV2",
|
|
77
65
|
* faults: [{
|
|
78
|
-
* identity: "pod-delete",
|
|
79
|
-
* name: "pod-delete-fault",
|
|
80
|
-
* revision: "v1",
|
|
81
|
-
* isEnterprise: true,
|
|
82
|
-
* authEnabled: false,
|
|
83
66
|
* values: [
|
|
84
67
|
* {
|
|
85
68
|
* name: "TARGET_WORKLOAD_KIND",
|
|
@@ -94,18 +77,35 @@ const utilities = __importStar(require("../utilities"));
|
|
|
94
77
|
* value: "<+input>.default('30s')",
|
|
95
78
|
* },
|
|
96
79
|
* ],
|
|
80
|
+
* identity: "pod-delete",
|
|
81
|
+
* name: "pod-delete-fault",
|
|
82
|
+
* revision: "v1",
|
|
83
|
+
* isEnterprise: true,
|
|
84
|
+
* authEnabled: false,
|
|
97
85
|
* }],
|
|
98
86
|
* vertices: [{
|
|
99
|
-
* name: "pod-delete-vertex",
|
|
100
87
|
* start: {
|
|
101
88
|
* faults: [{
|
|
102
89
|
* name: "pod-delete-fault",
|
|
103
90
|
* }],
|
|
104
91
|
* },
|
|
105
92
|
* end: {},
|
|
93
|
+
* name: "pod-delete-vertex",
|
|
106
94
|
* }],
|
|
95
|
+
* infraType: "KubernetesV2",
|
|
107
96
|
* cleanupPolicy: "delete",
|
|
108
97
|
* },
|
|
98
|
+
* orgId: _this.id,
|
|
99
|
+
* projectId: thisHarnessPlatformProject.id,
|
|
100
|
+
* hubIdentity: projectLevel.identity,
|
|
101
|
+
* identity: "simple-pod-delete",
|
|
102
|
+
* name: "Simple Pod Delete Experiment",
|
|
103
|
+
* description: "Basic experiment with single pod delete fault",
|
|
104
|
+
* tags: [
|
|
105
|
+
* "kubernetes",
|
|
106
|
+
* "pod-delete",
|
|
107
|
+
* "simple",
|
|
108
|
+
* ],
|
|
109
109
|
* }, {
|
|
110
110
|
* dependsOn: [projectLevel],
|
|
111
111
|
* });
|
|
@@ -114,35 +114,18 @@ const utilities = __importStar(require("../utilities"));
|
|
|
114
114
|
* // ----------------------------------------------------------------------------
|
|
115
115
|
* // Template combining action and fault
|
|
116
116
|
* const withAction = new harness.chaos.ExperimentTemplate("with_action", {
|
|
117
|
-
* orgId: _this.id,
|
|
118
|
-
* projectId: thisHarnessPlatformProject.id,
|
|
119
|
-
* hubIdentity: projectLevel.identity,
|
|
120
|
-
* identity: "action-and-fault",
|
|
121
|
-
* name: "Action and Fault Experiment",
|
|
122
|
-
* description: "Experiment with action before fault",
|
|
123
|
-
* tags: [
|
|
124
|
-
* "kubernetes",
|
|
125
|
-
* "action",
|
|
126
|
-
* "fault",
|
|
127
|
-
* ],
|
|
128
117
|
* spec: {
|
|
129
|
-
* infraType: "KubernetesV2",
|
|
130
118
|
* actions: [{
|
|
131
|
-
* identity: "notification-action",
|
|
132
|
-
* name: "pre-chaos-notification",
|
|
133
|
-
* isEnterprise: false,
|
|
134
|
-
* continueOnCompletion: false,
|
|
135
119
|
* values: [{
|
|
136
120
|
* name: "MESSAGE",
|
|
137
121
|
* value: "Starting chaos experiment",
|
|
138
122
|
* }],
|
|
123
|
+
* identity: "notification-action",
|
|
124
|
+
* name: "pre-chaos-notification",
|
|
125
|
+
* isEnterprise: false,
|
|
126
|
+
* continueOnCompletion: false,
|
|
139
127
|
* }],
|
|
140
128
|
* faults: [{
|
|
141
|
-
* identity: "container-kill",
|
|
142
|
-
* name: "container-kill-fault",
|
|
143
|
-
* revision: "v1",
|
|
144
|
-
* isEnterprise: true,
|
|
145
|
-
* authEnabled: false,
|
|
146
129
|
* values: [
|
|
147
130
|
* {
|
|
148
131
|
* name: "TARGET_WORKLOAD_KIND",
|
|
@@ -157,29 +140,46 @@ const utilities = __importStar(require("../utilities"));
|
|
|
157
140
|
* value: "<+input>.default('30s')",
|
|
158
141
|
* },
|
|
159
142
|
* ],
|
|
143
|
+
* identity: "container-kill",
|
|
144
|
+
* name: "container-kill-fault",
|
|
145
|
+
* revision: "v1",
|
|
146
|
+
* isEnterprise: true,
|
|
147
|
+
* authEnabled: false,
|
|
160
148
|
* }],
|
|
161
149
|
* vertices: [
|
|
162
150
|
* {
|
|
163
|
-
* name: "action-vertex",
|
|
164
151
|
* start: {
|
|
165
152
|
* actions: [{
|
|
166
153
|
* name: "pre-chaos-notification",
|
|
167
154
|
* }],
|
|
168
155
|
* },
|
|
169
156
|
* end: {},
|
|
157
|
+
* name: "action-vertex",
|
|
170
158
|
* },
|
|
171
159
|
* {
|
|
172
|
-
* name: "fault-vertex",
|
|
173
160
|
* start: {
|
|
174
161
|
* faults: [{
|
|
175
162
|
* name: "container-kill-fault",
|
|
176
163
|
* }],
|
|
177
164
|
* },
|
|
178
165
|
* end: {},
|
|
166
|
+
* name: "fault-vertex",
|
|
179
167
|
* },
|
|
180
168
|
* ],
|
|
169
|
+
* infraType: "KubernetesV2",
|
|
181
170
|
* cleanupPolicy: "delete",
|
|
182
171
|
* },
|
|
172
|
+
* orgId: _this.id,
|
|
173
|
+
* projectId: thisHarnessPlatformProject.id,
|
|
174
|
+
* hubIdentity: projectLevel.identity,
|
|
175
|
+
* identity: "action-and-fault",
|
|
176
|
+
* name: "Action and Fault Experiment",
|
|
177
|
+
* description: "Experiment with action before fault",
|
|
178
|
+
* tags: [
|
|
179
|
+
* "kubernetes",
|
|
180
|
+
* "action",
|
|
181
|
+
* "fault",
|
|
182
|
+
* ],
|
|
183
183
|
* }, {
|
|
184
184
|
* dependsOn: [projectLevel],
|
|
185
185
|
* });
|
|
@@ -188,36 +188,23 @@ const utilities = __importStar(require("../utilities"));
|
|
|
188
188
|
* // ----------------------------------------------------------------------------
|
|
189
189
|
* // Complete template with actions, faults, and probes
|
|
190
190
|
* const complex = new harness.chaos.ExperimentTemplate("complex", {
|
|
191
|
-
* orgId: _this.id,
|
|
192
|
-
* projectId: thisHarnessPlatformProject.id,
|
|
193
|
-
* hubIdentity: projectLevel.identity,
|
|
194
|
-
* identity: "complex-experiment",
|
|
195
|
-
* name: "Complex Chaos Experiment",
|
|
196
|
-
* description: "Complete experiment with actions, faults, and probes",
|
|
197
|
-
* tags: [
|
|
198
|
-
* "kubernetes",
|
|
199
|
-
* "complex",
|
|
200
|
-
* "enterprise",
|
|
201
|
-
* ],
|
|
202
191
|
* spec: {
|
|
203
|
-
*
|
|
192
|
+
* statusCheckTimeouts: {
|
|
193
|
+
* delay: 5,
|
|
194
|
+
* timeout: 300,
|
|
195
|
+
* },
|
|
204
196
|
* actions: [{
|
|
205
|
-
* identity: "notification-action",
|
|
206
|
-
* name: "start-notification",
|
|
207
|
-
* isEnterprise: false,
|
|
208
|
-
* continueOnCompletion: false,
|
|
209
197
|
* values: [{
|
|
210
198
|
* name: "MESSAGE",
|
|
211
199
|
* value: "Chaos experiment started",
|
|
212
200
|
* }],
|
|
201
|
+
* identity: "notification-action",
|
|
202
|
+
* name: "start-notification",
|
|
203
|
+
* isEnterprise: false,
|
|
204
|
+
* continueOnCompletion: false,
|
|
213
205
|
* }],
|
|
214
206
|
* faults: [
|
|
215
207
|
* {
|
|
216
|
-
* identity: "pod-delete",
|
|
217
|
-
* name: "pod-delete-fault",
|
|
218
|
-
* revision: "v1",
|
|
219
|
-
* isEnterprise: true,
|
|
220
|
-
* authEnabled: false,
|
|
221
208
|
* values: [
|
|
222
209
|
* {
|
|
223
210
|
* name: "TARGET_WORKLOAD_KIND",
|
|
@@ -232,13 +219,13 @@ const utilities = __importStar(require("../utilities"));
|
|
|
232
219
|
* value: "<+input>.default('30s')",
|
|
233
220
|
* },
|
|
234
221
|
* ],
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
* identity: "pod-network-latency",
|
|
238
|
-
* name: "network-latency-fault",
|
|
222
|
+
* identity: "pod-delete",
|
|
223
|
+
* name: "pod-delete-fault",
|
|
239
224
|
* revision: "v1",
|
|
240
225
|
* isEnterprise: true,
|
|
241
226
|
* authEnabled: false,
|
|
227
|
+
* },
|
|
228
|
+
* {
|
|
242
229
|
* values: [
|
|
243
230
|
* {
|
|
244
231
|
* name: "TARGET_WORKLOAD_KIND",
|
|
@@ -253,17 +240,15 @@ const utilities = __importStar(require("../utilities"));
|
|
|
253
240
|
* value: "<+input>.default('2000')",
|
|
254
241
|
* },
|
|
255
242
|
* ],
|
|
243
|
+
* identity: "pod-network-latency",
|
|
244
|
+
* name: "network-latency-fault",
|
|
245
|
+
* revision: "v1",
|
|
246
|
+
* isEnterprise: true,
|
|
247
|
+
* authEnabled: false,
|
|
256
248
|
* },
|
|
257
249
|
* ],
|
|
258
250
|
* probes: [
|
|
259
251
|
* {
|
|
260
|
-
* identity: "pod-status-check",
|
|
261
|
-
* name: "pod-status-probe",
|
|
262
|
-
* revision: Number("v1"),
|
|
263
|
-
* isEnterprise: true,
|
|
264
|
-
* duration: "30",
|
|
265
|
-
* weightage: 10,
|
|
266
|
-
* enableDataCollection: false,
|
|
267
252
|
* conditionsV2: {
|
|
268
253
|
* operator: "AND",
|
|
269
254
|
* values: ["true"],
|
|
@@ -272,15 +257,15 @@ const utilities = __importStar(require("../utilities"));
|
|
|
272
257
|
* name: "TARGET_NAMESPACE",
|
|
273
258
|
* value: "<+input>",
|
|
274
259
|
* }],
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
* identity: "http-health-check",
|
|
278
|
-
* name: "http-health-probe",
|
|
260
|
+
* identity: "pod-status-check",
|
|
261
|
+
* name: "pod-status-probe",
|
|
279
262
|
* revision: Number("v1"),
|
|
280
263
|
* isEnterprise: true,
|
|
281
264
|
* duration: "30",
|
|
282
265
|
* weightage: 10,
|
|
283
266
|
* enableDataCollection: false,
|
|
267
|
+
* },
|
|
268
|
+
* {
|
|
284
269
|
* conditionsV2: {
|
|
285
270
|
* operator: "OR",
|
|
286
271
|
* values: [
|
|
@@ -292,20 +277,26 @@ const utilities = __importStar(require("../utilities"));
|
|
|
292
277
|
* name: "URL",
|
|
293
278
|
* value: "<+input>",
|
|
294
279
|
* }],
|
|
280
|
+
* identity: "http-health-check",
|
|
281
|
+
* name: "http-health-probe",
|
|
282
|
+
* revision: Number("v1"),
|
|
283
|
+
* isEnterprise: true,
|
|
284
|
+
* duration: "30",
|
|
285
|
+
* weightage: 10,
|
|
286
|
+
* enableDataCollection: false,
|
|
295
287
|
* },
|
|
296
288
|
* ],
|
|
297
289
|
* vertices: [
|
|
298
290
|
* {
|
|
299
|
-
* name: "action-stage",
|
|
300
291
|
* start: {
|
|
301
292
|
* actions: [{
|
|
302
293
|
* name: "start-notification",
|
|
303
294
|
* }],
|
|
304
295
|
* },
|
|
305
296
|
* end: {},
|
|
297
|
+
* name: "action-stage",
|
|
306
298
|
* },
|
|
307
299
|
* {
|
|
308
|
-
* name: "fault-stage",
|
|
309
300
|
* start: {
|
|
310
301
|
* faults: [
|
|
311
302
|
* {
|
|
@@ -325,19 +316,28 @@ const utilities = __importStar(require("../utilities"));
|
|
|
325
316
|
* ],
|
|
326
317
|
* },
|
|
327
318
|
* end: {},
|
|
319
|
+
* name: "fault-stage",
|
|
328
320
|
* },
|
|
329
321
|
* {
|
|
330
|
-
* name: "cleanup-stage",
|
|
331
322
|
* start: {},
|
|
332
323
|
* end: {},
|
|
324
|
+
* name: "cleanup-stage",
|
|
333
325
|
* },
|
|
334
326
|
* ],
|
|
327
|
+
* infraType: "KubernetesV2",
|
|
335
328
|
* cleanupPolicy: "delete",
|
|
336
|
-
* statusCheckTimeouts: {
|
|
337
|
-
* delay: 5,
|
|
338
|
-
* timeout: 300,
|
|
339
|
-
* },
|
|
340
329
|
* },
|
|
330
|
+
* orgId: _this.id,
|
|
331
|
+
* projectId: thisHarnessPlatformProject.id,
|
|
332
|
+
* hubIdentity: projectLevel.identity,
|
|
333
|
+
* identity: "complex-experiment",
|
|
334
|
+
* name: "Complex Chaos Experiment",
|
|
335
|
+
* description: "Complete experiment with actions, faults, and probes",
|
|
336
|
+
* tags: [
|
|
337
|
+
* "kubernetes",
|
|
338
|
+
* "complex",
|
|
339
|
+
* "enterprise",
|
|
340
|
+
* ],
|
|
341
341
|
* }, {
|
|
342
342
|
* dependsOn: [projectLevel],
|
|
343
343
|
* });
|
package/chaos/faultTemplate.d.ts
CHANGED
|
@@ -42,46 +42,9 @@ import * as outputs from "../types/output";
|
|
|
42
42
|
* // ----------------------------------------------------------------------------
|
|
43
43
|
* // Most common pattern: Custom Kubernetes fault with container spec
|
|
44
44
|
* const kubernetesFault = new harness.chaos.FaultTemplate("kubernetes_fault", {
|
|
45
|
-
* orgId: _this.id,
|
|
46
|
-
* projectId: thisHarnessPlatformProject.id,
|
|
47
|
-
* hubIdentity: projectLevel.identity,
|
|
48
|
-
* identity: "k8s-fault-template",
|
|
49
|
-
* name: "Kubernetes Fault Template",
|
|
50
|
-
* description: "Custom Kubernetes fault for chaos injection",
|
|
51
|
-
* categories: ["Kubernetes"],
|
|
52
|
-
* infrastructures: ["KubernetesV2"],
|
|
53
|
-
* type: "Custom",
|
|
54
|
-
* permissionsRequired: "Basic",
|
|
55
|
-
* tags: [
|
|
56
|
-
* "kubernetes",
|
|
57
|
-
* "fault",
|
|
58
|
-
* "custom",
|
|
59
|
-
* ],
|
|
60
|
-
* links: [{
|
|
61
|
-
* name: "Documentation",
|
|
62
|
-
* url: "https://docs.harness.io/chaos",
|
|
63
|
-
* }],
|
|
64
45
|
* spec: {
|
|
65
46
|
* chaos: {
|
|
66
|
-
* faultName: "byoc-injector",
|
|
67
|
-
* params: [
|
|
68
|
-
* {
|
|
69
|
-
* name: "CHAOS_DURATION",
|
|
70
|
-
* value: "30s",
|
|
71
|
-
* },
|
|
72
|
-
* {
|
|
73
|
-
* name: "CHAOS_INTERVAL",
|
|
74
|
-
* value: "5s",
|
|
75
|
-
* },
|
|
76
|
-
* ],
|
|
77
47
|
* kubernetes: {
|
|
78
|
-
* image: "chaosnative/go-runner:ci",
|
|
79
|
-
* commands: [
|
|
80
|
-
* "/bin/bash",
|
|
81
|
-
* "-c",
|
|
82
|
-
* ],
|
|
83
|
-
* args: ["echo 'Running chaos fault'; sleep 30"],
|
|
84
|
-
* imagePullPolicy: "IfNotPresent",
|
|
85
48
|
* resources: {
|
|
86
49
|
* limits: {
|
|
87
50
|
* cpu: "150m",
|
|
@@ -92,39 +55,81 @@ import * as outputs from "../types/output";
|
|
|
92
55
|
* memory: "100Mi",
|
|
93
56
|
* },
|
|
94
57
|
* },
|
|
58
|
+
* image: "chaosnative/go-runner:ci",
|
|
59
|
+
* commands: [
|
|
60
|
+
* "/bin/bash",
|
|
61
|
+
* "-c",
|
|
62
|
+
* ],
|
|
63
|
+
* args: ["echo 'Running chaos fault'; sleep 30"],
|
|
64
|
+
* imagePullPolicy: "IfNotPresent",
|
|
95
65
|
* },
|
|
66
|
+
* params: [
|
|
67
|
+
* {
|
|
68
|
+
* name: "CHAOS_DURATION",
|
|
69
|
+
* value: "30s",
|
|
70
|
+
* },
|
|
71
|
+
* {
|
|
72
|
+
* name: "CHAOS_INTERVAL",
|
|
73
|
+
* value: "5s",
|
|
74
|
+
* },
|
|
75
|
+
* ],
|
|
76
|
+
* faultName: "byoc-injector",
|
|
96
77
|
* },
|
|
97
78
|
* },
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* // Example 2: Fault with Environment Variables (TESTED ✅)
|
|
103
|
-
* // ----------------------------------------------------------------------------
|
|
104
|
-
* // Fault with environment variables for configuration
|
|
105
|
-
* const faultWithEnv = new harness.chaos.FaultTemplate("fault_with_env", {
|
|
79
|
+
* links: [{
|
|
80
|
+
* name: "Documentation",
|
|
81
|
+
* url: "https://docs.harness.io/chaos",
|
|
82
|
+
* }],
|
|
106
83
|
* orgId: _this.id,
|
|
107
84
|
* projectId: thisHarnessPlatformProject.id,
|
|
108
85
|
* hubIdentity: projectLevel.identity,
|
|
109
|
-
* identity: "fault-
|
|
110
|
-
* name: "Fault
|
|
111
|
-
* description: "
|
|
86
|
+
* identity: "k8s-fault-template",
|
|
87
|
+
* name: "Kubernetes Fault Template",
|
|
88
|
+
* description: "Custom Kubernetes fault for chaos injection",
|
|
112
89
|
* categories: ["Kubernetes"],
|
|
113
90
|
* infrastructures: ["KubernetesV2"],
|
|
114
91
|
* type: "Custom",
|
|
115
92
|
* permissionsRequired: "Basic",
|
|
116
93
|
* tags: [
|
|
117
94
|
* "kubernetes",
|
|
118
|
-
* "
|
|
119
|
-
* "
|
|
95
|
+
* "fault",
|
|
96
|
+
* "custom",
|
|
120
97
|
* ],
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
98
|
+
* }, {
|
|
99
|
+
* dependsOn: [projectLevel],
|
|
100
|
+
* });
|
|
101
|
+
* // ----------------------------------------------------------------------------
|
|
102
|
+
* // Example 2: Fault with Environment Variables (TESTED ✅)
|
|
103
|
+
* // ----------------------------------------------------------------------------
|
|
104
|
+
* // Fault with environment variables for configuration
|
|
105
|
+
* const faultWithEnv = new harness.chaos.FaultTemplate("fault_with_env", {
|
|
125
106
|
* spec: {
|
|
126
107
|
* chaos: {
|
|
127
|
-
*
|
|
108
|
+
* kubernetes: {
|
|
109
|
+
* resources: {
|
|
110
|
+
* limits: {
|
|
111
|
+
* cpu: "200m",
|
|
112
|
+
* memory: "200Mi",
|
|
113
|
+
* },
|
|
114
|
+
* },
|
|
115
|
+
* envs: [
|
|
116
|
+
* {
|
|
117
|
+
* name: "TARGET_NAMESPACE",
|
|
118
|
+
* value: "<+input>.default('default')",
|
|
119
|
+
* },
|
|
120
|
+
* {
|
|
121
|
+
* name: "CHAOS_MODE",
|
|
122
|
+
* value: "pod",
|
|
123
|
+
* },
|
|
124
|
+
* ],
|
|
125
|
+
* image: "chaosnative/go-runner:ci",
|
|
126
|
+
* commands: [
|
|
127
|
+
* "/bin/bash",
|
|
128
|
+
* "-c",
|
|
129
|
+
* ],
|
|
130
|
+
* args: ["echo 'Fault with env vars'; sleep 15"],
|
|
131
|
+
* imagePullPolicy: "IfNotPresent",
|
|
132
|
+
* },
|
|
128
133
|
* params: [
|
|
129
134
|
* {
|
|
130
135
|
* name: "CHAOS_DURATION",
|
|
@@ -139,33 +144,13 @@ import * as outputs from "../types/output";
|
|
|
139
144
|
* value: "<+input>.default('default')",
|
|
140
145
|
* },
|
|
141
146
|
* ],
|
|
142
|
-
*
|
|
143
|
-
* image: "chaosnative/go-runner:ci",
|
|
144
|
-
* commands: [
|
|
145
|
-
* "/bin/bash",
|
|
146
|
-
* "-c",
|
|
147
|
-
* ],
|
|
148
|
-
* args: ["echo 'Fault with env vars'; sleep 15"],
|
|
149
|
-
* imagePullPolicy: "IfNotPresent",
|
|
150
|
-
* envs: [
|
|
151
|
-
* {
|
|
152
|
-
* name: "TARGET_NAMESPACE",
|
|
153
|
-
* value: "<+input>.default('default')",
|
|
154
|
-
* },
|
|
155
|
-
* {
|
|
156
|
-
* name: "CHAOS_MODE",
|
|
157
|
-
* value: "pod",
|
|
158
|
-
* },
|
|
159
|
-
* ],
|
|
160
|
-
* resources: {
|
|
161
|
-
* limits: {
|
|
162
|
-
* cpu: "200m",
|
|
163
|
-
* memory: "200Mi",
|
|
164
|
-
* },
|
|
165
|
-
* },
|
|
166
|
-
* },
|
|
147
|
+
* faultName: "byoc-injector",
|
|
167
148
|
* },
|
|
168
149
|
* },
|
|
150
|
+
* links: [{
|
|
151
|
+
* name: "Documentation",
|
|
152
|
+
* url: "https://docs.harness.io/chaos",
|
|
153
|
+
* }],
|
|
169
154
|
* variables: [{
|
|
170
155
|
* name: "target_namespace",
|
|
171
156
|
* value: "<+input>",
|
|
@@ -173,53 +158,42 @@ import * as outputs from "../types/output";
|
|
|
173
158
|
* required: false,
|
|
174
159
|
* description: "Target namespace for chaos injection",
|
|
175
160
|
* }],
|
|
176
|
-
* }, {
|
|
177
|
-
* dependsOn: [projectLevel],
|
|
178
|
-
* });
|
|
179
|
-
* // ----------------------------------------------------------------------------
|
|
180
|
-
* // Example 3: Fault with Advanced Configuration (TESTED ✅)
|
|
181
|
-
* // ----------------------------------------------------------------------------
|
|
182
|
-
* // Fault with node selector, labels, and annotations
|
|
183
|
-
* const advancedFault = new harness.chaos.FaultTemplate("advanced_fault", {
|
|
184
161
|
* orgId: _this.id,
|
|
185
162
|
* projectId: thisHarnessPlatformProject.id,
|
|
186
163
|
* hubIdentity: projectLevel.identity,
|
|
187
|
-
* identity: "
|
|
188
|
-
* name: "
|
|
189
|
-
* description: "Fault with
|
|
164
|
+
* identity: "fault-with-env-template",
|
|
165
|
+
* name: "Fault with Environment Variables",
|
|
166
|
+
* description: "Fault template with environment configuration",
|
|
190
167
|
* categories: ["Kubernetes"],
|
|
191
168
|
* infrastructures: ["KubernetesV2"],
|
|
192
169
|
* type: "Custom",
|
|
193
170
|
* permissionsRequired: "Basic",
|
|
194
171
|
* tags: [
|
|
195
172
|
* "kubernetes",
|
|
196
|
-
* "
|
|
197
|
-
* "
|
|
198
|
-
* ],
|
|
199
|
-
* links: [
|
|
200
|
-
* {
|
|
201
|
-
* name: "Documentation",
|
|
202
|
-
* url: "https://docs.harness.io/chaos",
|
|
203
|
-
* },
|
|
204
|
-
* {
|
|
205
|
-
* name: "Support",
|
|
206
|
-
* url: "https://support.harness.io",
|
|
207
|
-
* },
|
|
173
|
+
* "env",
|
|
174
|
+
* "config",
|
|
208
175
|
* ],
|
|
176
|
+
* }, {
|
|
177
|
+
* dependsOn: [projectLevel],
|
|
178
|
+
* });
|
|
179
|
+
* // ----------------------------------------------------------------------------
|
|
180
|
+
* // Example 3: Fault with Advanced Configuration (TESTED ✅)
|
|
181
|
+
* // ----------------------------------------------------------------------------
|
|
182
|
+
* // Fault with node selector, labels, and annotations
|
|
183
|
+
* const advancedFault = new harness.chaos.FaultTemplate("advanced_fault", {
|
|
209
184
|
* spec: {
|
|
210
185
|
* chaos: {
|
|
211
|
-
* faultName: "byoc-injector",
|
|
212
|
-
* params: [
|
|
213
|
-
* {
|
|
214
|
-
* name: "CHAOS_DURATION",
|
|
215
|
-
* value: "<+input>.default('30s')",
|
|
216
|
-
* },
|
|
217
|
-
* {
|
|
218
|
-
* name: "CHAOS_INTERVAL",
|
|
219
|
-
* value: "<+input>.default('5s')",
|
|
220
|
-
* },
|
|
221
|
-
* ],
|
|
222
186
|
* kubernetes: {
|
|
187
|
+
* resources: {
|
|
188
|
+
* limits: {
|
|
189
|
+
* cpu: "250m",
|
|
190
|
+
* memory: "256Mi",
|
|
191
|
+
* },
|
|
192
|
+
* requests: {
|
|
193
|
+
* cpu: "125m",
|
|
194
|
+
* memory: "128Mi",
|
|
195
|
+
* },
|
|
196
|
+
* },
|
|
223
197
|
* image: "chaosnative/go-runner:ci",
|
|
224
198
|
* commands: [
|
|
225
199
|
* "/bin/bash",
|
|
@@ -240,19 +214,30 @@ import * as outputs from "../types/output";
|
|
|
240
214
|
* description: "Advanced chaos fault",
|
|
241
215
|
* owner: "chaos-team",
|
|
242
216
|
* },
|
|
243
|
-
* resources: {
|
|
244
|
-
* limits: {
|
|
245
|
-
* cpu: "250m",
|
|
246
|
-
* memory: "256Mi",
|
|
247
|
-
* },
|
|
248
|
-
* requests: {
|
|
249
|
-
* cpu: "125m",
|
|
250
|
-
* memory: "128Mi",
|
|
251
|
-
* },
|
|
252
|
-
* },
|
|
253
217
|
* },
|
|
218
|
+
* params: [
|
|
219
|
+
* {
|
|
220
|
+
* name: "CHAOS_DURATION",
|
|
221
|
+
* value: "<+input>.default('30s')",
|
|
222
|
+
* },
|
|
223
|
+
* {
|
|
224
|
+
* name: "CHAOS_INTERVAL",
|
|
225
|
+
* value: "<+input>.default('5s')",
|
|
226
|
+
* },
|
|
227
|
+
* ],
|
|
228
|
+
* faultName: "byoc-injector",
|
|
254
229
|
* },
|
|
255
230
|
* },
|
|
231
|
+
* links: [
|
|
232
|
+
* {
|
|
233
|
+
* name: "Documentation",
|
|
234
|
+
* url: "https://docs.harness.io/chaos",
|
|
235
|
+
* },
|
|
236
|
+
* {
|
|
237
|
+
* name: "Support",
|
|
238
|
+
* url: "https://support.harness.io",
|
|
239
|
+
* },
|
|
240
|
+
* ],
|
|
256
241
|
* variables: [
|
|
257
242
|
* {
|
|
258
243
|
* name: "chaos_duration",
|
|
@@ -269,6 +254,21 @@ import * as outputs from "../types/output";
|
|
|
269
254
|
* description: "Interval between chaos injections",
|
|
270
255
|
* },
|
|
271
256
|
* ],
|
|
257
|
+
* orgId: _this.id,
|
|
258
|
+
* projectId: thisHarnessPlatformProject.id,
|
|
259
|
+
* hubIdentity: projectLevel.identity,
|
|
260
|
+
* identity: "advanced-fault-template",
|
|
261
|
+
* name: "Advanced Fault Template",
|
|
262
|
+
* description: "Fault with advanced Kubernetes configuration",
|
|
263
|
+
* categories: ["Kubernetes"],
|
|
264
|
+
* infrastructures: ["KubernetesV2"],
|
|
265
|
+
* type: "Custom",
|
|
266
|
+
* permissionsRequired: "Basic",
|
|
267
|
+
* tags: [
|
|
268
|
+
* "kubernetes",
|
|
269
|
+
* "advanced",
|
|
270
|
+
* "production",
|
|
271
|
+
* ],
|
|
272
272
|
* }, {
|
|
273
273
|
* dependsOn: [projectLevel],
|
|
274
274
|
* });
|