operator-registry
operator-registry copied to clipboard
initializer fails to load multi-document YAML manifests
Tested with quay.io/operator-framework/upstream-registry-builder:v1.6.1
with this:
FROM quay.io/operator-framework/upstream-registry-builder:v1.6.1 as builder
COPY upstream-community-operators manifests
RUN ./bin/initializer --permissive true -o ./bundles.db
This fails with:
time="2020-03-19T18:35:25Z" level=warning msg="permissive mode enabled" error="error loading manifests from directory: error checking provided apis in bundle : couldn't find monitoring.coreos.com/v1/PrometheusRule (prometheusrules) in bundle. found: map[]"
The culprit seems to be trailing whitespace and the multi-document split anchor: https://github.com/operator-framework/community-operators/blob/527c747c6b67cb376e088cf9a550b9a2e76aba4f/upstream-community-operators/prometheus/0.37.0/prometheuses.monitoring.coreos.com.crd.yaml#L1-L2
@awgreene FYI
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@awgreene @dinhxuanvu I think we should take a look at this. Concatenated YAML manifests are not rare.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Just want to bump this again, because using controller-gen
is generating CRDs with ---
at the start of the file.
Example Command
controller-gen crd:crdVersions=v1 \
rbac:roleName=addon-operator-manager \
paths="./..." \
output:crd:artifacts:config=config/deploy