Skip to content

[platform] Introduce expose-services, expose-ingress and expose-external-ips options - #197

Merged
Nick Volynkin (NickVolynkin) merged 1 commit into
mainfrom
expose-services
Jun 2, 2025
Merged

Nick Volynkin (NickVolynkin) merged 1 commit into
mainfrom
expose-services

Conversation

@kvaps

@kvaps Andrei Kvapil (kvaps) commented May 8, 2025 •

Copy link
Copy Markdown
Member

Wait until cozystack/cozystack#929 released

Summary by CodeRabbit

  • Documentation
    • Updated instructions for enabling dashboard and upload proxy access to use ConfigMap patches instead of modifying ingress resources.
    • Added and documented new configuration parameters: expose-services, expose-ingress, and expose-external-ips for service exposure and ingress setup.
    • Improved clarity and formatting in OIDC enabling instructions, noting automatic Keycloak exposure.
    • Enhanced FAQ and bundle documentation with examples and references for external IP and service exposure configuration.

@netlify

netlify Bot commented May 8, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit e5e31dc
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/683d5190a2783a00082d9587
😎 Deploy Preview https://deploy-preview-197--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented May 8, 2025 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

Nick Volynkin (@NickVolynkin) has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 22 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between efe15c5 and e5e31dc.

📒 Files selected for processing (6)
  • content/en/docs/getting-started/first-deployment.md (1 hunks)
  • content/en/docs/operations/bundles/paas-full.md (2 hunks)
  • content/en/docs/operations/bundles/paas-hosted.md (2 hunks)
  • content/en/docs/operations/faq.md (1 hunks)
  • content/en/docs/operations/oidc/enable_oidc.md (1 hunks)
  • content/en/docs/operations/virtualization/virtual-machines.md (1 hunks)

Walkthrough

The documentation was updated to change how services are exposed in Cozystack. Instructions were modified to use the cozystack ConfigMap for enabling and configuring exposed services, replacing previous methods involving direct ingress resource patches. New configuration parameters and clearer examples were added to relevant bundle and FAQ documentation.

Changes

File(s) Change Summary
content/en/docs/getting-started/first-deployment.md
content/en/docs/operations/virtualization/virtual-machines.md
Updated instructions to enable dashboard and upload proxy by patching the cozystack ConfigMap in the cozy-system namespace, replacing previous ingress resource patching steps.
content/en/docs/operations/bundles/paas-full.md
content/en/docs/operations/bundles/paas-hosted.md
Added and documented new configuration parameters: expose-services, expose-ingress, and expose-external-ips in example ConfigMaps and parameter tables. Provided guidance on exposing services and referenced the FAQ for additional help.
content/en/docs/operations/faq.md Extended ingress exposure instructions to include patching the cozystack ConfigMap with the expose-external-ips key, complementing existing ingress patching steps.
content/en/docs/operations/oidc/enable_oidc.md Clarified that enabling OIDC exposes Keycloak, reformatted the example ConfigMap patch command for readability, and added explanatory notes.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Cozystack ConfigMap
    participant Cozystack System

    User->>Cozystack ConfigMap: Patch ConfigMap (set expose-services / expose-external-ips)
    Cozystack ConfigMap-->>Cozystack System: Updated configuration detected
    Cozystack System-->>User: Exposes requested services (dashboard, uploadproxy, etc.) externally
Loading

Poem

A bunny hops through docs anew,
With ConfigMaps now in clearer view.
No more patching ingresses by hand—
Just set your services as you planned.
Expose, configure, hop along,
The system’s setup, swift and strong!
🐇✨


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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (5)
content/en/docs/operations/faq.md (1)

74-78: Use consistent patch flag style across docs.

Other guides use --type merge (with a space) rather than --type=merge. Consider standardizing on one format for clarity and to avoid confusion.

-kubectl patch -n cozy-system configmap cozystack --type=merge -p '{
+kubectl patch -n cozy-system configmap cozystack --type merge -p '{
   "data": {
     "expose-external-ips": "192.168.100.11,192.168.100.12,192.168.100.13"
   }
}'
content/en/docs/operations/virtualization/virtual-machines.md (1)

51-51: Clarify phrasing and resource naming.

Remove the extra comma and capitalize ConfigMap for consistency. For example:

@@ -51 +51
-1. Modify your cozystack config map, to enable cdi-uploadproxy along with the dashboard:
+1. Modify your Cozystack ConfigMap to enable `cdi-uploadproxy` along with the `dashboard`:
content/en/docs/operations/bundles/paas-hosted.md (1)

27-27: Illustrate all new exposure parameters in the example.

Consider expanding the example ConfigMap to include expose-ingress and expose-external-ips so users see all related options in context:

@@ -27 +27
-  expose-services: "api,dashboard"
+  expose-services: "api,dashboard"
+  expose-ingress: "tenant-root"
+  expose-external-ips: "<external-ip1>,<external-ip2>"
content/en/docs/operations/bundles/paas-full.md (2)

30-30: Include all new parameters in the example for consistency
The example ConfigMap shows expose-services, but omits expose-ingress and expose-external-ips. It’s helpful to illustrate all three new options with their defaults so users can copy/paste directly.

You might apply a diff like:

   expose-services: "api,dashboard,cdi-uploadproxy,vm-exportproxy"
+  expose-ingress: "tenant-root"
+  expose-external-ips: ""

48-51: Add missing comma for clarity in the table description
In the expose-external-ips row, add a comma after “If not specified” to improve readability:

-| `expose-external-ips` | Comma-separated list of external IPs used for specified ingress controller. If not specified it will use LoadBalancer service by default |
+| `expose-external-ips` | Comma-separated list of external IPs used for specified ingress controller. If not specified, it will use LoadBalancer service by default |
🧰 Tools
🪛 LanguageTool

[uncategorized] ~50-~50: Possible missing comma found.
Context: ...or specified ingress controller. If not specified it will use LoadBalancer service by def...

(AI_HYDRA_LEO_MISSING_COMMA)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 383e9c4 and efe15c5.

📒 Files selected for processing (6)
  • content/en/docs/getting-started/first-deployment.md (1 hunks)
  • content/en/docs/operations/bundles/paas-full.md (2 hunks)
  • content/en/docs/operations/bundles/paas-hosted.md (2 hunks)
  • content/en/docs/operations/faq.md (1 hunks)
  • content/en/docs/operations/oidc/enable_oidc.md (1 hunks)
  • content/en/docs/operations/virtualization/virtual-machines.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
content/en/docs/operations/bundles/paas-full.md

[uncategorized] ~50-~50: Possible missing comma found.
Context: ...or specified ingress controller. If not specified it will use LoadBalancer service by def...

(AI_HYDRA_LEO_MISSING_COMMA)

🔇 Additional comments (2)
content/en/docs/operations/bundles/paas-hosted.md (1)

43-45: Document new bundle options correctly.

The addition of expose-services, expose-ingress, and expose-external-ips in the parameters table is accurate and aligns with the new functionality.

content/en/docs/operations/bundles/paas-full.md (1)

52-52: Verify FAQ link and anchor
Ensure that the /docs/guides/faq/#bundles anchor exists and points to the correct section on generic bundle options.

Comment on lines +43 to +50
Edit your Cozystack ConfigMap to enable OIDC, this also will expose keycloak service automatically:

```bash
kubectl patch -n cozy-system configmap cozystack --type=merge -p '{"data":{"oidc-enabled": "true"}}'
kubectl patch -n cozy-system configmap cozystack --type=merge -p '{
"data": {
"oidc-enabled": "true",
}
}'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix invalid JSON and improve clarity.

The multi-line JSON passed to kubectl patch has a trailing comma after "oidc-enabled": "true", which makes it invalid. Also, a small grammar tweak can improve readability.

Apply this diff:

@@ -43 +43
-Edit your Cozystack ConfigMap to enable OIDC, this also will expose keycloak service automatically:
+Edit your Cozystack ConfigMap to enable OIDC; this will also expose the Keycloak service automatically:
@@ -46,5 +46,5 @@
-kubectl patch -n cozy-system configmap cozystack --type=merge -p '{
-  "data": {
-    "oidc-enabled": "true",
-  }
-}'
+kubectl patch -n cozy-system configmap cozystack --type=merge -p '{
+  "data": {
+    "oidc-enabled": "true"
+  }
+}'
📝 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.

Suggested change
Edit your Cozystack ConfigMap to enable OIDC, this also will expose keycloak service automatically:
```bash
kubectl patch -n cozy-system configmap cozystack --type=merge -p '{"data":{"oidc-enabled": "true"}}'
kubectl patch -n cozy-system configmap cozystack --type=merge -p '{
"data": {
"oidc-enabled": "true",
}
}'
Edit your Cozystack ConfigMap to enable OIDC; this will also expose the Keycloak service automatically:
🤖 Prompt for AI Agents
In content/en/docs/operations/oidc/enable_oidc.md around lines 43 to 50, fix the
invalid JSON in the kubectl patch command by removing the trailing comma after
"oidc-enabled": "true". Also, revise the sentence for better clarity and
grammar, ensuring it clearly states that enabling OIDC will automatically expose
the Keycloak service.

Andrei Kvapil (kvaps) added a commit to cozystack/cozystack that referenced this pull request May 15, 2025
…nal-ips options (#929)

docs update: cozystack/website#197

Signed-off-by: Andrei Kvapil <[email protected]>


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

## Summary by CodeRabbit

- **New Features**
- Added automated migration script to transition configuration from
HelmRelease to ConfigMap for service exposure and external IPs.
- Introduced new ingress templates for API, CDI upload proxy, and VM
export proxy services, enabling dynamic exposure based on centralized
configuration.

- **Bug Fixes**
  - Updated NGINX Ingress Controller Helm chart version to 1.6.0.

- **Refactor**
- Centralized ingress configuration using a ConfigMap, simplifying and
unifying service exposure and ingress class management.
- Removed legacy parameters and templates for dashboard, CDI upload
proxy, and VM export proxy from values and schema files.
- Simplified ingress templates for dashboard and Keycloak to rely on
centralized ConfigMap data and exposure lists.
- Adjusted ingress controller service to conditionally use external IPs
based on centralized configuration.

- **Documentation**
- Updated documentation to reflect the removal of deprecated parameters
and clarify current configuration options.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Timofei Larkin (lllamnyp) pushed a commit to cozystack/cozystack that referenced this pull request May 20, 2025
…nal-ips options (#929)

docs update: cozystack/website#197

Signed-off-by: Andrei Kvapil <[email protected]>

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

## Summary by CodeRabbit

- **New Features**
- Added automated migration script to transition configuration from
HelmRelease to ConfigMap for service exposure and external IPs.
- Introduced new ingress templates for API, CDI upload proxy, and VM
export proxy services, enabling dynamic exposure based on centralized
configuration.

- **Bug Fixes**
  - Updated NGINX Ingress Controller Helm chart version to 1.6.0.

- **Refactor**
- Centralized ingress configuration using a ConfigMap, simplifying and
unifying service exposure and ingress class management.
- Removed legacy parameters and templates for dashboard, CDI upload
proxy, and VM export proxy from values and schema files.
- Simplified ingress templates for dashboard and Keycloak to rely on
centralized ConfigMap data and exposure lists.
- Adjusted ingress controller service to conditionally use external IPs
based on centralized configuration.

- **Documentation**
- Updated documentation to reflect the removal of deprecated parameters
and clarify current configuration options.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

(cherry picked from commit f8210cf)
Signed-off-by: Timofei Larkin <[email protected]>
@NickVolynkin
Nick Volynkin (NickVolynkin) deleted the expose-services branch June 2, 2025 07:24
Aleksei Sviridkin (lexfrei) added a commit to lexfrei/cozystack-website that referenced this pull request May 13, 2026
The talm template example invoked the shorthand -n IP, which is
no longer registered as of cozystack/talm v0.28.0 (PR cozystack#197). Without
this fix the documented bootstrap golden path errors out at parse
time with 'flag -n not defined'. Long form --nodes IP is the
permanent replacement.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
myasnikovdaniil pushed a commit to lexfrei/cozystack-website that referenced this pull request May 18, 2026
The talm template example invoked the shorthand -n IP, which is
no longer registered as of cozystack/talm v0.28.0 (PR cozystack#197). Without
this fix the documented bootstrap golden path errors out at parse
time with 'flag -n not defined'. Long form --nodes IP is the
permanent replacement.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
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.

2 participants