Skip to content

Introduce helm charts for WSO2 Integrator: WebSubHub#1

Open
ayeshLK wants to merge 23 commits into
wso2:mainfrom
ayeshLK:main
Open

Introduce helm charts for WSO2 Integrator: WebSubHub#1
ayeshLK wants to merge 23 commits into
wso2:mainfrom
ayeshLK:main

Conversation

@ayeshLK

@ayeshLK ayeshLK commented Dec 23, 2025

Copy link
Copy Markdown

Purpose

$subject

Part of: wso2/product-integrator-websubhub#3

Summary by CodeRabbit

  • New Features

    • Added Helm charts for deploying WebSubHub and WebSubHub Consolidator services with comprehensive Kubernetes deployment manifests, including containerized service configurations, health monitoring probes, ingress routing setup, and templated configuration management for state snapshots and event streaming integration.
  • Chores

    • Added repository configuration files for code ownership definitions and macOS-specific development file exclusions.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 23, 2025

Copy link
Copy Markdown

Walkthrough

Introduces Helm chart configurations for websubhub and websubhub-consolidator components with deployment templates, service definitions, ConfigMap templates, and configuration files. Adds repository-wide code ownership and macOS-specific git ignore entries.

Changes

Cohort / File(s) Summary
Repository Configuration
.github/CODEOWNERS, .gitignore
Added default code owners (@ayeshLK and @anupama-pathirage) for all repository paths; added macOS-specific ignore patterns (.DS_Store).
websubhub-consolidator Helm Chart
distribution/websubhub-consolidator/Chart.yaml, distribution/websubhub-consolidator/values.yaml, distribution/websubhub-consolidator/confs/Config.toml
Introduced Helm chart metadata, values configuration with deployment/image settings, and TOML configuration template for server, state (snapshot/events), Solace store, and logging.
websubhub-consolidator Kubernetes Templates
distribution/websubhub-consolidator/templates/conf.yaml, distribution/websubhub-consolidator/templates/deployment.yaml, distribution/websubhub-consolidator/templates/service.yaml
Added ConfigMap template for configuration, Kubernetes Deployment with liveness/readiness probes and volume mounts, and ClusterIP Service template.
websubhub Helm Chart
distribution/websubhub/Chart.yaml, distribution/websubhub/values.yaml, distribution/websubhub/confs/Config.toml
Introduced Helm chart metadata, values configuration with deployment/image/resource settings, and TOML configuration template for server, state, store, delivery retry logic, and logging.
websubhub Kubernetes Templates
distribution/websubhub/templates/conf.yaml, distribution/websubhub/templates/ingress.yaml, distribution/websubhub/templates/service.yaml, distribution/websubhub/templates/statefulset.yaml
Added ConfigMap template, Ingress with traefik ingress class routing to websubhub.dev, ClusterIP Service, and StatefulSet with health checks, resource constraints, and environment variable configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A rabbit hops through Helm charts neat,
Charts and values, quite a treat!
Consolidators and webs unite,
Kubernetes manifests burning bright! 🚀

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete. Only the Purpose section is minimally addressed with a placeholder; all other required sections (Goals, Approach, User stories, Release note, Documentation, Training, Certification, Marketing, Automation tests, Security checks, Samples, Related PRs, Migrations, Test environment, Learning) are entirely missing. Complete the PR description by filling in all required template sections: Goals, Approach, User stories, Release note, Documentation, Training, Certification, Marketing, Automation tests, Security checks, Samples, Related PRs, Migrations, Test environment, and Learning. Use the template structure provided in the repository.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: introducing Helm charts for WSO2 Integrator's WebSubHub component, which matches the file additions across distribution directories.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@ayeshLK
ayeshLK marked this pull request as draft December 23, 2025 05:28

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 14

🧹 Nitpick comments (5)
distributed/websubhub/templates/service.yaml (1)

27-30: Consider adding a name to the service port.

Adding a name field to the port definition improves clarity and is beneficial for service mesh integrations (like Istio) and monitoring tools that reference ports by name.

🔎 Proposed enhancement
   ports:
     - protocol: TCP
+      name: http
       port: {{ .Values.deployment.config.server.port }}
       targetPort: {{ .Values.deployment.config.server.port }}
distributed/websubhub-consolidator/templates/service.yaml (1)

27-30: Consider adding a name to the service port.

Adding a name field enhances clarity and supports service mesh integrations and monitoring tools.

🔎 Proposed enhancement
   ports:
     - protocol: TCP
+      name: http
       port: {{ .Values.deployment.config.server.port }}
       targetPort: {{ .Values.deployment.config.server.port }}
distributed/websubhub-consolidator/values.yaml (1)

19-19: Consider parameterizing environment-specific URLs.

The Solace connection URLs (tcp://solace-pubsubplus-dev:55555 and http://solace-pubsubplus-dev:8080/SEMP/v2/config) contain environment-specific hostnames. Consider documenting that these must be overridden for production deployments, or provide environment-specific value files.

Also applies to: 27-27

distributed/websubhub/values.yaml (1)

26-26: Hard-coded development environment URLs.

The Solace URLs contain "-dev" suffix and are hard-coded. For production deployments, these should be configurable or use environment-specific values files.

Also applies to: 34-34

distributed/websubhub/confs/Config.toml (1)

3-3: Consider using SERVER_ID environment variable for dynamic pod identification.

The server.id is templated from values, which is hard-coded as "websubhub-1". For a StatefulSet with multiple replicas, consider reading from the SERVER_ID environment variable (already set in statefulset.yaml line 69) to ensure each pod has a unique identifier.

This relates to the hard-coded server.id issue in values.yaml.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52cb055 and 24e9b4f.

📒 Files selected for processing (16)
  • .github/CODEOWNERS
  • .github/issue_template.md
  • .github/pull_request_template.md
  • .gitignore
  • distributed/websubhub-consolidator/Chart.yaml
  • distributed/websubhub-consolidator/confs/Config.toml
  • distributed/websubhub-consolidator/templates/conf.yaml
  • distributed/websubhub-consolidator/templates/deployment.yaml
  • distributed/websubhub-consolidator/templates/service.yaml
  • distributed/websubhub-consolidator/values.yaml
  • distributed/websubhub/Chart.yaml
  • distributed/websubhub/confs/Config.toml
  • distributed/websubhub/templates/conf.yaml
  • distributed/websubhub/templates/service.yaml
  • distributed/websubhub/templates/statefulset.yaml
  • distributed/websubhub/values.yaml
🧰 Additional context used
🪛 YAMLlint (1.37.1)
distributed/websubhub/templates/statefulset.yaml

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

(syntax)

distributed/websubhub/templates/service.yaml

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

(syntax)

distributed/websubhub-consolidator/templates/service.yaml

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

(syntax)

distributed/websubhub-consolidator/templates/deployment.yaml

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

(syntax)

🔇 Additional comments (6)
.gitignore (1)

25-27: Well-placed addition of macOS-specific ignore patterns.

The addition of .DS_Store (and the comment header) is appropriate for cross-platform development. .DS_Store is a standard macOS metadata file that should never be committed, and excluding it prevents accidental pollution of the repository on macOS systems.

.github/CODEOWNERS (1)

1-7: LGTM!

The CODEOWNERS file is correctly formatted with proper syntax and helpful comments. The default ownership rule assigns both maintainers to all repository paths, which is appropriate for a new Helm charts repository.

distributed/websubhub-consolidator/confs/Config.toml (2)

15-16: Credentials are sourced from values.yaml.

These auth configuration lines reference .Values.deployment.config.store.solace.auth.username and .Values.deployment.config.store.solace.auth.password. Ensure the critical security issue in values.yaml (hardcoded credentials) is addressed. Once values.yaml uses Secrets, this template should be updated to inject credentials securely (e.g., via environment variables or mounted Secrets).

Also applies to: 24-25


1-28: LGTM: Helm templating in TOML is correct.

The use of Helm templating within the TOML configuration file is appropriate. The tpl function in conf.yaml will correctly process these templates at render time.

distributed/websubhub/templates/statefulset.yaml (1)

22-22: Static analysis false positive - Helm templating is valid.

The YAMLlint syntax error is a false positive. Helm template expressions like {{ .Release.Name }} are valid and will be rendered before the YAML is applied to Kubernetes. You can safely ignore this linting error or configure YAMLlint to skip Helm template files.

distributed/websubhub-consolidator/templates/deployment.yaml (1)

22-22: Static analysis false positive - Helm templating is valid.

The YAMLlint syntax error is a false positive. Helm template expressions are valid and rendered before YAML is applied to Kubernetes. This can be safely ignored or YAMLlint can be configured to skip Helm templates.

Comment on lines +1 to +10
# -------------------------------------------------------------------------------------
#
# Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). All Rights Reserved.
#
# This software is the property of WSO2 LLC. and its suppliers, if any.
# Dissemination of any information or reproduction of any material contained
# herein is strictly forbidden, unless permitted by WSO2 in accordance with the
# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2
#
# --------------------------------------------------------------------------------------

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

License inconsistency across chart files.

The Chart.yaml uses the WSO2 Commercial License (EULA 3.2), while template files use Apache License 2.0. Ensure consistent licensing across all chart files.

🤖 Prompt for AI Agents
In distributed/websubhub-consolidator/Chart.yaml lines 1-10, the file header
declares the WSO2 Commercial License (EULA 3.2) while other chart/template files
use Apache-2.0; update Chart.yaml to use the same license text and metadata as
the other charts (replace the WSO2 EULA header with the Apache License 2.0
header and ensure the "license" or "annotations" fields in Chart.yaml reflect
Apache-2.0) so all chart files consistently declare Apache-2.0.

#
# --------------------------------------------------------------------------------------

apiVersion: v1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Update to Helm 3 apiVersion.

The chart uses apiVersion: v1 (Helm 2 format). Use apiVersion: v2 for Helm 3 compatibility and to access features like dependencies.

🔎 Proposed fix
-apiVersion: v1
+apiVersion: v2
📝 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
apiVersion: v1
apiVersion: v2
🤖 Prompt for AI Agents
In distributed/websubhub-consolidator/Chart.yaml around line 12, the chart
declares apiVersion: v1 (Helm 2 format); update it to apiVersion: v2 to be Helm
3 compatible and enable Helm 3 features such as dependencies. Edit the
Chart.yaml to replace the apiVersion value from v1 to v2 and verify the chart
still validates with helm lint and installs with Helm 3.

apiVersion: v1
kind: ConfigMap
metadata:
name: websubhub-consolidator-svc-cm

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Use Release.Name in ConfigMap name for uniqueness.

The hardcoded ConfigMap name websubhub-consolidator-svc-cm prevents multiple releases in the same namespace. Use {{ .Release.Name }}-cm to ensure uniqueness across releases.

🔎 Proposed fix
-  name: websubhub-consolidator-svc-cm
+  name: {{ .Release.Name }}-cm

Note: Update any references to this ConfigMap in Deployment/StatefulSet templates to use the same naming pattern.

🤖 Prompt for AI Agents
In distributed/websubhub-consolidator/templates/conf.yaml around line 22, the
ConfigMap name is hardcoded as "websubhub-consolidator-svc-cm", which prevents
deploying multiple releases in the same namespace; change the name to use the
Helm release name template (e.g. "{{ .Release.Name }}-cm") for uniqueness and
update any Deployment/StatefulSet or other template references to the same
templated name so they point to the renamed ConfigMap.

Comment on lines +36 to +66
- name: {{ .Release.Name }}
image: {{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}
imagePullPolicy: {{ .Values.deployment.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.deployment.config.server.port }}
livenessProbe:
httpGet:
path: /health/liveness
port: http
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /health/readiness
port: http
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
env:
- name: "BAL_CONFIG_FILES"
value: "/home/wso2/conf/Config.toml"
volumeMounts:
- name: "config-config-map-volume"
mountPath: "/home/wso2/conf"
readOnly: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Missing resource limits and requests.

Unlike the websubhub StatefulSet, this Deployment has no resource specifications defined (not even commented). For production deployments, resource limits are essential for cluster stability and proper scheduling.

🔎 Add resources block

Add resource specifications to values.yaml for the consolidator:

deployment:
  resources:
    requests:
      cpu: "500m"
      memory: "512Mi"
    limits:
      cpu: "1"
      memory: "1Gi"

Then reference in the Deployment template after line 66:

          resources:
            requests:
              cpu: {{ .Values.deployment.resources.requests.cpu }}
              memory: {{ .Values.deployment.resources.requests.memory }}
            limits:
              cpu: {{ .Values.deployment.resources.limits.cpu }}
              memory: {{ .Values.deployment.resources.limits.memory }}
🤖 Prompt for AI Agents
distributed/websubhub-consolidator/templates/deployment.yaml lines 36-66: The
Deployment is missing resource requests/limits which are required for production
scheduling and cluster stability; add a deployment.resources section to
values.yaml (example keys: requests.cpu, requests.memory, limits.cpu,
limits.memory with values like "500m"/"512Mi" and "1"/"1Gi") and then insert a
resources block into this Deployment template immediately after line 66 using
those Helm values (map requests and limits to
.Values.deployment.resources.requests.* and
.Values.deployment.resources.limits.*), ensuring the template renders correctly
when values are provided.

volumes:
- name: "config-config-map-volume"
configMap:
name: "websubhub-consolidator-svc-cm"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Hard-coded ConfigMap name should use Helm templating.

The ConfigMap name "websubhub-consolidator-svc-cm" is hard-coded, preventing chart reusability. Use {{ .Release.Name }}-config or a similar pattern for consistency with Helm best practices.

🔎 Use templated ConfigMap name
           configMap:
-            name: "websubhub-consolidator-svc-cm"
+            name: "{{ .Release.Name }}-config"

Ensure the ConfigMap template uses the same naming convention.

🤖 Prompt for AI Agents
In distributed/websubhub-consolidator/templates/deployment.yaml around line 71,
the ConfigMap name is hard-coded as "websubhub-consolidator-svc-cm"; change it
to use Helm templating (for example {{ .Release.Name }}-config or {{ include
"chart.fullname" . }}-config) so the chart is reusable, and update any other
references in this template (volumes, envFrom, etc.) to use the exact same
template expression to keep names consistent.

apiVersion: v1
kind: ConfigMap
metadata:
name: websubhub-svc-cm

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Use Release.Name in ConfigMap name for uniqueness.

The hardcoded ConfigMap name websubhub-svc-cm will cause conflicts if multiple releases of this chart are deployed in the same namespace. Use {{ .Release.Name }}-cm to ensure uniqueness.

🔎 Proposed fix
-  name: websubhub-svc-cm
+  name: {{ .Release.Name }}-cm

Note: Ensure that any references to this ConfigMap in StatefulSet/Deployment templates are also updated to use the same naming pattern.

📝 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
name: websubhub-svc-cm
name: {{ .Release.Name }}-cm
🤖 Prompt for AI Agents
In distributed/websubhub/templates/conf.yaml around line 22, the ConfigMap name
is hardcoded as "websubhub-svc-cm" which can collide across releases; change it
to use the release name (e.g. "{{ .Release.Name }}-cm") so each release gets a
unique ConfigMap name, and update any StatefulSet/Deployment/other templates
that reference this ConfigMap to use the same "{{ .Release.Name }}-cm" pattern
so references remain consistent.

Comment thread distribution/websubhub/templates/statefulset.yaml Outdated
volumes:
- name: "config-config-map-volume"
configMap:
name: "websubhub-svc-cm"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Hard-coded ConfigMap name should use Helm templating.

The ConfigMap name "websubhub-svc-cm" is hard-coded. This prevents chart reusability and could cause conflicts when installing multiple releases. Use {{ .Release.Name }}-config or similar pattern.

🔎 Use templated ConfigMap name
           configMap:
-            name: "websubhub-svc-cm"
+            name: "{{ .Release.Name }}-config"

Note: You'll also need to update the ConfigMap template (templates/conf.yaml) to use the same naming convention.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In distributed/websubhub/templates/statefulset.yaml around line 83, the
ConfigMap name is hard-coded as "websubhub-svc-cm"; replace it with a Helm
template expression (for example {{ .Release.Name }}-config or the chart's
defined name template) so the release-specific name is used, and update the
ConfigMap resource template (templates/conf.yaml) to emit the exact same
templated name to keep references consistent across the chart.

Comment thread distribution/websubhub/values.yaml Outdated
config:
server:
port: 9000
id: "websubhub-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.

⚠️ Potential issue | 🟠 Major

Hard-coded server ID conflicts with StatefulSet replicas.

The server.id is hard-coded as "websubhub-1", but the deployment uses 2 replicas (line 2). In a StatefulSet, each pod should have a unique identifier. Consider removing this from values and relying on the SERVER_ID environment variable (set from metadata.name in statefulset.yaml line 69-72) instead.

🔎 Suggested approach

Remove the hard-coded id from values.yaml and update Config.toml to use the SERVER_ID environment variable, or make it a template that generates unique IDs per replica.

🤖 Prompt for AI Agents
In distributed/websubhub/values.yaml around line 17, the server id is hard-coded
as "websubhub-1" which will collide with StatefulSet replicas; remove this
hard-coded id from values.yaml and update Config.toml (or its template) to read
SERVER_ID from the environment (or use a Helm template that derives a unique id
per replica) so each pod gets a unique server.id supplied by the statefulset
metadata.name-based SERVER_ID env var referenced in statefulset.yaml lines
~69-72.

Comment on lines +29 to +30
username: "admin"
password: "password"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Credentials should use Kubernetes Secrets, not plaintext values.

Hard-coded credentials in values files are a security risk. These should reference Kubernetes Secrets instead, especially for production deployments.

🔎 Recommended approach
  1. Create a Secret object in a separate template (e.g., templates/secret.yaml)
  2. Reference the secret in the StatefulSet via valueFrom.secretKeyRef
  3. Update Config.toml template to read from environment variables instead of directly from values

Example Secret reference in StatefulSet:

env:
  - name: SOLACE_USERNAME
    valueFrom:
      secretKeyRef:
        name: websubhub-solace-credentials
        key: username
  - name: SOLACE_PASSWORD
    valueFrom:
      secretKeyRef:
        name: websubhub-solace-credentials
        key: password

Also applies to: 37-38

🤖 Prompt for AI Agents
In distributed/websubhub/values.yaml around lines 29-30 (and similarly lines
37-38) the chart currently exposes plaintext credentials; replace this by
creating a templates/secret.yaml that contains the username/password as a
Kubernetes Secret, remove the hard-coded username/password from values.yaml (or
replace them with a secret name reference), update the StatefulSet/Deployment
template to populate env vars using valueFrom.secretKeyRef (pointing to the new
secret and keys), and modify the Config.toml template to read credentials from
those environment variables instead of embedding values directly.

@ayeshLK
ayeshLK marked this pull request as ready for review January 7, 2026 19:25

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In @distribution/websubhub-consolidator/confs/Config.toml:
- Around line 24-25: The Config.toml currently injects admin credentials
directly via auth.username and auth.password using {{
.Values.deployment.config.store.solace.admin.auth.username }}; move these into
Kubernetes Secrets and reference them via environment variables instead. Update
the Helm chart to create or reference a Secret containing the admin
username/password (from .Values.deployment.secrets or similar), inject them into
the Pod spec as env vars using secretKeyRef, and change the Config.toml template
to read auth.username and auth.password from those env vars (or render via
tpl/envsubst at deploy time) so no admin credentials are directly templated into
the ConfigMap.
- Around line 15-16: The Config.toml currently inlines credentials via
auth.username and auth.password; move these values into a Kubernetes Secret
(e.g., {{ .Release.Name }}-solace-credentials with keys auth-username and
auth-password), update the Deployment to inject them as environment variables
(e.g., SOLACE_AUTH_USERNAME and SOLACE_AUTH_PASSWORD via secretKeyRef), and
modify Config.toml (or the app’s config loader) to read auth.username and
auth.password from those environment variables instead of templated values.

In @distribution/websubhub/confs/Config.toml:
- Around line 23-24: The Config.toml currently injects admin credentials
directly into auth.username and auth.password; instead create a Kubernetes
Secret containing the Solace admin credentials (e.g., keys solace-admin-username
and solace-admin-password), update the Helm charts/manifests to populate
container environment variables (e.g., SOLACE_ADMIN_USERNAME and
SOLACE_ADMIN_PASSWORD) from that Secret, and change Config.toml to read those
values from environment variables rather than templating the raw values into
auth.username and auth.password; also ensure any existing references to the
templated values are removed and deployments/statefulsets use envFrom or env
entries to source the Secret.

In @distribution/websubhub/templates/ingress.yaml:
- Around line 18-20: Replace hardcoded ingressClassName and host in the Ingress
template with values-driven keys and add TLS and annotations support: read
ingress.className -> replace ingressClassName, ingress.host -> replace host
under rules, ingress.annotations -> add to metadata.annotations, and if
ingress.tls.enabled is true emit a tls section referencing
ingress.tls.secretName; ensure the template honors ingress.enabled so the
resource is only created when enabled and document the new values.yaml keys
(ingress.enabled, className, host, tls.enabled, tls.secretName, annotations).
🧹 Nitpick comments (5)
distribution/websubhub/templates/conf.yaml (1)

23-23: Remove extra space before colon.

Line 23 has an extra space before the colon in namespace :. Standard YAML formatting uses no space before colons.

♻️ Proposed fix
-  namespace : {{ .Release.Namespace }}
+  namespace: {{ .Release.Namespace }}
distribution/websubhub-consolidator/templates/service.yaml (1)

27-30: Consider adding a name to the service port.

While optional, naming service ports is a Kubernetes best practice that improves clarity for service discovery, debugging, and when multiple ports are exposed.

♻️ Proposed fix
   ports:
     - protocol: TCP
+      name: http
       port: {{ .Values.deployment.config.server.port }}
       targetPort: {{ .Values.deployment.config.server.port }}
distribution/websubhub/templates/service.yaml (1)

27-30: Consider adding a name to the service port.

While optional, naming service ports is a Kubernetes best practice that improves clarity for service discovery, debugging, and when multiple ports are exposed.

♻️ Proposed fix
   ports:
     - protocol: TCP
+      name: http
       port: {{ .Values.deployment.config.server.port }}
       targetPort: {{ .Values.deployment.config.server.port }}
distribution/websubhub-consolidator/templates/conf.yaml (1)

23-23: Remove extra space before colon.

Line 23 has an extra space before the colon in namespace :. Standard YAML formatting uses no space before colons.

♻️ Proposed fix
-  namespace : {{ .Release.Namespace }}
+  namespace: {{ .Release.Namespace }}
distribution/websubhub/confs/Config.toml (1)

34-34: Consider simplifying array templating.

The inline range logic for statusCodes is correct but complex. Consider using a more readable approach if TOML parsing supports JSON arrays.

Alternative approach

If the TOML parser supports it:

-statusCodes = [{{ range $index, $code := .Values.deployment.config.delivery.retry.statusCodes }}{{if $index}}, {{end}}{{ $code }}{{end}}]
+statusCodes = {{ .Values.deployment.config.delivery.retry.statusCodes | toJson }}

Otherwise, the current implementation is acceptable.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 24e9b4f and 32d120d.

📒 Files selected for processing (13)
  • distribution/websubhub-consolidator/Chart.yaml
  • distribution/websubhub-consolidator/confs/Config.toml
  • distribution/websubhub-consolidator/templates/conf.yaml
  • distribution/websubhub-consolidator/templates/deployment.yaml
  • distribution/websubhub-consolidator/templates/service.yaml
  • distribution/websubhub-consolidator/values.yaml
  • distribution/websubhub/Chart.yaml
  • distribution/websubhub/confs/Config.toml
  • distribution/websubhub/templates/conf.yaml
  • distribution/websubhub/templates/ingress.yaml
  • distribution/websubhub/templates/service.yaml
  • distribution/websubhub/templates/statefulset.yaml
  • distribution/websubhub/values.yaml
✅ Files skipped from review due to trivial changes (3)
  • distribution/websubhub-consolidator/values.yaml
  • distribution/websubhub/Chart.yaml
  • distribution/websubhub-consolidator/Chart.yaml
🧰 Additional context used
🪛 YAMLlint (1.37.1)
distribution/websubhub-consolidator/templates/deployment.yaml

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

(syntax)

distribution/websubhub/templates/service.yaml

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

(syntax)

distribution/websubhub/templates/conf.yaml

[warning] 23-23: too many spaces before colon

(colons)


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

(syntax)

distribution/websubhub/templates/statefulset.yaml

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

(syntax)

distribution/websubhub/templates/ingress.yaml

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

(syntax)

distribution/websubhub-consolidator/templates/conf.yaml

[warning] 23-23: too many spaces before colon

(colons)


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

(syntax)

distribution/websubhub-consolidator/templates/service.yaml

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

(syntax)

🔇 Additional comments (7)
distribution/websubhub/values.yaml (2)

17-17: Verify the use of a pre-release image tag.

The image tag 1.0.0-M1-RC6 appears to be a milestone release candidate. Ensure this pre-release version is intentional and appropriate for your deployment environment.


1-10: Verify license header inconsistency.

The values.yaml file uses the WSO2 Commercial License header, while the template files (conf.yaml, service.yaml) use Apache License 2.0. Confirm this licensing difference is intentional.

distribution/websubhub-consolidator/templates/deployment.yaml (2)

60-71: LGTM: Configuration management properly implemented.

The environment variable and volume mount configuration correctly wires the ConfigMap to the application's expected configuration path.


36-66: Missing resource limits and requests.

The Deployment lacks resource specifications, which are essential for production deployments to ensure cluster stability and proper pod scheduling.

Likely an incorrect or invalid review comment.

distribution/websubhub/templates/statefulset.yaml (2)

61-67: Resource limits are now properly configured.

The resource requests and limits are correctly implemented and uncommented. This resolves the concern from the previous review.

Note: The past review comment indicated these were commented out, but they are now active in the current code.


68-83: LGTM: StatefulSet configuration properly implemented.

The environment variables and volume configuration are correctly set up. Using metadata.name for SERVER_ID is appropriate for StatefulSet pod identity tracking.

distribution/websubhub/confs/Config.toml (1)

14-15: Credentials should use Kubernetes Secrets and environment variables.

Credentials are currently templated into the ConfigMap, which is not secure. Move these to Kubernetes Secrets and reference them via environment variables instead.

Likely an incorrect or invalid review comment.

Comment on lines +15 to +16
auth.username = "{{ .Values.deployment.config.store.solace.auth.username }}"
auth.password = "{{ .Values.deployment.config.store.solace.auth.password }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Credentials should use Kubernetes Secrets and environment variables.

Authentication credentials are templated directly into the ConfigMap, exposing them in plain text. Move credentials to Kubernetes Secrets and reference them via environment variables in the Deployment template.

🔐 Recommended approach
  1. Create a Secret in the Helm chart:
apiVersion: v1
kind: Secret
metadata:
  name: {{ .Release.Name }}-solace-credentials
type: Opaque
stringData:
  auth-username: {{ .Values.deployment.config.store.solace.auth.username }}
  auth-password: {{ .Values.deployment.config.store.solace.auth.password }}
  1. Update the Deployment to inject env vars from the Secret:
env:
  - name: SOLACE_AUTH_USERNAME
    valueFrom:
      secretKeyRef:
        name: {{ .Release.Name }}-solace-credentials
        key: auth-username
  - name: SOLACE_AUTH_PASSWORD
    valueFrom:
      secretKeyRef:
        name: {{ .Release.Name }}-solace-credentials
        key: auth-password
  1. Update Config.toml to read from environment variables (syntax depends on application framework).
🤖 Prompt for AI Agents
In @distribution/websubhub-consolidator/confs/Config.toml around lines 15 - 16,
The Config.toml currently inlines credentials via auth.username and
auth.password; move these values into a Kubernetes Secret (e.g., {{
.Release.Name }}-solace-credentials with keys auth-username and auth-password),
update the Deployment to inject them as environment variables (e.g.,
SOLACE_AUTH_USERNAME and SOLACE_AUTH_PASSWORD via secretKeyRef), and modify
Config.toml (or the app’s config loader) to read auth.username and auth.password
from those environment variables instead of templated values.

Comment on lines +24 to +25
auth.username = "{{ .Values.deployment.config.store.solace.admin.auth.username }}"
auth.password = "{{ .Values.deployment.config.store.solace.admin.auth.password }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Admin credentials should use Kubernetes Secrets and environment variables.

Admin authentication credentials are templated into the ConfigMap. Apply the same Secret-based approach as recommended for the regular auth credentials.

🤖 Prompt for AI Agents
In @distribution/websubhub-consolidator/confs/Config.toml around lines 24 - 25,
The Config.toml currently injects admin credentials directly via auth.username
and auth.password using {{
.Values.deployment.config.store.solace.admin.auth.username }}; move these into
Kubernetes Secrets and reference them via environment variables instead. Update
the Helm chart to create or reference a Secret containing the admin
username/password (from .Values.deployment.secrets or similar), inject them into
the Pod spec as env vars using secretKeyRef, and change the Config.toml template
to read auth.username and auth.password from those env vars (or render via
tpl/envsubst at deploy time) so no admin credentials are directly templated into
the ConfigMap.

Comment on lines +23 to +24
auth.username = "{{ .Values.deployment.config.store.solace.admin.auth.username }}"
auth.password = "{{ .Values.deployment.config.store.solace.admin.auth.password }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Admin credentials should use Kubernetes Secrets and environment variables.

Admin credentials are currently templated into the ConfigMap. Move these to Kubernetes Secrets and reference them via environment variables for better security.

🤖 Prompt for AI Agents
In @distribution/websubhub/confs/Config.toml around lines 23 - 24, The
Config.toml currently injects admin credentials directly into auth.username and
auth.password; instead create a Kubernetes Secret containing the Solace admin
credentials (e.g., keys solace-admin-username and solace-admin-password), update
the Helm charts/manifests to populate container environment variables (e.g.,
SOLACE_ADMIN_USERNAME and SOLACE_ADMIN_PASSWORD) from that Secret, and change
Config.toml to read those values from environment variables rather than
templating the raw values into auth.username and auth.password; also ensure any
existing references to the templated values are removed and
deployments/statefulsets use envFrom or env entries to source the Secret.

Comment on lines +18 to +20
ingressClassName: traefik
rules:
- host: "websubhub.dev"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Make ingress configuration values configurable and add TLS support.

The ingressClassName and host are hardcoded, limiting chart reusability across environments. Additionally, there's no TLS configuration, which is essential for production deployments.

♻️ Proposed configuration improvements

Add to values.yaml:

ingress:
  enabled: true
  className: "traefik"
  host: "websubhub.dev"
  tls:
    enabled: false
    secretName: ""
  annotations: {}

Update the Ingress template:

+{{- if .Values.ingress.enabled }}
 apiVersion: networking.k8s.io/v1
 kind: Ingress
 metadata:
   name: {{ .Release.Name }}-ingress
   namespace: {{ .Release.Namespace }}
+  {{- with .Values.ingress.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
 spec:
-  ingressClassName: traefik
+  ingressClassName: {{ .Values.ingress.className }}
+  {{- if .Values.ingress.tls.enabled }}
+  tls:
+  - hosts:
+    - {{ .Values.ingress.host }}
+    secretName: {{ .Values.ingress.tls.secretName }}
+  {{- end }}
   rules:
-  - host: "websubhub.dev"
+  - host: {{ .Values.ingress.host | quote }}
     http:
       paths:
       - path: /
         pathType: Prefix
         backend:
           service:
             name: {{ .Release.Name }}-service
             port:
               number: {{ .Values.deployment.config.server.port }}
+{{- end }}

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In @distribution/websubhub/templates/ingress.yaml around lines 18 - 20, Replace
hardcoded ingressClassName and host in the Ingress template with values-driven
keys and add TLS and annotations support: read ingress.className -> replace
ingressClassName, ingress.host -> replace host under rules, ingress.annotations
-> add to metadata.annotations, and if ingress.tls.enabled is true emit a tls
section referencing ingress.tls.secretName; ensure the template honors
ingress.enabled so the resource is only created when enabled and document the
new values.yaml keys (ingress.enabled, className, host, tls.enabled,
tls.secretName, annotations).

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