-
Notifications
You must be signed in to change notification settings - Fork 0
chore: helm chart configuration #12
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
Merged
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3d8af6d
chore: wip helm chart configuration
peppescg 730158b
leftover
peppescg 9e7f7ad
refactor: remove ingress
peppescg c01c4f3
chore: use kind and test helm chart on ci
peppescg 389262c
fix: gh action version and k8s kind version
peppescg fd9f985
fix(ci): correct action hashes, upgrade kind to v1.13.0, add security…
peppescg 2f31b84
leftover
peppescg 58a35f0
fix(helm): add maintainer email to pass chart-testing validation
peppescg 9d45619
fix: remove unneeded config
peppescg 27983ba
fix: remove unneeded config
peppescg 584fc60
chore: rename job title
peppescg 70dfcfb
fix(ci): simplify helm lint workflow and fix Chart.yaml
peppescg 2280e7f
refactor: review copilot
peppescg cdf3452
refactor(makefile): use RELEASE_NAME variable for helm commands
peppescg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| name: Helm Chart Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "helm/**" | ||
| - ".github/workflows/helm-test.yml" | ||
| pull_request: | ||
| branches: [main] | ||
| paths: | ||
| - "helm/**" | ||
| - ".github/workflows/helm-test.yml" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test-helm-chart: | ||
| name: Test Helm Chart | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 | ||
|
|
||
| - name: Build Docker image | ||
| uses: docker/build-push-action@c382f710d39a5bb4e430307530a720f50c2d3318 # v6.0.0 | ||
| with: | ||
| context: . | ||
| load: true | ||
| tags: toolhive-cloud-ui:latest | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
|
|
||
| - name: Create Kind cluster | ||
| uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab # v1.13.0 | ||
|
|
||
| - name: Load image into Kind | ||
| run: | | ||
| kind load docker-image toolhive-cloud-ui:latest --name chart-testing | ||
|
|
||
| - name: Install Helm chart | ||
| run: | | ||
| helm upgrade --install toolhive-cloud-ui ./helm \ | ||
| -f ./helm/values-dev.yaml \ | ||
| --wait \ | ||
| --timeout=5m | ||
|
|
||
| - name: Check deployment status | ||
| run: | | ||
| kubectl get pods -l app.kubernetes.io/name=toolhive-cloud-ui | ||
| kubectl get svc -l app.kubernetes.io/name=toolhive-cloud-ui | ||
|
|
||
| - name: Verify application is responding | ||
| run: | | ||
| kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=toolhive-cloud-ui --timeout=120s | ||
| kubectl port-forward svc/toolhive-cloud-ui 8080:80 & | ||
| sleep 5 | ||
| curl -f http://localhost:8080 || (kubectl logs -l app.kubernetes.io/name=toolhive-cloud-ui && exit 1) | ||
|
|
||
| - name: Run Helm tests (if any) | ||
| run: | | ||
| helm test toolhive-cloud-ui || echo "No tests defined" | ||
|
|
||
| - name: Show logs on failure | ||
| if: failure() | ||
| run: | | ||
| kubectl get all -l app.kubernetes.io/name=toolhive-cloud-ui | ||
| kubectl describe pods -l app.kubernetes.io/name=toolhive-cloud-ui | ||
| kubectl logs -l app.kubernetes.io/name=toolhive-cloud-ui --tail=100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: Lint Helm Chart | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "helm/**" | ||
| - ".github/workflows/lint-helm.yml" | ||
| pull_request: | ||
| branches: [main] | ||
| paths: | ||
| - "helm/**" | ||
| - ".github/workflows/lint-helm.yml" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lint-chart: | ||
| name: Lint Helm Chart | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Helm | ||
| uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 | ||
| with: | ||
| version: "latest" | ||
|
|
||
| - name: Run Helm lint | ||
| run: | | ||
| helm lint ./helm | ||
| helm lint ./helm -f ./helm/values-dev.yaml | ||
|
|
||
| - name: Validate templates | ||
| run: | | ||
| helm template toolhive-cloud-ui ./helm --kube-version 1.28.0 --debug | ||
| helm template toolhive-cloud-ui ./helm -f ./helm/values-dev.yaml --kube-version 1.28.0 --debug |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,3 +39,8 @@ yarn-error.log* | |
| # typescript | ||
| *.tsbuildinfo | ||
| next-env.d.ts | ||
|
|
||
| # helm | ||
| *.tgz | ||
| helm/charts/ | ||
| helm/*.lock | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ RUN corepack enable && corepack prepare [email protected] --activate | |
|
|
||
| WORKDIR /app | ||
|
|
||
| # Install dependencies based on the preferred package manager | ||
| # Install dependencies | ||
| COPY package.json pnpm-lock.yaml* ./ | ||
| RUN pnpm install --frozen-lockfile | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Patterns to ignore when building packages. | ||
| # This supports shell glob matching, relative path matching, and | ||
| # negation (prefixed with !). Only one pattern per line. | ||
| .DS_Store | ||
| # Common VCS dirs | ||
| .git/ | ||
| .gitignore | ||
| .bzr/ | ||
| .bzrignore | ||
| .hg/ | ||
| .hgignore | ||
| .svn/ | ||
| # Common backup files | ||
| *.swp | ||
| *.bak | ||
| *.tmp | ||
| *.orig | ||
| *~ | ||
| # Various IDEs | ||
| .project | ||
| .idea/ | ||
| *.tmproj | ||
| .vscode/ | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| apiVersion: v2 | ||
| name: toolhive-cloud-ui | ||
| description: A Helm chart for ToolHive Cloud UI - Next.js application | ||
| type: application | ||
| version: 0.1.0 | ||
| appVersion: "0.1.0" | ||
| keywords: | ||
| - nextjs | ||
| - react | ||
| - frontend | ||
| - ui | ||
| home: https://github.com/stacklok/toolhive-cloud-ui | ||
| sources: | ||
| - https://github.com/stacklok/toolhive-cloud-ui | ||
| kubeVersion: ">=1.24.0-0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "toolhive-cloud-ui.name" -}} | ||
| {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create a default fully qualified app name. | ||
| */}} | ||
| {{- define "toolhive-cloud-ui.fullname" -}} | ||
| {{- if .Values.fullnameOverride }} | ||
| {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- $name := default .Chart.Name .Values.nameOverride }} | ||
| {{- if contains $name .Release.Name }} | ||
| {{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create chart name and version as used by the chart label. | ||
| */}} | ||
| {{- define "toolhive-cloud-ui.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "toolhive-cloud-ui.labels" -}} | ||
| helm.sh/chart: {{ include "toolhive-cloud-ui.chart" . }} | ||
| {{ include "toolhive-cloud-ui.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| app.kubernetes.io/component: frontend | ||
| app.kubernetes.io/part-of: toolhive | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Selector labels | ||
| */}} | ||
| {{- define "toolhive-cloud-ui.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "toolhive-cloud-ui.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the name of the service account to use | ||
| */}} | ||
| {{- define "toolhive-cloud-ui.serviceAccountName" -}} | ||
| {{- if .Values.serviceAccount.create }} | ||
| {{- default (include "toolhive-cloud-ui.fullname" .) .Values.serviceAccount.name }} | ||
| {{- else }} | ||
| {{- default "default" .Values.serviceAccount.name }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.