calico
Renders the Tigera operator resources that install Calico and the Calico network policies, network sets, IP pools and BGP resources from inventory parameters.
- Latest
- 1.1.3 ·
- License
- Apache-2.0
- Owners
- Moep90
- Source
- github.com/kadet-hub/generators · 0 repo stars, shared by 35 generators
- Thumbs up
- 👍 0 on GitHub Discussions
- Popularity
- 18 · 571 pulls
Request a feature Report a problem
Badge
Show the latest listed version in your README. shields.io draws the badge from this page's badge.json, which every catalog build updates; once no version is listed, it reads "not listed".
[](https://kadet-hub.org/generators/calico/)
Calico Generator
Published on kadet-hub: pin a released version by digest from its catalog page.
Kapitan kadet generator for the Tigera operator resources that install and configure Calico. Built for Calico 3.33.0 (Tigera operator 1.44.0).
- Installation (
operator.tigera.io/v1): Calico networking, CNI, IP pools and control plane settings - APIServer (
operator.tigera.io/v1): the Calico API server - ImageSet (
operator.tigera.io/v1): Calico images pinned by digest - Goldmane (
operator.tigera.io/v1): the flow aggregator - Whisker (
operator.tigera.io/v1): the flow log UI, which reads from Goldmane - NetworkPolicy, GlobalNetworkPolicy (
projectcalico.org/v3): policy for workload and host endpoints - NetworkSet, GlobalNetworkSet (
projectcalico.org/v3): labelled lists of CIDRs that policy selectors can match - IPPool (
projectcalico.org/v3): an additional IP pool - BGPPeer, BGPConfiguration (
projectcalico.org/v3): BGP peerings and the cluster or per-node BGP settings
The five operator kinds are cluster-scoped and exist only as v1, the served storage version at operator 1.44.0. The operator itself and its CRDs come from the upstream tigera-operator.yaml manifest or the tigera-operator Helm chart. At Calico 3.33.0 the seven projectcalico.org kinds are served and stored as v3 by the native CRDs in v3_projectcalico_org.yaml; none is deprecated. Clusters that still use the crd.projectcalico.org/v1 CRDs accept the same documents through the Calico API server (api_server).
Usage
Kapitan Configuration
parameters:
kapitan:
dependencies:
- type: oci
source: ghcr.io/kadet-hub/calico@sha256:<digest>
output_path: lib/calico
compile:
- output_path: manifests/calico/
input_type: kadet
output_type: yml
input_paths:
- lib/calicoInventory Contract
All keys live under parameters.generators.calico.
| Key | Kind | Output key |
|---|---|---|
installation |
Installation, always rendered | <name>-installation |
api_server |
APIServer, rendered when the key is present (api_server: {} is enough) |
<name>-apiserver |
imageset |
ImageSet, rendered when the key is present | <name>-imageset |
goldmane |
Goldmane, rendered when the key is present (goldmane: {} is enough) |
<name>-goldmane |
whisker |
Whisker, rendered when the key is present (whisker: {} is enough) |
<name>-whisker |
namespace |
Default namespace of NetworkPolicy and NetworkSet. Falls back to parameters.namespace, then default. |
|
network_policies.<name> |
NetworkPolicy | <namespace>/<name>-np |
global_network_policies.<name> |
GlobalNetworkPolicy | <name>-gnp |
network_sets.<name> |
NetworkSet | <namespace>/<name>-netset |
global_network_sets.<name> |
GlobalNetworkSet | <name>-gnetset |
ip_pools.<name> |
IPPool | <name>-ippool |
bgp_peers.<name> |
BGPPeer | <name>-bgppeer |
bgp_configurations.<name> |
BGPConfiguration | <name>-bgpconfig |
The Installation is rendered in every target, also in one that only sets policies; compile policies for an application in the target that holds the cluster’s Installation, or set the same installation there.
Every operator resource accepts name, labels, annotations and spec, and gets the label name: <name>. name defaults to default. The CRDs only accept default, tigera-secure or overlay for an Installation default or tigera-secure for an APIServer and default for Goldmane and Whisker. An ImageSet must be named calico-<release>, for this release calico-v3.33.0 (enterprise-<release> for the enterprise variants); the operator ignores names without that prefix and refuses to install while a calico-* ImageSet with the wrong release exists (imageset.go). An ImageSet without name is rendered as default and logs a warning.
Precedence is generator defaults < spec < flat keys: a flat key that overrides the same field in spec wins and logs a warning. The override is per top-level field, so a flat cni or calico_network replaces the whole spec.cni or spec.calicoNetwork.
| Kind | Flat key | Renders to |
|---|---|---|
| Installation | variant |
spec.variant (Calico, CalicoEnterprise, TigeraSecureEnterprise) |
| Installation | kubernetes_provider |
spec.kubernetesProvider |
| Installation | registry, image_path, image_prefix |
spec.registry, spec.imagePath, spec.imagePrefix |
| Installation | image_pull_secrets |
spec.imagePullSecrets; a string becomes {name: <string>} |
| Installation | cni |
spec.cni from type, ipam, bin_dir, conf_dir |
| Installation | calico_network |
spec.calicoNetwork from bgp, mtu, linux_dataplane, ip_pools, host_ports, node_address_autodetection_v4, node_address_autodetection_v6, container_ip_forwarding, multi_interface_mode, windows_dataplane |
| Installation | calico_network.ip_pools[] |
cidr, encapsulation, nat_outgoing, node_selector, block_size, disable_bgp_export |
| Installation | control_plane_replicas, fips_mode, non_privileged, flex_volume_path, kubelet_volume_plugin_path, service_cidrs, control_plane_tolerations, control_plane_node_selector |
the camelCase field (serviceCIDRs for service_cidrs) |
| Installation | calico_node_daemon_set, calico_kube_controllers_deployment, typha_deployment, certificate_management, node_update_strategy, node_metrics_port, logging, proxy, azure |
the camelCase field, value verbatim |
| ImageSet | images |
spec.images |
| Goldmane | metrics_port, goldmane_deployment |
spec.metricsPort, spec.goldmaneDeployment |
| Whisker | notifications, whisker_deployment |
spec.notifications, spec.whiskerDeployment |
Enum values are checked against the CRD and fail the compile with the allowed values. Keys in cni, calico_network and ip_pools entries that are not listed pass through verbatim, so write them in CRD casing (for example specVersion, installMode, assignmentMode, linuxPodInterfaceType); the listed keys win over them.
projectcalico.org resources
Every projectcalico.org resource accepts labels, annotations and spec, and gets the label name: <name>; NetworkPolicy and NetworkSet also accept namespace. Network sets are matched by their labels. Precedence is generator defaults < spec < flat keys and shorthands: a flat key that overrides the same field in spec wins and logs a warning.
Flat keys are the snake_case spelling of the CRD spec fields; values pass through unchanged apart from the shorthands below:
| Kind | Flat keys |
|---|---|
| NetworkPolicy | selector, service_account_selector, order, tier, types, ingress, egress, performance_hints |
| GlobalNetworkPolicy | the NetworkPolicy keys and namespace_selector, apply_on_forward, pre_dnat, do_not_track |
| NetworkSet, GlobalNetworkSet | nets |
| IPPool | cidr, block_size, ipip_mode, vxlan_mode, nat_outgoing, node_selector, namespace_selector, allowed_uses, assignment_mode, disabled, disable_bgp_export |
| BGPPeer | peer_ip, as_number, node, node_selector, peer_selector, local_as_number, password, source_address, next_hop_mode, keepalive_time, max_restart_time, reachable_by, ttl_security, filters |
| BGPConfiguration | as_number, node_to_node_mesh_enabled, listen_port, log_severity_screen, service_cluster_ips, service_external_ips, service_load_balancer_ips, communities, prefix_advertisements, bind_mode |
Rules in ingress and egress are written in CRD casing. Other fields go into spec.
Shorthands
| Input | Result |
|---|---|
any selector field as a map, {app: web, tier: api} (spec level and in a rule’s source or destination) |
app == 'web' && tier == 'api', keys sorted |
rule ports: [8080, "8443:8445", http] |
protocol: TCP and destination.ports: [8080, "8443:8445", http] |
rule ports: [53/UDP, 53/TCP] |
two rules, one per protocol, otherwise identical |
Selector strings pass through unchanged, so expressions such as has(k), in {...} or all() stay available (selectors). Calico requires protocol on any rule that matches ports (Rule.protocol in the CRD); ports uses the rule’s protocol and otherwise TCP. Calico rules carry one protocol each, so mixed protocols become one rule per protocol, the same split the upstream default deny example uses for DNS. Numeric strings become integers, ranges and named ports stay strings (ports).
An empty selector map and an empty ports list fail the compile. Calico treats an empty match field as unset (empty match fields), so a rule with selector: {} or ports: [] would match every peer or port. Write all() to select everything on purpose.
Defaults
For these kinds the generator adds no rule, policy or networking setting on its own:
- No allow policy is rendered unless written.
typesandtierare left to Calico’s admission policies, which settypesfrom the rules present andtiertodefault. - IPPool
ipipModeandvxlanModedefault toNeverandnatOutgoingtofalseupstream. An extra pool withoutnat_outgoing: truetherefore does not masquerade, unlike the operator’s default pool. Encapsulation and NAT change how traffic leaves the node and are rendered only when set;blockSizeandallowedUsesare left to admission. - BGP settings are rendered only when set. A
BGPConfigurationnameddefaultapplies to the whole cluster,node.<node name>to one node (BGPConfiguration);node_to_node_mesh_enabled: falseremoves the full mesh and needs BGPPeers to keep routes.
Operator defaults
Once cni is set the CRD requires cni.type. Without one the generator takes spec.cni.type, or else sets the operator’s own default for the provider: AzureVNET for AKS, AmazonVPC for EKS, GKE for GKE, Calico otherwise (fillDefaults). The operator additionally picks AmazonVPC when an aws-node DaemonSet exists; that cannot be seen at compile time, so set type on such clusters.
Nothing else is defaulted. variant is left to the operator, which fills in the variant it runs as. BGP, encapsulation, NAT and the IP pools themselves change the cluster network and are rendered only when set; the operator defaults an IP pool to IPIP encapsulation, natOutgoing: Enabled, nodeSelector: all() and block size 26 (Installation API).
Goldmane and Whisker are opt-in, although the upstream custom-resources.yaml creates both: Goldmane aggregates the flow logs of every node and Whisker serves them in a UI. The operator marks Whisker degraded while no Goldmane exists (whisker controller), so whisker without goldmane logs a warning. Whisker’s notifications defaults to Disabled here because the upstream default Enabled makes the UI fetch banner text from an external API (Whisker CRD); notifications or spec.notifications set to Enabled turns it on.
An ImageSet must list a digest for every image the operator deploys for the configured Installation; image names are the calico/ names of the release, such as calico/calico, calico/node and calico/third-party-cni-plugins (ImageSet).
Example
parameters:
generators:
calico:
installation:
calico_network:
bgp: Enabled
node_address_autodetection_v4:
kubernetes: NodeInternalIP
ip_pools:
- name: default-ipv4-ippool
cidr: 10.244.0.0/16
encapsulation: IPIPCrossSubnet
nat_outgoing: Enabled
control_plane_replicas: 2
spec:
nodeMetricsPort: 9091
api_server: {}
imageset:
name: calico-v3.33.0
images:
- image: calico/calico
digest: sha256:4ebc20730127bc9e8bf1db5f5a2d8b58cf37fe0e891b3c7b5471992221d213e5
- image: calico/node
digest: sha256:565d8db3200e443955557f8f28ff44ab8a4a456754bc74a19c4f2f3444af9b1c
- image: calico/third-party-cni-plugins
digest: sha256:0f32f48279484c0d6f0e0d0e767b2d0e1a6c6ca34cb3421a61b989d992f3df41This renders default-installation, default-apiserver and calico-v3.33.0-imageset.
Policies, network sets and BGP:
parameters:
generators:
calico:
namespace: shop
network_policies:
api:
selector:
app: api
ingress:
- action: Allow
source:
selector:
app: web
ports: [3000]
egress:
- action: Allow
destination:
selector: role == 'partner'
ports: [443]
global_network_policies:
deny-app-policy:
namespace_selector: kubernetes.io/metadata.name not in {"calico-system", "kube-public", "kube-system", "tigera-operator"}
types: [Ingress, Egress]
egress:
- action: Allow
destination:
selector:
k8s-app: kube-dns
ports: [53/UDP, 53/TCP]
network_sets:
partner-api:
labels:
role: partner
nets:
- 198.51.100.0/24
bgp_peers:
rack1-tor:
peer_ip: 192.0.2.1
as_number: 64513
node_selector:
rack: rack1This renders shop/api-np, deny-app-policy-gnp, shop/partner-api-netset and rack1-tor-bgppeer. deny-app-policy is the upstream global default deny for application namespaces with DNS to kube-dns allowed; api then allows its own traffic, including egress to the partner network set. default-installation is rendered as well.
Schemas
schemas/operator.tigera.io/ holds the closed JSON Schemas of the five kinds from the Tigera operator 1.44.0 CRDs (Apache-2.0). schemas/projectcalico.org/ holds the closed JSON Schemas of the seven kinds from the Calico 3.33.0 v3_projectcalico_org.yaml CRDs (Apache-2.0). The CRDs’ CEL rules, for example that an IPPool CIDR is strictly masked or that node and nodeSelector exclude each other, are checked by the API server, not by QA-7.
Versions
Add a version's inventory entry, then compile with the consumer workflow, which verifies the artifact and runs Kapitan in the sandbox.
Free of charge, as is and on a best-effort basis: use at your own risk, and review the compiled output before you apply it. Terms
This catalog was built from index serial 47. Set index_serial: 47 in .kapitan-sandbox.yaml and the consumer workflow refuses any older index, so a rolled-back index cannot bring back a yanked version.
Checks find known patterns; they do not prove a generator safe. What a listing covers
| Version | Built for (schema-checked) |
|---|---|
| 1.1.3 | Calico 3.33.0 Tigera operator 1.44.0 |
| 1.1.2 | Calico 3.33.0 Tigera operator 1.44.0 |
| 1.1.0 | Calico 3.33.0 Tigera operator 1.44.0 |
| 1.0.0 | Tigera operator 1.44.0 |
1.1.3#
Inventory
parameters:
kapitan:
dependencies:
- type: oci
source: ghcr.io/kadet-hub/calico:1.1.3@sha256:7af20be1b17f5262493d021dfe618090c207b55a2c42a503ce8a347997dabc9f
output_path: lib/calico
Verify
gh attestation verify \
oci://ghcr.io/kadet-hub/calico@sha256:7af20be1b17f5262493d021dfe618090c207b55a2c42a503ce8a347997dabc9f \
--owner kadet-hub \
--cert-identity https://github.com/kadet-hub/registry/.github/workflows/release.yml@refs/heads/main
Transparency log: Rekor entry 3249932000, in Sigstore's public, append-only log, so the attestation stays checkable independent of this site.
- Kapitan declared
- >=0.36.3,<0.37
- Kapitan checked
- 0.36.3
- Backends checked
- not recorded
- With --cache
- not recorded
- krab
- compatible
- Built for (schema-checked)
- Calico 3.33.0
Tigera operator 1.44.0 - Source
- calico-v1.1.3 ·
e4891e8fd85ca0a19ebf361e8b54fd6473fd8a2f· calico - Binaries
- none
- Output capabilities
- none
- Digest
sha256:7af20be1b17f5262493d021dfe618090c207b55a2c42a503ce8a347997dabc9f
Checks
Checked by the release run on , gate at adb2714229cb.
- Secrets gitleaks 8.30.1
No secret matched the marketplace's gitleaks rules. - Malware ClamAV 1.5.4
No file matched a ClamAV signature. - Malicious package heuristics GuardDog 3.2.0
No GuardDog threat rule matched. - Dangerous code Semgrep 1.180.0
No marketplace Semgrep rule matched, such as eval, subprocess or network calls. - Python errors Ruff 0.17.0
No syntax error or undefined name (Ruff, error rules only). - File tree tree_check.py
No symlink, executable or banned file; imports within the allowlist. - Sandboxed compile gVisor 20261005, Kapitan 0.36.3
The fixture compiled without network, with decoy credentials; no undeclared program ran, no decoy was read. - Output capabilities Conftest 0.71.1
The compiled output uses only the capabilities the manifest declares. - CI detection Kapitan 0.36.3
The output is the same with CI variables set.
Output diff
No output diff recorded: this version was published before the release run recorded one.
1.1.2#
Inventory
parameters:
kapitan:
dependencies:
- type: oci
source: ghcr.io/kadet-hub/calico:1.1.2@sha256:3cf7ef4275b37a7e70afe70ab3bd987a40770229c734bc623a07d0d43fdb03fc
output_path: lib/calico
Verify
gh attestation verify \
oci://ghcr.io/kadet-hub/calico@sha256:3cf7ef4275b37a7e70afe70ab3bd987a40770229c734bc623a07d0d43fdb03fc \
--owner kadet-hub \
--cert-identity https://github.com/kadet-hub/registry/.github/workflows/release.yml@refs/heads/main
Transparency log: Rekor entry 3244657577, in Sigstore's public, append-only log, so the attestation stays checkable independent of this site.
- Kapitan declared
- >=0.36.3,<0.37
- Kapitan checked
- 0.36.3
- Backends checked
- not recorded
- With --cache
- not recorded
- krab
- compatible
- Built for (schema-checked)
- Calico 3.33.0
Tigera operator 1.44.0 - Source
- calico-v1.1.2 ·
045c2666243ea79ccdbeccb8a5920be280f68b7b· calico - Binaries
- none
- Output capabilities
- none
- Digest
sha256:3cf7ef4275b37a7e70afe70ab3bd987a40770229c734bc623a07d0d43fdb03fc
Checks
Checked by the release run on , gate at d34dadb8f846.
- Secrets gitleaks 8.30.1
No secret matched the marketplace's gitleaks rules. - Malware ClamAV 1.5.4
No file matched a ClamAV signature. - Malicious package heuristics GuardDog 3.2.0
No GuardDog threat rule matched. - Dangerous code Semgrep 1.180.0
No marketplace Semgrep rule matched, such as eval, subprocess or network calls. - Python errors Ruff 0.17.0
No syntax error or undefined name (Ruff, error rules only). - File tree tree_check.py
No symlink, executable or banned file; imports within the allowlist. - Sandboxed compile gVisor 20261005, Kapitan 0.36.3
The fixture compiled without network, with decoy credentials; no undeclared program ran, no decoy was read. - Output capabilities Conftest 0.71.1
The compiled output uses only the capabilities the manifest declares. - CI detection Kapitan 0.36.3
The output is the same with CI variables set.
Output diff
No output diff recorded: this version was published before the release run recorded one.
1.1.0#
Inventory
parameters:
kapitan:
dependencies:
- type: oci
source: ghcr.io/kadet-hub/calico:1.1.0@sha256:d992c44f6182beff579c0f9148125fb6382130d6e34354a244cacf6a74fa715e
output_path: lib/calico
Verify
gh attestation verify \
oci://ghcr.io/kadet-hub/calico@sha256:d992c44f6182beff579c0f9148125fb6382130d6e34354a244cacf6a74fa715e \
--owner kadet-hub \
--cert-identity https://github.com/kadet-hub/registry/.github/workflows/release.yml@refs/heads/main
Transparency log: Rekor entry 3220551018, in Sigstore's public, append-only log, so the attestation stays checkable independent of this site.
- Kapitan declared
- >=0.36.3,<0.37
- Kapitan checked
- 0.36.3
- Backends checked
- not recorded
- With --cache
- not recorded
- krab
- compatible
- Built for (schema-checked)
- Calico 3.33.0
Tigera operator 1.44.0 - Source
- calico-v1.1.0 ·
313f1ca5e57679c11b891880f2cf10687832e4fc· calico - Binaries
- none
- Output capabilities
- none
- Digest
sha256:d992c44f6182beff579c0f9148125fb6382130d6e34354a244cacf6a74fa715e
Checks
Checked by the release run on , gate at e79f456106a6.
- Secrets gitleaks 8.30.1
No secret matched the marketplace's gitleaks rules. - Malware ClamAV 1.5.4
No file matched a ClamAV signature. - Malicious package heuristics GuardDog 3.2.0
No GuardDog threat rule matched. - Dangerous code Semgrep 1.180.0
No marketplace Semgrep rule matched, such as eval, subprocess or network calls. - Python errors Ruff 0.17.0
No syntax error or undefined name (Ruff, error rules only). - File tree tree_check.py
No symlink, executable or banned file; imports within the allowlist. - Sandboxed compile gVisor 20261005, Kapitan 0.36.3
The fixture compiled without network, with decoy credentials; no undeclared program ran, no decoy was read. - Output capabilities Conftest 0.71.1
The compiled output uses only the capabilities the manifest declares. - CI detection Kapitan 0.36.3
The output is the same with CI variables set.
Output diff
No output diff recorded: this version was published before the release run recorded one.
1.0.0#
Inventory
parameters:
kapitan:
dependencies:
- type: oci
source: ghcr.io/kadet-hub/calico:1.0.0@sha256:ac80191c97bd53320629be18c26c92be15dd4b1ff876493f8b71efa7207375af
output_path: lib/calico
Verify
gh attestation verify \
oci://ghcr.io/kadet-hub/calico@sha256:ac80191c97bd53320629be18c26c92be15dd4b1ff876493f8b71efa7207375af \
--owner kadet-hub \
--cert-identity https://github.com/kadet-hub/registry/.github/workflows/release.yml@refs/heads/main
Transparency log: Rekor entry 3214144354, in Sigstore's public, append-only log, so the attestation stays checkable independent of this site.
- Kapitan declared
- >=0.36.3,<0.37
- Kapitan checked
- 0.36.3
- Backends checked
- not recorded
- With --cache
- not recorded
- krab
- compatible
- Built for (schema-checked)
- Tigera operator 1.44.0
- Source
- calico-v1.0.0 ·
dccb03cf01fd06f12e450d884b7e415e8aa2e959· calico - Binaries
- none
- Output capabilities
- none
- Digest
sha256:ac80191c97bd53320629be18c26c92be15dd4b1ff876493f8b71efa7207375af
Checks
Checked by the release run on , gate at ba56b80d2115.
- Secrets gitleaks 8.30.1
No secret matched the marketplace's gitleaks rules. - Malware ClamAV 1.5.4
No file matched a ClamAV signature. - Malicious package heuristics GuardDog 3.2.0
No GuardDog threat rule matched. - Dangerous code Semgrep 1.180.0
No marketplace Semgrep rule matched, such as eval, subprocess or network calls. - Python errors Ruff 0.17.0
No syntax error or undefined name (Ruff, error rules only). - File tree tree_check.py
No symlink, executable or banned file; imports within the allowlist. - Sandboxed compile gVisor 20261005, Kapitan 0.36.3
The fixture compiled without network, with decoy credentials; no undeclared program ran, no decoy was read. - Output capabilities Conftest 0.71.1
The compiled output uses only the capabilities the manifest declares. - CI detection Kapitan 0.36.3
The output is the same with CI variables set.
Output diff
No output diff recorded: this version was published before the release run recorded one.