Specifying a additional inbound rule without any outbound rules will fail deployment

Open
#16 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
52/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
go, helm, terraform

Research direction

Reproduce the deployment with only the inbound rule shown in values.yaml, then inspect cloud-firewall-controller/templates/firewall.yaml at the len .Values.firewall.outbound expression. Check the related Helm values and main.tf deployment configuration; done means an omitted outbound section no longer causes the template rendering error while explicit outbound rules still work.

Written by the indexing model from the issue text.

Description

Specifying

firewall:
  inbound:
  - action: ACCEPT
    addresses:
      ipv4:
      - 192.168.128.0/17
    description: Node exporter is exposed (by design) on the host network. Prometheus
      needs access to scrape.
    label: ALLOW-prometheus-to-scrape-node-exporter
    ports: "9100"
    protocol: TCP

in the values.yaml file without any outbound rules, results in the following error while deploying:

helm_release.linode_firewall_controller: Creating...
╷
│ Error: template: cloud-firewall-controller/templates/firewall.yaml:10:15: executing "cloud-firewall-controller/templates/firewall.yaml" at <len .Values.firewall.outbound>: error calling len: len of nil pointer
│ 
│   with helm_release.linode_firewall_controller,
│   on main.tf line 70, in resource "helm_release" "linode_firewall_controller":
│   70: resource "helm_release" "linode_firewall_controller" {
│ 
╵

Obviously, it's easily fixed by adding a [] as outbound rules as well.

Dominant language
Go
Stars
16
Forks
9
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linode/cloud-firewall-controller

All issues in linode/cloud-firewall-controller

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.