Retrieve Stack Instance Outputs
Retrieve the outputs a StackTemplate publishes for a StackInstance. Reading this subresource requires separate get permission on stackinstances/outputs. See Stack permissions and What are Stacks for the output-capture concept.
StackInstanceOutputs example​
An example StackInstanceOutputs:
apiVersion: management.loft.sh/v1
kind: StackInstanceOutputs
metadata:
name: example-platform
namespace: p-my-project
outputs:
- name: databaseAddress
sensitive: false
state: Available
task: database
value: 10.0.0.12
StackInstanceOutputs reference​
outputs object[] ​
Outputs are the stack's published outputs, in the order publishedOutputs declares
them. Task outputs the stack does not publish are not listed here.
outputs object[] ​name required string ​
Name is the public name the stack publishes the value under.
name required string ​task required string ​
Task is the task that produced the value.
task required string ​sensitive required boolean ​
Sensitive reflects the output's declared source type, not its content: a value read via
fromSecret is sensitive, one read via fromResource is not. To have a value treated as
sensitive, read it from a Secret via fromSecret. Always serialized.
sensitive required boolean ​state required string ​
State reports whether the value can be read yet.
state required string ​reason string ​
Reason is the cause of the state in one word. An Available output carries one only when its
task failed after the value was captured, meaning the value served is the last good one.
reason string ​message string ​
Message explains the reason in words. It names the task, the output or the failure behind it.
message string ​value string ​
Value is the captured value. It is set when State is Available, including when the
captured value is an empty string.
value string ​StackInstanceOutputs (Get)​
Retrieve the published outputs of a StackInstance. Values captured from Secrets are marked sensitive.
- kubectl
- curl
Run the following command:
# Exchange example-platform in the url below with the name of the StackInstance
kubectl get --raw "/kubernetes/management/apis/management.loft.sh/v1/namespaces/p-my-project/stackinstances/example-platform/outputs"
Run the following curl command:
# Exchange example-platform in the url below with the name of the StackInstance
curl -s -X GET --insecure \
"https://$LOFT_DOMAIN/kubernetes/management/apis/management.loft.sh/v1/namespaces/p-my-project/stackinstances/example-platform/outputs" \
-H "Authorization: Bearer $ACCESS_KEY"