RuntimeError when trying to install Calico via YAML
See original GitHub issueHello!
- Vote on this issue by adding a š reaction
- To contribute a fix for this issue, leave a comment (and link to your pull request, if youāve opened one already)
Issue details
Trying to install Calico CNI with Pulumi via YAML files fails with:
RuntimeError: Set changed size during iteration
Steps to reproduce
- Create a Python Pulumi program, trying to install Calico as instructed here: https://projectcalico.docs.tigera.io/getting-started/kubernetes/k3s/multi-node-install
"""A Kubernetes Python Pulumi program"""
import pulumi
from pulumi import ResourceOptions, Output
from pulumi_kubernetes.yaml import ConfigFile
calico_operator = ConfigFile(
"calico-operator",
file="https://projectcalico.docs.tigera.io/manifests/tigera-operator.yaml",
)
calico = ConfigFile(
"calico",
file="https://projectcalico.docs.tigera.io/manifests/custom-resources.yaml",
opts=pulumi.ResourceOptions(depends_on=calico_operator)
)
- Run
pulumi preview
- Watch the world burn, no really just Pulumi crashing š¦
Expected: Calico CNI is installed and Pulumi continues to install the rest of the stack.
Actual: Pulumi preview fails pulumi-preview.txt
Pulumi version: v3.24.1 Pulumi Python package: 3.24.1 pulumi-kubernetes version: 3.15.1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Install Calico networking and network policy for on-premises ...
The operator is installed directly on the cluster as a Deployment, and is configured through one or more custom Kubernetes API resources.
Read more >Quickstart for Calico on Kubernetes - Tigera
This quickstart guide uses the Tigera operator to install Calico. The operator provides lifecycle management for Calico exposed via the Kubernetes API definedĀ ......
Read more >Migrate Calico to an operator-managed installation - Tigera
For existing clusters using the calico.yaml manifest to install Calico, upon installing the operator, it will detect the existing Calico resources on theĀ ......
Read more >About Calico
The value of using Calico for networking and network security for workloads and hosts. ... so the only traffic that flows is the...
Read more >Get started with Calico network policy - Tigera
Create your first Calico network policies. Shows the rich features using sample policies that extend native Kubernetes network policy.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@pasmon and @betamike thanks for your patience, getting back to this, it looks like thereās an issue with our Kubernetes provider and using ādepends_onā with resources that have children. Youāre likely to encounter this with ConfigFile, ConfigGroup, and Helm Charts.
A workaround is to use this in the resource options:
I also noticed that the Calico/Tigera operator manifest sets a field, āstatusā, we donāt allow in CRDs, so Iāve copied below a full working program with both workarounds:
I bumped into this issue also with Kyverno ConfigFile, defining the Kyverno policies depending on the actual Kyverno installation. In this case, the
depends_on
workaround works for me. Thanks @AaronFriel !