8000 Enable Cilium Gateway API #923 by zdenekjanda · Pull Request #924 · cozystack/cozystack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Enable Cilium Gateway API #923 #924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2025
Merged

Enable Cilium Gateway API #923 #924

merged 2 commits into from
May 8, 2025

Conversation

zdenekjanda
Copy link
Contributor
@zdenekjanda zdenekjanda commented May 7, 2025

Implementation of Cilium Gateway API

Summary by CodeRabbit

  • New Features
    • Added optional Gateway API addon for Kubernetes clusters, controlled by a new configuration flag.
    • Introduced automated deployment of Gateway API CRDs when the addon is enabled.
  • Documentation
    • Updated documentation to describe the new Gateway API addon and its configuration.
  • Chores
    • Added chart metadata and automation files for managing Gateway API CRDs.
    • Updated chart version to reflect new features.

Copy link
Contributor
coderabbitai bot commented May 7, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This change introduces support for a Gateway API addon in the Kubernetes application Helm chart. It adds configuration options, documentation, schema validation, and conditional resource templates for deploying Gateway API CRDs using a new HelmRelease. The Cilium HelmRelease and deletion job templates are updated for dependency and lifecycle management. A new system package for the Gateway API CRDs is also added.

Changes

File(s) Change Summary
packages/apps/kubernetes/values.yaml, values.schema.json, README.md Added addons.gatewayAPI.enabled configuration option (default: false) to values and schema, with documentation describing its purpose.
packages/apps/kubernetes/templates/helmreleases/cilium.yaml Added conditional blocks to enable Cilium's Gateway API and Envoy integration if addons.gatewayAPI.enabled is true; extended dependsOn to include the new Gateway API CRDs HelmRelease when enabled.
packages/apps/kubernetes/templates/helmreleases/delete.yaml Updated the pre-delete Job to also suspend the new gateway-api-crds HelmRelease before deletion, alongside other releases.
packages/apps/kubernetes/templates/helmreleases/gateway-api-crds.yaml Introduced a new HelmRelease manifest template for deploying Gateway API CRDs, conditionally rendered when addons.gatewayAPI.enabled is true. Includes dependency management, chart reference, and remediation settings.
packages/apps/kubernetes/Chart.yaml Updated appVersion from "1.30.1" to 1.31.0.
packages/system/gateway-api-crds/Chart.yaml Added a new Helm chart descriptor for cozy-gateway-api-crds with placeholder version and metadata.
packages/system/gateway-api-crds/Makefile Added a new Makefile to automate fetching and generating Gateway API CRDs using kubectl kustomize, outputting them to the chart's templates directory.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Helm
    participant Kubernetes
    participant GatewayAPI CRDs HelmRelease
    participant Cilium HelmRelease

    User->>Helm: Set addons.gatewayAPI.enabled = true
    Helm->>Kubernetes: Deploy GatewayAPI CRDs HelmRelease
    Helm->>Kubernetes: Deploy Cilium HelmRelease (depends on GatewayAPI CRDs)
    Kubernetes->>GatewayAPI CRDs HelmRelease: Install CRDs
    Kubernetes->>Cilium HelmRelease: Install Cilium with Gateway API integration
Loading

Possibly related PRs

  • Enable Cilium Gateway API #923 #924: Implements Gateway API addon enabling including conditional HelmRelease templates and dependency updates, closely related in scope and code changes.

Suggested labels

ok-to-test

Poem

🐇
A hop and a skip, a new gateway appears,
CRDs in the cluster, let’s give three cheers!
With Cilium and Envoy, the traffic will flow,
Helm charts and values, all ready to go.
The rabbit approves—let’s open the gate,
For new API journeys, this change is great!
🛤️✨

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e1f2813 and 563c643.

📒 Files selected for processing (9)
  • packages/apps/kubernetes/Chart.yaml (1 hunks)
  • packages/apps/kubernetes/README.md (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/cilium.yaml (2 hunks)
  • packages/apps/kubernetes/templates/helmreleases/delete.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/gateway-api-crds.yaml (1 hunks)
  • packages/apps/kubernetes/values.schema.json (1 hunks)
  • packages/apps/kubernetes/values.yaml (1 hunks)
  • packages/system/gateway-api-crds/Chart.yaml (1 hunks)
  • packages/system/gateway-api-crds/Makefile (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/system/gateway-api/Chart.yaml (1)

1-3: Add chart metadata and verify version handling
The Chart.yaml correctly defines apiVersion, name, and uses a version: 0.0.0 placeholder for CI-driven updates. Consider adding a description field to improve chart discoverability:

description: Cozystack Gateway API Helm chart

Also ensure your build pipeline replaces the placeholder version as intended to avoid packaging/installation failures.

packages/system/gateway-api/Makefile (1)

1-9: Parameterize the CRD version
Hardcoding v1.2.0 in the kubectl kustomize command will require manual updates for future Gateway API releases. Introduce a CRD_VERSION variable and reference it:

-export NAME=gateway-api
-export NAMESPACE=cozy-$(NAME)
+export NAME := gateway-api
+export NAMESPACE := cozy-$(NAME)
+CRD_VERSION := v1.2.0

 update:
 	rm -rf templates
 	mkdir templates
-	kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=v1.2.0" > templates/crds-experimental.yaml
+	kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=$(CRD_VERSION)" > templates/crds-experimental.yaml
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dca732c and e65fdc4.

📒 Files selected for processing (4)
  • packages/apps/kubernetes/templates/helmreleases/cilium.yaml (2 hunks)
  • packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (1 hunks)
  • packages/system/gateway-api/Chart.yaml (1 hunks)
  • packages/system/gateway-api/Makefile (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml

[error] 4-4: syntax error: expected , but found ''

(syntax)

🔇 Additional comments (3)
packages/apps/kubernetes/templates/helmreleases/cilium.yaml (2)

8-11: Enable Gateway API and Envoy features
The new gatewayAPI.enabled and envoy.enabled flags are correctly added under the cilium values. Please verify against the upstream Cilium Helm chart’s values reference to ensure these keys match exactly (case-sensitive) and toggle the intended modules.


53-54: Add HelmRelease dependency for Gateway API
Declaring a dependency on {{ .Release.Name }}-gateway-api ensures Cilium deploys only after the Gateway API is ready, preventing race conditions. This is critical for orchestrating the startup sequence.

packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (1)

1-4: Ignore YAMLlint false positive
The reported lint error at line 4 is due to Helm’s Go template syntax, which YAMLlint doesn’t understand. The final rendered manifest is valid YAML once variables are substituted.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 4-4: syntax error: expected , but found ''

(syntax)

Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (2)

9-18: Pin your chart version to avoid unintended upgrades
Right now this will always track the latest chart in the repo. It’s safer to add a version field under spec.chart (e.g. version: 0.0.0 or a templated placeholder) so that automated rollouts only happen when you explicitly bump it.

 spec:
   interval: 5m
   releaseName: gateway-api
   chart:
     spec:
       chart: cozy-gateway-api
+      version: 0.0.0   # pin to the initial version; update via your build pipeline
       reconcileStrategy: Revision

23-26: Consider isolating the Gateway API in its own namespace
Deploying in kube-system can blur the line between system and workload components. You might improve security and manageability by creating a dedicated namespace (e.g. gateway-system) instead of reusing kube-system.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e65fdc4 and b1fe4d9.

📒 Files selected for processing (1)
  • packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml

[error] 4-4: syntax error: expected , but found ''

(syntax)

🔇 Additional comments (4)
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (4)

4-7: Labels are correctly spelled and consistent
Nice catch fixing the previous typo—cozystack.io/repository and cozystack.io/target-cluster-name are now correctly namespaced.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 4-4: syntax error: expected , but found ''

(syntax)


27-31: Review remediation retry strategy
You currently allow unlimited retries (-1) for both install and upgrade remediation. Confirm this is intentional—an endless loop on a bad release can flood your logs. You may want to set a finite retry count or add a backoff.


19-22:

❓ Verification inconclusive

Verify the kubeConfig secret and key
You’re referencing a secret named {{ .Release.Name }}-admin-kubeconfig with key super-admin.svc. Please confirm that this secret exists in the cluster and that its data key matches—otherwise the HelmRelease will fail on reconcile.


🏁 Script executed:

#!/bin/bash
set -e
RELEASE="{{ .Release.Name }}"
NS="kube-system"
SECRET="${RELEASE}-admin-kubeconfig"
# Check secret presence and key
kubectl get secret -n $NS $SECRET \
  -o jsonpath='{.data.super-admin\.svc}' \
  >/dev/null && echo "✔ Secret and key exist" || echo "✗ Missing secret or key"

Length of output: 376


Verify kubeConfig secret and key
Ensure that the secret {{ .Release.Name }}-admin-kubeconfig exists in the kube-system namespace and that it contains a super-admin.svc data key—otherwise the HelmRelease will fail to reconcile.

• File: packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml
Lines 19-22

You can confirm this by running in your cluster environment:

kubectl get secret -n kube-system {{ .Release.Name }}-admin-kubeconfig \
  -o jsonpath='{.data.super-admin\.svc}'

Or inspect the entire secret with:

kubectl get secret -n kube-system {{ .Release.Name }}-admin-kubeconfig -o yaml

1-2:

❓ Verification inconclusive

Confirm HelmRelease API version
Ensure that your target cluster has the CRD for HelmRelease under helm.toolkit.fluxcd.io/v2. Some FluxCD installations ship with v2beta1 or v2alpha1. If your cluster does not recognize v2, you’ll need to align this to the supported apiVersion.


🏁 Script executed:

#!/bin/bash
# Verify that the HelmRelease CRD version exists
kubectl api-resources --api-group=helm.toolkit.fluxcd.io | grep -E '^helmreleases\s+v2\b'

Length of output: 189


Confirm HelmRelease API version compatibility in gateway-api.yaml
Ensure your cluster supports the helm.toolkit.fluxcd.io/v2 HelmRelease CRD. Many FluxCD installations default to v2beta1 or v2alpha1, so if v2 isn’t recognized, you’ll need to update this file to the supported version.

To verify on your cluster:

kubectl api-resources --api-group=helm.toolkit.fluxcd.io | grep '^helmreleases'

– If you don’t see a v2 entry, adjust lines 1–2 of
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml
from:

apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease

to the supported API version (e.g., helm.toolkit.fluxcd.io/v2beta1).

Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (1)

32-36: Fixed self-referential dependsOn block
This block currently creates a dependency on itself, which has no effect. To depend on the Cilium HelmRelease (named {{ .Release.Name }}-cilium), replace it as follows:

-  dependsOn:
-  {{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
-  - name: {{ .Release.Name }}
-    namespace: {{ .Release.Namespace }}
-  {{- end }}
+  dependsOn:
+    - name: {{ .Release.Name }}-cilium
+      namespace: {{ .Release.Namespace }}
🧹 Nitpick comments (3)
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (3)

1-4: Quote templating for valid YAML and suppress linter false positives
YAML linters (e.g., yamllint) will error on unquoted Go template scalars. Wrap templated values in quotes to maintain valid YAML syntax:

metadata:
-  name: {{ .Release.Name }}-gateway-api
+  name: "{{ .Release.Name }}-gateway-api"

You can apply the same quoting pattern to other templated fields or disable YAMLLint on this file if preferred.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 4-4: syntax error: expected , but found ''

(syntax)


23-24: Namespace selection for installation
Using kube-system for both targetNamespace and storageNamespace may introduce resource noise in the core namespace. Consider isolating the Gateway API resources in a dedicated namespace (e.g., cozy-system-networking) for clearer ownership and easier cleanup.


25-31: Reconsider unlimited retry strategy
Setting both install.remediation.retries and upgrade.remediation.retries to -1 allows infinite retries, which could mask persistent failures and lead to resource churn. You may want to use a finite retry count (e.g., 3 or 5) or add a timeout:

 install:
-  remediation:
-    retries: -1
+  remediation:
+    retries: 5
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b1fe4d9 and 62f823d.

📒 Files selected for processing (1)
  • packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml

[error] 4-4: syntax error: expected , but found ''

(syntax)

🔇 Additional comments (3)
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (3)

5-7: Labels correctly set
The cozystack.io/repository and cozystack.io/target-cluster-name labels follow the existing conventions and appear accurate.


9-18: Verify chart source configuration
The interval, releaseName, and chart.spec blocks look sound. Please confirm that:

  1. The HelmRepository named cozystack-system exists in the cozy-system namespace.
  2. The chart cozy-gateway-api at the referenced revision is available in that repository.

19-22: Confirm kubeconfig secret exists
You reference a secret named {{ .Release.Name }}-admin-kubeconfig with key super-admin.svc. Ensure this secret is provisioned before reconciliation to avoid deployment failures.

Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (1)

32-36: Remove self-dependency and fix indentation
This block creates a self-referential dependency (.Release.Name) which has no effect and introduces invalid YAML indentation. To depend on the Cilium HelmRelease instead, update as follows:

-spec:
-  dependsOn:
-  {{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
-  - name: {{ .Release.Name }}
-    namespace: {{ .Release.Namespace }}
-  {{- end }}
+spec:
+  dependsOn:
+  {{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace (printf "%s-cilium" .Release.Name) }}
+    - name: {{ printf "%s-cilium" .Release.Name }}
+      namespace: {{ .Release.Namespace }}
+  {{- end }}
🧹 Nitpick comments (3)
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (3)

9-10: Ensure dynamic Helm release naming
Currently you use a static releaseName: gateway-api. If you deploy multiple clusters or need to avoid name collisions, consider making this dynamic to match metadata.name:

-spec:
-  releaseName: gateway-api
+spec:
+  releaseName: {{ printf "%s-gateway-api" .Release.Name }}

11-18: Pin chart version and validate sourceRef

  • You’re relying on reconcileStrategy: Revision without specifying a version:. Adding a version constraint improves reproducibility:
        spec:
          chart: cozy-gateway-api
  •   version: <semver>
      reconcileStrategy: Revision
    
  • Verify that a HelmRepository named cozystack-system exists in the cozy-system namespace.

23-31: Consider namespace isolation for Gateway API
Deploying both control-plane and release artifacts into kube-system can blur system boundaries. You might:

  • Use a dedicated namespace (e.g., gateway-system 8000 ) for targetNamespace.
  • Revert storageNamespace to Flux’s default (flux-system) unless you have a specific reason to store Helm artifacts in kube-system.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 62f823d and 93fd98d.

📒 Files selected for processing (4)
  • packages/apps/kubernetes/templates/helmreleases/cilium.yaml (2 hunks)
  • packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (1 hunks)
  • packages/system/gateway-api/Chart.yaml (1 hunks)
  • packages/system/gateway-api/Makefile (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/apps/kubernetes/templates/helmreleases/cilium.yaml
  • packages/system/gateway-api/Chart.yaml
  • packages/system/gateway-api/Makefile
🧰 Additional context used
🪛 YAMLlint (1.35.1)
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml

[error] 4-4: syntax error: expected , but found ''

(syntax)

🔇 Additional comments (3)
packages/apps/kubernetes/templates/helmreleases/gateway-api.yaml (3)

1-3: Verify FluxCD API version compatibility
Ensure that apiVersion: helm.toolkit.fluxcd.io/v2 matches the FluxCD HelmRelease CRD installed in your cluster (e.g., some versions use v2beta1). A mismatch will cause CRD validation failures.


4-4: Ignore YAMLlint false positive on Go templates
The syntax error reported by YAMLlint at this line is due to Go templating delimiters ({{ … }}) and does not affect FluxCD rendering.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 4-4: syntax error: expected , but found ''

(syntax)


5-7: Label correctness
The labels cozystack.io/repository: system and cozystack.io/target-cluster-name: {{ .Release.Name }} are correctly spelled and namespaced.

@lllamnyp lllamnyp removed their assignment May 8, 2025
Copy link
Member
@kvaps kvaps left a comment

Choose a reason for hiding this comment

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

Thanks @zdenekjanda, can we add gatewayAPI option into values, to make this component optional?

8000
@zdenekjanda
Copy link
Contributor Author

All merged in, thanks for improvements it looks good now to me.

zdenekjanda and others added 2 commits May 8, 2025 12:18
Signed-off-by: Zdenek Deu Janda <zdenek.janda@cloudevelops.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@kvaps
Copy link
Member
kvaps commented May 8, 2025

@zdenekjanda many thanks for your contribution!
I bit refactored your change. LGTM!

Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/apps/kubernetes/templates/helmreleases/gateway-api-crds.yaml (2)

11-11: Consider using a dynamic releaseName.

Hardcoding releaseName: gateway-api-crds may conflict if multiple clusters share the same storage namespace. For consistency with metadata.name, consider:

-releaseName: gateway-api-crds
+releaseName: {{ .Release.Name }}-gateway-api-crds

33-37: Ensure dependsOn indentation is correct.

The dependsOn: block must have its list items properly indented in the rendered YAML (dependsOn: at one level, items two spaces deeper). Misalignment can cause the dependency to be ignored.

🛑 Comments failed to post (1)
packages/apps/kubernetes/templates/helmreleases/delete.yaml (1)

33-33: ⚠️ Potential issue

Missing RBAC permission for gateway-api-crds.

You added {{ .Release.Name }}-gateway-api-crds to the patch command, but the Role’s resourceNames list does not include it. Without that entry, the pre-delete hook cannot suspend this HelmRelease. Please update the Role to grant patch rights on {{ .Release.Name }}-gateway-api-crds.

Suggested diff:

--- a/packages/apps/kubernetes/templates/helmreleases/delete.yaml
+++ b/packages/apps/kubernetes/templates/helmreleases/delete.yaml
@@ resourceNames:
-        - {{ .Release.Name }}-cilium
+        - {{ .Release.Name }}-cilium
+        - {{ .Release.Name }}-gateway-api-crds
         - {{ .Release.Name }}-csi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

@@ resourceNames:
-        - {{ .Release.Name }}-cilium
+        - {{ .Release.Name }}-cilium
+        - {{ .Release.Name }}-gateway-api-crds
         - {{ .Release.Name }}-csi

@kvaps kvaps merged commit ae05d2f into cozystack:main May 8, 2025
1 of 2 checks passed
@kvaps kvaps mentioned this pull request May 8, 2025
lllamnyp pushed a commit that referenced this pull request May 20, 2025
Implementation of Cilium Gateway API

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added optional Gateway API addon for Kubernetes clusters, controlled
by a new configuration flag.
- Introduced automated deployment of Gateway API CRDs when the addon is
enabled.
- **Documentation**
- Updated documentation to describe the new Gateway API addon and its
configuration.
- **Chores**
- Added chart metadata and automation files for managing Gateway API
CRDs.
  - Updated chart version to reflect new features.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

(cherry picked from commit ae05d2f)
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
@lllamnyp lllamnyp mentioned this pull request May 20, 2025
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.

4 participants
0