Skip to content

ptp-operator: Deploy fails with spec.conversion.conversionReviewVersions required errors #129

@s-pravin

Description

@s-pravin

Steps to reproduce:

  • Cloned repo
  • Enabled webhook and certmanager sections in config/crd/kustomization.yaml as per comments in config/default/kustomization.yaml
patchesStrategicMerge:
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
# patches here are for enabling the conversion webhook for each CRD
- patches/webhook_in_ptpconfigs.yaml
- patches/webhook_in_nodeptpdevices.yaml
- patches/webhook_in_ptpoperatorconfigs.yaml
#+kubebuilder:scaffold:crdkustomizewebhookpatch

# [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix.
# patches here are for enabling the CA injection for each CRD
- patches/cainjection_in_ptpconfigs.yaml
- patches/cainjection_in_nodeptpdevices.yaml
- patches/cainjection_in_ptpoperatorconfigs.yaml
#+kubebuilder:scaffold:crdkustomizecainjectionpatch
  • make deploy fails with following errors:
$ make deploy
/home/pravins/vanilla-k8s/ptp-operator/bin/controller-gen crd rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
test -s /home/pravins/vanilla-k8s/ptp-operator/bin/kustomize || { curl -Ss "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s -- 4.5.7 /home/pravins/vanilla-k8s/ptp-operator/bin; }
cd config/manager && /home/pravins/vanilla-k8s/ptp-operator/bin/kustomize edit set image controller=ghcr.io/k8snetworkplumbingwg/ptp-operator:4.21
/home/pravins/vanilla-k8s/ptp-operator/bin/kustomize build config/default | kubectl apply -f -
namespace/openshift-ptp created
customresourcedefinition.apiextensions.k8s.io/hardwareconfigs.ptp.openshift.io created
serviceaccount/ptp-operator created
role.rbac.authorization.k8s.io/leader-election-role created
clusterrole.rbac.authorization.k8s.io/manager-role created
rolebinding.rbac.authorization.k8s.io/leader-election-rolebinding created
clusterrolebinding.rbac.authorization.k8s.io/manager-rolebinding created
configmap/manager-config created
service/webhook-service created
Warning: spec.template.spec.nodeSelector[node-role.kubernetes.io/master]: use "node-role.kubernetes.io/control-plane" instead
deployment.apps/ptp-operator created
certificate.cert-manager.io/serving-cert created
issuer.cert-manager.io/selfsigned-issuer created
validatingwebhookconfiguration.admissionregistration.k8s.io/ptpconfig-validating-webhook-configuration created
resource mapping not found for name: "controller-manager-metrics-monitor" namespace: "openshift-ptp" from "STDIN": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
ensure CRDs are installed first
Error from server (Invalid): error when creating "STDIN": CustomResourceDefinition.apiextensions.k8s.io "nodeptpdevices.ptp.openshift.io" is invalid: spec.conversion.conversionReviewVersions: Required value
Error from server (Invalid): error when creating "STDIN": CustomResourceDefinition.apiextensions.k8s.io "ptpconfigs.ptp.openshift.io" is invalid: spec.conversion.conversionReviewVersions: Required value
Error from server (Invalid): error when creating "STDIN": CustomResourceDefinition.apiextensions.k8s.io "ptpoperatorconfigs.ptp.openshift.io" is invalid: spec.conversion.conversionReviewVersions: Required value

Please help understand if I have missed to modify something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions