-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turns out we already plumb target from Stack → Update → Agent → Auto API. This adds a small E2E test around the behavior.
- Loading branch information
Showing
3 changed files
with
90 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: targets | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: state | ||
namespace: targets | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 100Mi | ||
--- | ||
apiVersion: pulumi.com/v1 | ||
kind: Program | ||
metadata: | ||
name: targets | ||
namespace: targets | ||
program: | ||
resources: | ||
notTargeted: | ||
type: random:RandomInteger | ||
properties: | ||
min: 1 | ||
max: 100 | ||
targeted: | ||
type: random:RandomInteger | ||
properties: | ||
min: 1 | ||
max: 100 | ||
outputs: | ||
targeted: ${targeted.result} | ||
notTargeted: ${notTargeted.result} # Should be absent | ||
--- | ||
apiVersion: pulumi.com/v1 | ||
kind: Stack | ||
metadata: | ||
name: targets | ||
namespace: targets | ||
spec: | ||
stack: dev | ||
programRef: | ||
name: targets | ||
targets: | ||
- urn:pulumi:dev::targets::random:index/randomInteger:RandomInteger::targeted | ||
|
||
# Enable file state for testing. | ||
envRefs: | ||
PULUMI_BACKEND_URL: | ||
type: Literal | ||
literal: | ||
value: "file:///state/" | ||
PULUMI_CONFIG_PASSPHRASE: | ||
type: Literal | ||
literal: | ||
value: "test" | ||
workspaceTemplate: | ||
spec: | ||
podTemplate: | ||
spec: | ||
containers: | ||
- name: pulumi | ||
volumeMounts: | ||
- name: state | ||
mountPath: /state | ||
volumes: | ||
- name: state | ||
persistentVolumeClaim: | ||
claimName: state |