Skip to content

chore: bump socket-firewall chart and image versions - #10

Merged
Jeffreyhung merged 1 commit into
mainfrom
chore/bump-firewall-versions-574669a998decb494ddfc3803da6eca5c3866740
Aug 3, 2026
Merged

chore: bump socket-firewall chart and image versions#10
Jeffreyhung merged 1 commit into
mainfrom
chore/bump-firewall-versions-574669a998decb494ddfc3803da6eca5c3866740

Conversation

@getsantry

@getsantry getsantry Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Automated weekly version check found newer releases.

Updates

  • helm_chart_version: 0.9.00.11.1
  • firewall_image_tag: 2.0.102.0.14

Follow-up

  • Review the terraform plan check on this PR.
  • Confirm the new image is allowed by Binary Authorization before merging to main.

Triggered by check-firewall-versions.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Terraform plan in terraform

Plan: 0 to add, 1 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place
 <= read (data resources)

Terraform will perform the following actions:

  # data.kubernetes_service.socket_firewall will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "kubernetes_service" "socket_firewall" {
+       id     = (known after apply)
+       spec   = (known after apply)
+       status = (known after apply)

+       metadata {
+           generation       = (known after apply)
+           name             = "socket-firewall"
+           namespace        = "socket-firewall"
+           resource_version = (known after apply)
+           uid              = (known after apply)
        }
    }

  # helm_release.socket_firewall will be updated in-place
!~  resource "helm_release" "socket_firewall" {
        id                         = "socket-firewall"
!~      metadata                   = [
-           {
-               app_version    = "2.0.5"
-               chart          = "socket-firewall"
-               first_deployed = 1781303659
-               last_deployed  = 1785178046
-               name           = "socket-firewall"
-               namespace      = "socket-firewall"
-               notes          = <<-EOT
                    Socket Firewall deployed successfully!
                    
                    ## Self-Signed Certificates
                    
                    Self-signed certificates were generated. Extract the CA certificate:
                    
                      kubectl exec -n socket-firewall \
                        $(kubectl get pod -n socket-firewall -l app.kubernetes.io/name=socket-firewall -o jsonpath='{.items[0].metadata.name}') \
                        -- cat /etc/nginx/ssl/ca.crt > socket-ca.crt
                    
                    Then trust the CA on developer machines or use a real certificate for production.
                    
                    ## Accessing the Firewall
                    For testing, use port-forward:
                    
                      kubectl port-forward svc/socket-firewall 8443:443 -n socket-firewall
                    
                    For production, expose via Ingress or change service.type to LoadBalancer.
                    
                    ## Usage
                    
                    Path-based routing is enabled on domain: sfw.security.sentry.io
                    
                    Configure package managers to use path prefixes:
                      npm: https://sfw.security.sentry.io/npm/
                      pypi: https://sfw.security.sentry.io/pypi/
                      maven: https://sfw.security.sentry.io/maven/
                    
                    Example:
                      npm config set registry https://sfw.security.sentry.io/npm/
                      pip config set global.index-url https://sfw.security.sentry.io/pypi/simple
                    
                    ## Verify
                    
                    Test the health endpoint:
                    
                      curl -sk https://<firewall-ip>/health
                    
                    ## Metrics
                    
                    Prometheus metrics are exposed on port 9145 at /metrics (plain HTTP, no auth).
                    Set metrics.serviceMonitor.enabled=true (Prometheus Operator) or metrics.podAnnotations=true
                    (annotation-based) to scrape it. The endpoint is unauthenticated — restrict access with a NetworkPolicy.
                    
                    See deployment recommendations in README.md for production setup.
                EOT
-               revision       = 16
-               values         = jsonencode(
                    {
-                       affinity           = {
-                           podAntiAffinity = {
-                               preferredDuringSchedulingIgnoredDuringExecution = [
-                                   {
-                                       podAffinityTerm = {
-                                           labelSelector = {
-                                               matchLabels = {
-                                                   "app.kubernetes.io/instance" = "socket-firewall"
                                                }
                                            }
-                                           topologyKey   = "kubernetes.io/hostname"
                                        }
-                                       weight          = 100
                                    },
                                ]
                            }
                        }
-                       autoscaling        = {
-                           enabled = true
                        }
-                       extraConfig        = {
-                           resilience = {
-                               circuit_breaker = {
-                                   enabled = true
                                }
                            }
                        }
-                       image              = {
-                           pullPolicy = "IfNotPresent"
-                           repository = "socketdev/socket-registry-firewall"
-                           tag        = "2.0.10"
                        }
-                       initContainers     = {
-                           certGenerator = {
-                               securityContext = {
-                                   allowPrivilegeEscalation = false
-                                   capabilities             = {
-                                       drop = [
-                                           "ALL",
                                        ]
                                    }
-                                   readOnlyRootFilesystem   = true
-                                   runAsNonRoot             = true
-                                   runAsUser                = 1001
-                                   seccompProfile           = {
-                                       type = "RuntimeDefault"
                                    }
                                }
                            }
                        }
-                       pathRouting        = {
-                           domain  = "sfw.security.sentry.io"
-                           enabled = true
-                           routes  = [
-                               {
-                                   path     = "/npm"
-                                   registry = "npm"
-                                   upstream = "https://registry.npmjs.org"
                                },
-                               {
-                                   path     = "/pypi"
-                                   registry = "pypi"
-                                   upstream = "https://pypi.org"
                                },
-                               {
-                                   path     = "/maven"
-                                   registry = "maven"
-                                   upstream = "https://repo1.maven.org/maven2"
                                },
                            ]
                        }
-                       podSecurityContext = {
-                           fsGroup = 1001
                        }
-                       redis              = {
-                           enabled                 = true
-                           existingSecret          = "socket-firewall-redis-auth"
-                           existingSecretKey       = "REDIS_PASSWORD"
-                           host                    = "10.236.196.99"
-                           port                    = 6378
-                           ssl                     = true
-                           sslCaCertExistingSecret = "socket-firewall-redis-ca"
-                           sslServerName           = "10.236.196.99"
-                           sslVerify               = true
-                           ttl                     = 86400
                        }
-                       replicaCount       = 2
-                       resources          = {
-                           limits   = {
-                               cpu    = "1"
-                               memory = "768Mi"
                            }
-                           requests = {
-                               cpu    = "500m"
-                               memory = "512Mi"
                            }
                        }
-                       service            = {
-                           httpsTargetPort = "http"
-                           type            = "ClusterIP"
                        }
-                       socket             = {
-                           cacheTtl          = 600
-                           existingSecret    = "socket-api-token"
-                           existingSecretKey = "SOCKET_SECURITY_API_TOKEN"
-                           failOpen          = true
-                           failOpenUnscanned = false
                        }
-                       tls                = {
-                           generateSelfSigned = true
                        }
                    }
                )
-               version        = "0.9.0"
            },
        ] -> (known after apply)
        name                       = "socket-firewall"
!~      values                     = [
!~          <<-EOT
                "affinity":
                  "podAntiAffinity":
                    "preferredDuringSchedulingIgnoredDuringExecution":
                    - "podAffinityTerm":
                        "labelSelector":
                          "matchLabels":
                            "app.kubernetes.io/instance": "socket-firewall"
                        "topologyKey": "kubernetes.io/hostname"
                      "weight": 100
                "autoscaling":
                  "enabled": true
                "extraConfig":
                  "resilience":
                    "circuit_breaker":
                      "enabled": true
                "image":
                  "pullPolicy": "IfNotPresent"
                  "repository": "socketdev/socket-registry-firewall"
              -   "tag": "2.0.10"
              +   "tag": "2.0.14"
                "initContainers":
                  "certGenerator":
                    "securityContext":
                      "allowPrivilegeEscalation": false
                      "capabilities":
                        "drop":
                        - "ALL"
                      "readOnlyRootFilesystem": true
                      "runAsNonRoot": true
                      "runAsUser": 1001
                      "seccompProfile":
                        "type": "RuntimeDefault"
                "pathRouting":
                  "domain": "sfw.security.sentry.io"
                  "enabled": true
                  "routes":
                  - "path": "/npm"
                    "registry": "npm"
                    "upstream": "https://registry.npmjs.org"
                  - "path": "/pypi"
                    "registry": "pypi"
                    "upstream": "https://pypi.org"
                  - "path": "/maven"
                    "registry": "maven"
                    "upstream": "https://repo1.maven.org/maven2"
                "podSecurityContext":
                  "fsGroup": 1001
                "redis":
                  "enabled": true
                  "existingSecret": "socket-firewall-redis-auth"
                  "existingSecretKey": "REDIS_PASSWORD"
                  "host": "10.236.196.99"
                  "port": 6378
                  "ssl": true
                  "sslCaCertExistingSecret": "socket-firewall-redis-ca"
                  "sslServerName": "10.236.196.99"
                  "sslVerify": true
                  "ttl": 86400
                "replicaCount": 2
                "resources":
                  "limits":
                    "cpu": "1"
                    "memory": "768Mi"
                  "requests":
                    "cpu": "500m"
                    "memory": "512Mi"
                "service":
                  "httpsTargetPort": "http"
                  "type": "ClusterIP"
                "socket":
                  "cacheTtl": 600
                  "existingSecret": "socket-api-token"
                  "existingSecretKey": "SOCKET_SECURITY_API_TOKEN"
                  "failOpen": true
                  "failOpenUnscanned": false
                "tls":
                  "generateSelfSigned": true
            EOT,
        ]
!~      version                    = "0.9.0" -> "0.11.1"
#        (25 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

✅ Plan applied in Terraform Apply #22

Outputs
cluster_name                 = "socket-firewall"
firewall_domain              = "sfw.security.sentry.io"
firewall_health_url          = "https://sfw.security.sentry.io/health"
firewall_load_balancer_ip    = "34.98.104.179"
firewall_namespace           = "socket-firewall"
firewall_service_name        = "socket-firewall"
kubeconfig_command           = "gcloud container fleet memberships get-credentials socket-firewall --project sentry-socket"
redis_host                   = "10.236.196.99"
redis_port                   = 6378
tls_certificate_name         = "socket-firewall-cert"
tls_dns_authorization_record = {
    data = "6a407a91-86a0-4dc8-a434-e72cdc012e0e.9.authorize.certificatemanager.goog."
    name = "_acme-challenge.sfw.security.sentry.io."
    type = "CNAME"
}

replica_count = 2
helm_chart_version = "0.9.0"
firewall_image_tag = "2.0.10"
helm_chart_version = "0.11.1"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Upgrading the socket-firewall Helm chart from 0.9.0 to 0.11.1 may cause silent misconfiguration, as Helm ignores unknown keys and breaking changes in pre-1.0 charts are common.
Severity: HIGH

Suggested Fix

Before merging, manually compare the values.yaml from the Helm chart versions 0.9.0 and 0.11.1 to verify that all keys used in terraform/helm.tf are still valid. Pay special attention to initContainers, redis, and extraConfig. After verification, apply the change in a staging environment and test the features controlled by these configurations to ensure they behave as expected.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: terraform/terraform.tfvars#L16

Potential issue: The upgrade of the `socket-firewall` Helm chart from version `0.9.0` to
`0.11.1` skips a minor version. Since Helm silently ignores unknown configuration keys,
any breaking changes in the chart's `values.yaml` (e.g., renamed or removed keys)
between these versions will not be caught by `terraform plan`. This could lead to
critical features like the Redis-backed cache, TLS certificate generation with specific
UIDs, or the `extraConfig.resilience.circuit_breaker` being silently disabled. The
application might deploy successfully but fail under specific production loads when
these misconfigured features are required.

Also affects:

  • terraform/helm.tf

Did we get this right? 👍 / 👎 to inform future reviews.

@Jeffreyhung
Jeffreyhung merged commit 8598045 into main Aug 3, 2026
12 checks passed
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.

1 participant