The tekton-pipelines package failed to reconcile when upgrading to TAP (Tanzu Application Platform) 1.12.1 and below error message were observed when describing the failed PackageInstall:
Name: tekton-pipelines
Namespace: tap-install
......
Status:
Conditions:
Message: Error (see .status.usefulErrorMessage for details)
Status: True
Type: ReconcileFailed
Friendly Description: Reconcile failed: Error (see .status.usefulErrorMessage for details)
Last Attempted Version: 0.56.7+tanzu.1
Observed Generation: 7
Useful Error Message: kapp: Error: update customresourcedefinition/clustertasks.tekton.dev (apiextensions.k8s.io/v1) cluster:
Updating resource customresourcedefinition/clustertasks.tekton.dev (apiextensions.k8s.io/v1) cluster:
API server says:
CustomResourceDefinition.apiextensions.k8s.io "clustertasks.tekton.dev" is invalid:
- spec.conversion.strategy: Required value
- spec.conversion.webhookClientConfig: Forbidden: should not be set when strategy is not set to Webhook
(reason: Invalid)
Version: 0.56.7+tanzu.1
Events: <none>
This is a known issue and can be fixed by applying the below overlay:
# Overlay secret for setting the missing values in ClusterTask CRD
cat << EOF | kubectl apply --validate=false -f -
---
apiVersion: v1
kind: Secret
metadata:
name: tekton-ct-crd-conversion-overlay
namespace: tap-install
stringData:
add-ns-label.yml: |
apiVersion: kapp.k14s.io/v1alpha1
kind: Config
rebaseRules:
- path: [spec, conversion]
type: remove
sources: [existing]
resourceMatchers:
- kindNamespaceNameMatcher: {kind: CustomResourceDefinition, namespace: "", name: clustertasks.tekton.dev}
EOF
# Update TAP Values file to add that overlay to Tekton Package
package_overlays:
- name: tekton-pipelines
secrets:
- name: tekton-ct-crd-conversion-overlay