Skip to content

Fix The CustomResourceDefinition Installation Error #902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 11, 2023
Merged

Conversation

xqi-nr
Copy link
Contributor

@xqi-nr xqi-nr commented Apr 7, 2023

Description

Customers recently got the following errors after March 24th.

execution failed for kubernetes-open-source-integration: exit status 1: The CustomResourceDefinition "clusterserviceversions.operators.coreos.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

Code changes

We think the issue is same as this issue and follow the fix to make this PR.

Tests

Test 2>&1 >/dev/null only keeping stderr in ERROR

xqi@TFXCKKXMP9 Chapter09 % ERROR=$(k create -f gs-ping-deployment.yaml 2>&1 >/dev/null)
xqi@TFXCKKXMP9 Chapter09 % echo $ERROR                                                 

xqi@TFXCKKXMP9 Chapter09 % ERROR=$(k create -f gs-ping-deployment.yaml 2>&1 >/dev/null)
xqi@TFXCKKXMP9 Chapter09 % echo $ERROR                                                 
Error from server (AlreadyExists): error when creating "gs-ping-deployment.yaml": deployments.apps "gs-ping" already exists
xqi@TFXCKKXMP9 Chapter09 % 

bpschmitt
bpschmitt previously approved these changes Apr 7, 2023
Copy link
Contributor

@bpschmitt bpschmitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 661 to 662
$SUDO $KUBECTL create -f https://raw.githubusercontent.com/pixie-io/pixie/main/k8s/operator/helm/crds/olm_crd.yaml 2>/dev/null
$SUDO $KUBECTL create -f https://raw.githubusercontent.com/pixie-io/pixie/main/k8s/operator/crd/base/px.dev_viziers.yaml 2>/dev/null
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this command still returns an exit code of 1. can you double check that the install script ignores the exit status and continues to run?

additionally you might want to consider using a released version here such as https://raw.githubusercontent.com/pixie-io/pixie/release/operator/v0.1.0/k8s/operator/helm/crds/olm_crd.yaml
instead of using main

Copy link
Contributor Author

@xqi-nr xqi-nr Apr 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only keeping stderr with 2>&1 >/dev/null; if the error includes any other than AlreadyExist, exit the script

@xqi-nr xqi-nr requested a review from vihangm April 7, 2023 22:38
@vihangm
Copy link

vihangm commented Apr 11, 2023

We need to make sure that the versions are updated here when the charts are too. Can you please add an item to the release checklist to make sure someone updates this script when updating the version in the nri-bundle?

@xqi-nr
Copy link
Contributor Author

xqi-nr commented Apr 11, 2023

We need to make sure that the versions are updated here when the charts are too. Can you please add an item to the release checklist to make sure someone updates this script when updating the version in the nri-bundle?

Created this PR, Is there a place specific for the release checklist?
https://github.com/newrelic/helm-charts/pull/1061/files

@rthorn-nr rthorn-nr merged commit 1052f8c into main Apr 11, 2023
@rthorn-nr rthorn-nr deleted the fix_crd_error branch April 11, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants