Skip to content

Conversation

@andreasfritz
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings January 23, 2026 06:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Kubernetes playground components to Spring Boot 4 and refreshes related Helm chart configuration for local deployment.

Changes:

  • Bump Spring Boot parent to 4.0.1 across sample apps and update related Spring Boot Admin / Spring Cloud versions.
  • Update Helm charts (Traefik + Spring Cloud Kubernetes Discovery Server) to use configurable namespaces/images and refresh RBAC.
  • Adjust default container pull behavior and minor documentation/config updates.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
kubernetes/helm-charts/traefik/values.yaml Introduces chart values for namespace and Traefik image.
kubernetes/helm-charts/traefik/templates/service.yaml Sets Service namespaces from chart values.
kubernetes/helm-charts/traefik/templates/role.yaml Updates ClusterRole rules (incl. EndpointSlices/nodes).
kubernetes/helm-charts/traefik/templates/role-binding.yaml Templates the ServiceAccount namespace in the binding subject.
kubernetes/helm-charts/traefik/templates/deployment.yaml Sets Deployment namespace from values and makes image configurable.
kubernetes/helm-charts/traefik/README.md Updates install command usage.
kubernetes/helm-charts/spring-cloud-kubernetes-discoveryserver/values.yaml Updates Discovery Server image and pull policy.
kubernetes/helm-charts/spring-cloud-kubernetes-discoveryserver/templates/role.yaml Removes hardcoded namespace from Role metadata.
kubernetes/helm-charts/spring-cloud-kubernetes-discoveryserver/templates/role-binding.yaml Adds templated subject namespace.
kubernetes/helm-charts/spring-cloud-kubernetes-discoveryserver/README.md Updates install command usage.
kubernetes/helm-charts/spring-boot-app/values.yaml Changes default pull policy and minor values cleanup.
kubernetes/helm-charts/spring-boot-admin/values.yaml Changes default pull policy.
kubernetes/apps/spring-boot-admin-kubernetes/src/main/resources/application.yml Adjusts commented default for SBA public URL.
kubernetes/apps/spring-boot-admin-kubernetes/pom.xml Bumps Spring Boot / SBA / Spring Cloud versions.
kubernetes/apps/spring-boot-admin-kubernetes/deployment/values.yml Removes hardcoded namespace from deployment values.
kubernetes/apps/spring-boot-admin-fabric8/pom.xml Bumps Spring Boot / SBA / Spring Cloud versions.
kubernetes/apps/spring-boot-admin-fabric8/deployment/values.yml Removes hardcoded namespace from deployment values.
kubernetes/apps/spring-boot-admin-discoveryclient/pom.xml Bumps Spring Boot / SBA / Spring Cloud versions.
kubernetes/apps/spring-boot-admin-discoveryclient/deployment/values.yml Removes hardcoded namespace from deployment values.
kubernetes/apps/hello-world/pom.xml Bumps Spring Boot parent version.
kubernetes/apps/health-simulator/src/main/java/de/codecentric/healthsimulator/health/HealthIndicatorSimulation.java Updates health-related imports for Spring Boot 4.
kubernetes/apps/health-simulator/src/main/java/de/codecentric/healthsimulator/health/HealthController.java Updates Status import for Spring Boot 4.
kubernetes/apps/health-simulator/pom.xml Bumps Spring Boot parent version.
kubernetes/README.md Adds namespace/context and troubleshooting commands; adds Traefik image pull note.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

apiVersion: apps/v1
metadata:
name: traefik-deployment
namespace: {{ .Values.namespace }}
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Using .Values.namespace on the Deployment will break installs where the Helm release namespace differs (e.g., helm install -n foo while Values.namespace remains default). In this chart the ServiceAccount template has no metadata.namespace, so it will be created in the release namespace, while this Deployment is created in .Values.namespace, causing serviceAccountName: traefik-account to be missing at runtime. Prefer .Release.Namespace for namespacing, or ensure all namespaced resources (ServiceAccount/Deployment/Services/etc.) use the same namespace source consistently.

Suggested change
namespace: {{ .Values.namespace }}
namespace: {{ .Release.Namespace }}

Copilot uses AI. Check for mistakes.
Comment on lines 3 to 6
metadata:
name: traefik-dashboard-service
namespace: {{ .Values.namespace }}

Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

These Services are hard-pinned to .Values.namespace. If a user installs the chart into another namespace via --namespace, Helm will still create the Services in .Values.namespace (defaulting to default), which is surprising and can split resources across namespaces. Consider using .Release.Namespace (or omitting metadata.namespace) to keep resources aligned with the release namespace, or clearly document/enforce that --namespace and Values.namespace must match.

Copilot uses AI. Check for mistakes.
- kind: ServiceAccount
name: traefik-account
namespace: default # Using "default" because we did not specify a namespace when creating the ClusterAccount.
namespace: {{ .Values.namespace }}
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The ClusterRoleBinding subject namespace is taken from .Values.namespace. If the release is installed into a different namespace (or if values are changed independently), the binding may grant permissions to the wrong ServiceAccount namespace and Traefik will fail due to missing RBAC. Prefer .Release.Namespace here, or ensure the ServiceAccount and all workloads are created in the exact same namespace source.

Suggested change
namespace: {{ .Values.namespace }}
namespace: {{ .Release.Namespace }}

Copilot uses AI. Check for mistakes.
- kind: ServiceAccount
name: spring-cloud-kubernetes-discoveryserver
name: spring-cloud-kubernetes-discoveryserver
namespace: {{ .Values.namespace }}
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

This RoleBinding now hardcodes the subject namespace to .Values.namespace, but the chart’s ServiceAccount/Role templates don’t set metadata.namespace while the Deployment/Service templates do. That can split resources across namespaces and cause the Deployment’s serviceAccountName/RBAC to fail unless users keep --namespace and Values.namespace perfectly aligned. Prefer using .Release.Namespace consistently across all templates (or remove explicit namespaces altogether).

Suggested change
namespace: {{ .Values.namespace }}
namespace: {{ .Release.Namespace }}

Copilot uses AI. Check for mistakes.
## Install Spring Cloud Kubernetes Discovery Server
```bash
helm upgrade --install spring-cloud-kubernetes-discoveryserver .
helm upgrade --install spring-cloud-kubernetes-discoveryserver . -f values.yaml
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

helm upgrade --install spring-cloud-kubernetes-discoveryserver . already includes the chart’s values.yaml automatically. The added -f values.yaml is redundant unless you expect users to run the command from outside the chart directory; in that case, prefer an explicit relative path or clarify the required working directory.

Copilot uses AI. Check for mistakes.
Comment on lines 5 to 9
env:
SPRING_BOOT_ADMIN_UI_TITLE: Spring Boot Admin - Kubernetes
image: spring-boot-admin
# do not pull image but use locally built image, not recommended for production
pullPolicy: Never
pullPolicy: Always
updateStrategy: RollingUpdate
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Same issue as spring-boot-app: defaulting pullPolicy to Always will likely break the local build + install scripts (they build images locally and don’t push to a registry). Unless the project now requires an image registry, default to IfNotPresent/Never for the playground, or set deployment.pullPolicy in the per-app deployment/values.yml files.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +2
namespace: default

Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Adding namespace as a values-driven setting for this chart is risky because Helm already has a first-class release namespace. With the templates now using .Values.namespace, installing with helm install -n <ns> will still default resources to default unless users remember to also override namespace in values. Consider removing namespace from values and relying on .Release.Namespace (or leaving metadata.namespace unset) to avoid misconfiguration.

Suggested change
namespace: default

Copilot uses AI. Check for mistakes.
## Install Traefik
```bash
helm upgrade --install traefik .
helm upgrade --install traefik . -f values.yaml
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

helm upgrade --install traefik . already loads the chart’s embedded values.yaml by default. Adding -f values.yaml is redundant (and may confuse users into thinking it’s required). If the intent is to run from a different working directory, consider using an explicit path (e.g., -f helm-charts/traefik/values.yaml) or document that users should cd into the chart dir before running the command.

Suggested change
helm upgrade --install traefik . -f values.yaml
helm upgrade --install traefik .

Copilot uses AI. Check for mistakes.
- services
- endpoints
- secrets
- nodes
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

This ClusterRole now grants access to the nodes resource. That is a significant privilege increase (cluster-wide node inventory) compared to typical Traefik RBAC for the Kubernetes Ingress provider. If Traefik v3 doesn’t strictly require node access for your configuration, consider removing nodes to follow least-privilege; otherwise, please document why it’s needed (e.g., which feature/flag requires it).

Suggested change
- nodes

Copilot uses AI. Check for mistakes.
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