Skip to content

Conversation

@shivakunv
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Sep 6, 2025

Pull Request Test Coverage Report for Build 17512924608

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 13.121%

Totals Coverage Status
Change from base Build 17148802459: 0.0%
Covered Lines: 272
Relevant Lines: 2073

💛 - Coveralls

@shivakunv shivakunv force-pushed the defaultcalicoexistingerror branch from 3f83be8 to 74ecf48 Compare September 6, 2025 09:38
@shivakunv shivakunv marked this pull request as ready for review September 6, 2025 09:38
@shivakunv shivakunv changed the title Fix default exist error for tigera and custom-resource Fix default namespace installation error for tigera and custom-resource Sep 8, 2025
@ArangoGutierrez
Copy link
Collaborator

/ok to test 74ecf48

@ArangoGutierrez ArangoGutierrez merged commit c519bb3 into main Sep 8, 2025
19 checks passed
@tariq1890 tariq1890 deleted the defaultcalicoexistingerror branch September 8, 2025 15:56
# based on https://docs.tigera.io/calico/latest/getting-started/kubernetes/quickstart
echo "Installing Calico ${CALICO_VERSION}..."
with_retry 3 10s kubectl --kubeconfig $KUBECONFIG create -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/tigera-operator.yaml
with_retry 3 10s kubectl get installation default -n tigera-operator || kubectl --kubeconfig $KUBECONFIG create -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/tigera-operator.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. The kubectl calls should be consistent. Here you have one kubectl call using the --kubeconfig and the other without the flag
  2. Moreover, the kubectl get installation call seems unnecessary here. The creation of the installation custom resource does not happen until L138, so this change should be reverted. It is unncessary here

# Install Calico custom resources
echo "Installing Calico custom resources..."
with_retry 3 10s kubectl --kubeconfig $KUBECONFIG create -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/custom-resources.yaml
with_retry 3 10s kubectl get installation default -n tigera-operator || kubectl --kubeconfig $KUBECONFIG create -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/custom-resources.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. The kubectl calls should be consistent. Here you have one kubectl call using the --kubeconfig and the other without the flag

  2. Also, it is always better to use the FQDN of a custom resource when referencing it in automation scripts

Suggested change
with_retry 3 10s kubectl get installation default -n tigera-operator || kubectl --kubeconfig $KUBECONFIG create -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/custom-resources.yaml
with_retry 3 10s kubectl get installations.operator.tigera.io default -n tigera-operator || kubectl --kubeconfig $KUBECONFIG create -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/custom-resources.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

opened new PR and testing @tariq1890 @ArangoGutierrez
#499

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.

5 participants