Examples: Add v1 Kubernetes helm-local-chart example - #7280
Conversation
Signed-off-by: rahulshendre <rahulshendre789@gmail.com>
✅ Deploy Preview for pipecd-site canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7280 +/- ##
==========================================
- Coverage 29.74% 28.86% -0.89%
==========================================
Files 601 529 -72
Lines 64442 58381 -6061
==========================================
- Hits 19166 16849 -2317
+ Misses 43784 40166 -3618
+ Partials 1492 1366 -126
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a PipeCD v1 (pipedv1 plugin-based) Kubernetes example showing how to deploy a Helm chart that lives in the same Git repository, under examples/v1/, aligning with the “Prepare examples for pipedv1” effort in #6266.
Changes:
- Introduces a local Helm chart module (
examples/v1/local-modules/helm-charts/helloworld) with standard templates. - Adds a v1 Application config and values for deploying that local chart via the Kubernetes plugin.
- Provides Helm chart auxiliary files (NOTES, tests, helpers, ignore rules).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/v1/local-modules/helm-charts/helloworld/values.yaml | Chart default values for the local “helloworld” Helm chart. |
| examples/v1/local-modules/helm-charts/helloworld/templates/tests/test-connection.yaml | Helm test hook pod to validate service reachability. |
| examples/v1/local-modules/helm-charts/helloworld/templates/serviceaccount.yaml | ServiceAccount template for the chart. |
| examples/v1/local-modules/helm-charts/helloworld/templates/service.yaml | Service template exposing the app. |
| examples/v1/local-modules/helm-charts/helloworld/templates/NOTES.txt | Post-install notes/instructions for accessing the app. |
| examples/v1/local-modules/helm-charts/helloworld/templates/ingress.yaml | Optional Ingress template for exposing the service. |
| examples/v1/local-modules/helm-charts/helloworld/templates/deployment.yaml | Deployment template for running the helloworld container. |
| examples/v1/local-modules/helm-charts/helloworld/templates/_helpers.tpl | Shared helper templates (names, labels, service account name). |
| examples/v1/local-modules/helm-charts/helloworld/Chart.yaml | Helm chart metadata for the local module chart. |
| examples/v1/local-modules/helm-charts/helloworld/.helmignore | Files to ignore when packaging the chart. |
| examples/v1/kubernetes/helm-local-chart/values.yaml | Example app-specific Helm values override for the deployment. |
| examples/v1/kubernetes/helm-local-chart/app.pipecd.yaml | PipeCD v1 Application spec demonstrating helmChart.path usage. |
Suppressed comments (1)
examples/v1/local-modules/helm-charts/helloworld/templates/NOTES.txt:20
- The port-forward command forwards to pod port 80, but the container exposes port 9085 (named
http) intemplates/deployment.yaml. This makes the NOTES instructions fail when users follow them.
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9085:80
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| image: | ||
| repository: gcr.io/pipecd/helloworld | ||
| pullPolicy: IfNotPresent | ||
|
|
| - path: {{ . }} | ||
| backend: | ||
| serviceName: {{ $fullName }} | ||
| servicePort: {{ $svcPort }} |
| {{- define "helloworld.serviceAccountName" -}} | ||
| {{- if .Values.serviceAccount.create -}} | ||
| {{ default (include "helloworld.fullname" .) .Values.serviceAccount.name }} | ||
| {{- else -}} | ||
| {{ default "default" .Values.serviceAccount.name }} | ||
| {{- end -}} | ||
| {{- end -}} |
| {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} | ||
| apiVersion: networking.k8s.io/v1beta1 | ||
| {{- else -}} | ||
| apiVersion: extensions/v1beta1 | ||
| {{- end }} |
| echo http://$NODE_IP:$NODE_PORT | ||
| {{- else if contains "LoadBalancer" .Values.service.type }} | ||
| NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
| You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "helloworld.fullname" . }}' |
| trigger: | ||
| onCommit: | ||
| paths: | ||
| - local-modules/helm-charts/helloworld/* |
There was a problem hiding this comment.
These are all from the upstream Helm chart scaffold, carried over as-is from the v0 example - this is a straight v0 -> v1 port.
The example deploys cleanly (image.tag comes from the app-level values.yaml, ingress is disabled by default)
|
Thank you for contributing to PipeCD, @rahulshendre! The changes in this pull request will be part of the upcoming release! |
What this PR does:
Adds the v1 Kubernetes helm-local-chart example under examples/v1/
Why we need it:
Adds examples to v1 directory
Which issue(s) this PR fixes:
Part of #6266
Does this PR introduce a user-facing change?: