This topic gives you reference information about the Workload
resource for Tanzu Supply Chain.
CautionTanzu Supply Chain is currently in beta and is not intended for production use. It is intended only for evaluation purposes for the next generation Supply Chain. For the current Supply Chain solution, see the Supply Chain Choreographer documentation.
Workload
resources are custom resource definitions (CRDs) created by SupplyChain
resources. They are also one of the two duck type resources in Tanzu Supply Chain.
Every Workload
resource is defined as a CustomResourceDefinition
:
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Workload
resources always have the following labels. The chain-name
and chain-namespace
labels reference the location of the SupplyChain
resource that created this Workload
. The chain-role
identifies this as a Workload. The other possible value is workload-run
.
metadata:
labels:
supply-chain.apps.tanzu.vmware.com/chain-name: apps.example.com-1.0.0
supply-chain.apps.tanzu.vmware.com/chain-namespace: app-sc
supply-chain.apps.tanzu.vmware.com/chain-role: workload
The name of the resource is always in the form <plural>.<group>
from the Supply Chain Defines API.
metadata:
name: appv1s.widget.com
The CRD group
, names
, and versions
are filled with the details found in the Supply Chain Defines API.
Additionally, the spec.names[].categories[]
array includes a category of all-workloads
. This ensures that commands such as kubectl get all-workloads
find all the SupplyChain
-defined Workload
resources a user can access.
spec:
conversion:
strategy: None
group: example.com
names:
categories:
- all-workloads
kind: AppV1
listKind: AppV1List
plural: appv1s
singular: appv1
scope: Namespaced
versions:
name: v1alpha1
schema:
openAPIV3Schema:
...
Workload
resources always have the following labels. These labels reference the location of the SupplyChain
resource on cluster.
metadata:
labels:
supply-chain.apps.tanzu.vmware.com/chain-name: apps.example.com-1.0.0
supply-chain.apps.tanzu.vmware.com/chain-namespace: app-sc
The spec
of a Workload
resource is dynamic, however it is immutable after it is applied. The spec
is derived by combining the Component configurations of all the SupplyChain Stages.