The pod convention context status type is used to represent the current status of the context retrieved by the request, and holds the applied conventions by the server ase well as the modified version of the PodTemplateSpec. The field .template is populated with the enriched PodTemplateSpec. The field .appliedConventions is populated with the names of any applied conventions.

{
    "template": {
        "metadata": {
            ...
        },
        "spec": {
            ...
        }
    },
    "appliedConventions": [
        "convention-1",
        "convention-2",
        "convention-4"
    ]
}

yaml version:

---
apiVersion: webhooks.conventions.apps.tanzu.vmware.com/v1alpha1
kind: PodConventionContext
metadata:
  name: sample # the name of the ClusterPodConvention
spec: # the request
  imageConfig:
  template:
    <corev1.PodTemplateSpec>
status: # the response
  appliedConventions: # list of names of conventions applied
  - my-convention
  template:
  spec:
      containers:
      - name : workload
        image: helloworld-go-mod
check-circle-line exclamation-circle-line close-line
Scroll to top icon