-
Notifications
You must be signed in to change notification settings - Fork 103
[kubernetes] fix regression: return port specification #956
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
Conversation
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
WalkthroughThe change updates the Kubernetes cluster template to append the port Changes
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit 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 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
📜 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
📒 Files selected for processing (1)
packages/apps/kubernetes/templates/cluster.yaml
(1 hunks)
@@ -150,7 +150,7 @@ spec: | |||
ingress: | |||
extraAnnotations: | |||
nginx.ingress.kubernetes.io/ssl-passthrough: "true" | |||
hostname: {{ .Values.host | default (printf "%s.%s" .Release.Name $host) }} | |||
hostname: {{ .Values.host | default (printf "%s.%s" .Release.Name $host) }}:443 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
❓ Verification inconclusive
Quote and parameterize the ingress hostname port
Hard-coding :443
directly on the template may cause two issues:
- Hostnames containing a colon can be misinterpreted by the YAML parser if unquoted.
- Users who override
.Values.host
with a value that already includes a port will end up with duplicate port suffixes (e.g.my.example.com:8443:443
).
Please consider:
- Wrapping the entire string in quotes to ensure valid YAML.
- Making the port configurable via
values.yaml
with a sensible default.
For example:
- hostname: {{ .Values.host | default (printf "%s.%s" .Release.Name $host) }}:443
+ hostname: "{{ .Values.host | default (printf "%s.%s" .Release.Name $host) }}:{{ .Values.ingress.port | default 443 }}"
And in values.yaml
:
ingress:
# Default HTTPS port; can be overridden per-release
port: 443
This change ensures proper quoting, avoids YAML parsing edge cases, and gives users flexibility to choose a different port if needed.
Please verify existing overrides and update documentation accordingly.
Quote and parameterize the ingress hostname port
Wrap the hostname mapping in double quotes and extract the hard-coded :443
into a configurable value:
• packages/apps/kubernetes/templates/cluster.yaml (around line 153)
- hostname: {{ .Values.host | default (printf "%s.%s" .Release.Name $host) }}:443
+ hostname: "{{ .Values.host | default (printf "%s.%s" .Release.Name $host) }}:{{ .Values.ingress.port | default 443 }}"
• values.yaml
ingress:
# Default HTTPS port; can be overridden per-release
port: 443
This change ensures:
- YAML remains valid when hostnames include colons
- You won’t end up with
my.example.com:8443:443
if.Values.host
already includes a port - Users can override the port without editing the template
Please update any existing overrides or documentation to reference ingress.port
.
🤖 Prompt for AI Agents
In packages/apps/kubernetes/templates/cluster.yaml at line 153, the hostname
with a hard-coded port :443 is not quoted and the port is fixed, which can cause
YAML parsing issues and duplicate ports if the host already includes one. To fix
this, wrap the entire hostname expression in double quotes and replace the
hard-coded :443 with a configurable port value from values.yaml, for example,
.Values.ingress.port with a default of 443. Also, update values.yaml to include
ingress.port with a default of 443 and ensure any existing overrides or
documentation reference this new port configuration.
This PR fixes regression from #867 We have updated Kamaji, removed workaround, but didn't return the port specification Signed-off-by: Andrei Kvapil <kvapss@gmail.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Updated network configuration to explicitly include port 443 in hostnames for ingress. <!-- end of auto-generated comment: release notes by coderabbit.ai --> (cherry picked from commit fb26e3e) Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
This PR fixes regression from #867
We have updated Kamaji, removed workaround, but didn't return the port specification
Signed-off-by: Andrei Kvapil kvapss@gmail.com
Summary by CodeRabbit