-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release workflow and daphine chart
- Loading branch information
1 parent
af615fb
commit 91d690b
Showing
8 changed files
with
193 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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,38 @@ | ||
name: Release Charts | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
ACTIONS_RUNNER_DEBUG: false | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
actions: write | ||
contents: write | ||
pages: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name 'github-actions[bot]' | ||
git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
|
||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
CR_SKIP_EXISTING: true |
This file contains 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 |
---|---|---|
@@ -1 +1,28 @@ | ||
# Helm charts | ||
# Helm charts | ||
|
||
## Usage | ||
|
||
[Helm](https://helm.sh) must be installed to use the charts. Please refer to | ||
Helm's [documentation](https://helm.sh/docs) to get started. | ||
|
||
Once Helm has been set up correctly, add the repo as follows: | ||
|
||
```console | ||
helm repo add jordojordo https://jordojordo.github.io/helm-charts | ||
``` | ||
|
||
If you had already added this repo earlier, run `helm repo update` to retrieve | ||
the latest versions of the packages. You can then run `helm search repo | ||
jordojordo` to see the charts. | ||
|
||
To install the `daphine` chart: | ||
|
||
```console | ||
helm install daphine jordojordo/daphine | ||
``` | ||
|
||
To uninstall the chart: | ||
|
||
```console | ||
helm delete daphine | ||
``` |
This file contains 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,23 @@ | ||
# 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 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,7 @@ | ||
apiVersion: v2 | ||
name: daphine | ||
description: An API for streaming music and videos | ||
type: application | ||
home: 'https://github.com/jordojordo/daphine' | ||
version: 0.1.0 | ||
appVersion: '0.1.0' |
This file contains 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,33 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Chart.Name }} | ||
spec: | ||
replicas: {{ .Values.deployment.replicaCount }} | ||
selector: | ||
matchLabels: {{ .Values.deployment.labels }} | ||
template: | ||
metadata: | ||
labels: {{ .Values.deployment.labels }} | ||
spec: | ||
nodeName: {{ default "local-node" .Values.nodeName }} | ||
containers: | ||
- name: {{ .Chart.Name }}-api | ||
image: '{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}' | ||
ports: | ||
- containerPort: {{ .Values.service.port }} | ||
env: | ||
- name: PUPPETEER_SKIP_DOWNLOAD | ||
value: "true" | ||
# Frontend url | ||
- name: CORS_ORIGIN | ||
value: {{ .Values.frontend }} | ||
imagePullPolicy: {{ .Values.deployment.image.imagePullPolicy }} | ||
volumeMounts: | ||
# Mount the volume for the container | ||
- mountPath: "./assets" | ||
name: {{ .Values.pv.name }} | ||
volumes: | ||
- name: {{ .Values.pv.name }} | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.pvc.name }} |
This file contains 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,18 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: {{ .Values.pv.name }} | ||
labels: | ||
type: {{ .Values.pv.type }} | ||
spec: | ||
capacity: | ||
storage: {{ .Values.pv.storage }} | ||
volumeMode: {{ .Values.pv.volumeMode }} | ||
accessModes: | ||
- ReadWriteOnce | ||
persistentVolumeReclaimPolicy: Retain | ||
storageClassName: {{ .Values.storageClassName }} | ||
hostPath: | ||
# Path of the data within the cluster | ||
path: {{ .Values.pv.hostPath }} | ||
nodeAffinity: {{ .Values.pv.nodeAffinity }} |
This file contains 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,11 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: {{ .Values.pvc.name }} | ||
spec: | ||
storageClassName: {{ .Values.storageClassName }} | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: {{ .Values.pvc.storageRequest }} |
This file contains 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,35 @@ | ||
frontend: 'https://example.com' # Required for CORS | ||
nodeName: 'local-node' | ||
|
||
deployment: | ||
labels: { 'yokanga.xyz/api': 'daphine' } | ||
replicaCount: 3 | ||
image: | ||
repository: 'ghcr.io/jordojordo/daphine' | ||
pullPolicy: 'IfNotPresent' | ||
tag: '0.1.0' | ||
|
||
service: | ||
type: 'ClusterIP' | ||
port: 3000 | ||
|
||
storageClassName: 'local-storage' | ||
|
||
pv: | ||
name: 'daphine-pv' | ||
type: 'local' | ||
storage: '2Gi' | ||
volumeMode: 'Filesystem' | ||
hostPath: '/mnt/assets' | ||
nodeAffinity: | ||
required: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: 'kubernetes.io/hostname' | ||
operator: In | ||
values: | ||
- 'local-node' | ||
|
||
pvc: | ||
name: 'daphine-pvc' | ||
storageRequest: '2Gi' |