Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@main
with:
submodules: true

- name: Setup Go
uses: actions/setup-go@v5
Expand Down Expand Up @@ -59,7 +61,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@main
with:
submodules: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down Expand Up @@ -102,7 +106,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@main
with:
submodules: true

- name: Setup Helm
uses: azure/setup-helm@v4
Expand Down Expand Up @@ -134,6 +140,9 @@ jobs:
- name: Lint chart
run: helm lint helm

- name: 🐳 Helm template (snapshot)
run: ./helm/update-snapshots.sh --check-diff-only

- name: Tag docker image in Helm Chart values.yaml
working-directory: helm
env:
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "fugit"]
path = fugit
url = git@github.com:toggle-corp/fugit.git
branch = v0.1.1
1 change: 1 addition & 0 deletions fugit
Submodule fugit added at 1460a2
193 changes: 193 additions & 0 deletions helm/snapshots/alpha-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
---
# Source: cacheppuccino-helm/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: release-name-cacheppuccino-helm
labels:
helm.sh/chart: cacheppuccino-helm-0.1.0
app.kubernetes.io/name: cacheppuccino-helm
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "0.1.0"
app.kubernetes.io/managed-by: Helm
---
# Source: cacheppuccino-helm/templates/secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: release-name-cacheppuccino-helm
labels:
helm.sh/chart: cacheppuccino-helm-0.1.0
app.kubernetes.io/name: cacheppuccino-helm
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "0.1.0"
app.kubernetes.io/managed-by: Helm
type: Opaque
stringData:
TRANSLATION_API_KEY: "test"
---
# Source: cacheppuccino-helm/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: release-name-cacheppuccino-helm
labels:
helm.sh/chart: cacheppuccino-helm-0.1.0
app.kubernetes.io/name: cacheppuccino-helm
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "0.1.0"
app.kubernetes.io/managed-by: Helm
data:
LISTEN_ADDR: ":8080"
LOG_LEVEL: "info"

TRANSLATION_BASE_URL: "https://ifrc-translationapi.azurewebsites.net"
TRANSLATION_APPLICATION_ID: "18"

PULL_INTERVAL: "10m"
HTTP_TIMEOUT: "1m"
INITIAL_PULL_DEADLINE: "2m"

SQLITE_PATH: "/data/cacheppuccino.db"
---
# Source: cacheppuccino-helm/templates/pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: release-name-cacheppuccino-helm
labels:
helm.sh/chart: cacheppuccino-helm-0.1.0
app.kubernetes.io/name: cacheppuccino-helm
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "0.1.0"
app.kubernetes.io/managed-by: Helm
spec:
storageClassName: "longhorn"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "512Mi"
---
# Source: cacheppuccino-helm/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: release-name-cacheppuccino-helm
labels:
helm.sh/chart: cacheppuccino-helm-0.1.0
app.kubernetes.io/name: cacheppuccino-helm
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "0.1.0"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
ports:
- name: http
port: 8080
targetPort: http
protocol: TCP
selector:
app.kubernetes.io/name: cacheppuccino-helm
app.kubernetes.io/instance: release-name
---
# Source: cacheppuccino-helm/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: release-name-cacheppuccino-helm
labels:
helm.sh/chart: cacheppuccino-helm-0.1.0
app.kubernetes.io/name: cacheppuccino-helm
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "0.1.0"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: cacheppuccino-helm
app.kubernetes.io/instance: release-name
template:
metadata:
labels:
app.kubernetes.io/name: cacheppuccino-helm
app.kubernetes.io/instance: release-name
spec:
serviceAccountName: release-name-cacheppuccino-helm
containers:
- name: cacheppuccino
image: "ghcr.io/ifrcgo/cacheppuccino:SET-BY-CICD-TAG"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
protocol: TCP
envFrom:
- configMapRef:
name: release-name-cacheppuccino-helm
env:
- name: TRANSLATION_API_KEY
valueFrom:
secretKeyRef:
name: release-name-cacheppuccino-helm
key: "TRANSLATION_API_KEY"
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsGroup: 0
runAsUser: 0
livenessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
readinessProbe:
httpGet:
path: /readyz
port: http
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 6
resources:
limits:
cpu: 2
memory: 512Mi
requests:
cpu: "0.2"
memory: 512Mi
volumeMounts:
- name: sqlite
mountPath: "/data"
volumes:
- name: sqlite
persistentVolumeClaim:
claimName: release-name-cacheppuccino-helm
---
# Source: cacheppuccino-helm/templates/ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: release-name-cacheppuccino-helm
labels:
helm.sh/chart: cacheppuccino-helm-0.1.0
app.kubernetes.io/name: cacheppuccino-helm
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "0.1.0"
app.kubernetes.io/managed-by: Helm
spec:
rules:
- host: "cacheppuccino-alpha-1.ifrc-go.dev.togglecorp.com"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: release-name-cacheppuccino-helm
port:
number: 8080
3 changes: 3 additions & 0 deletions helm/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tests:
alpha-1.yaml:
- values.yaml
25 changes: 25 additions & 0 deletions helm/tests/alpha-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Values for alpha instance
ingress:
enabled: true
host: cacheppuccino-alpha-1.ifrc-go.dev.togglecorp.com

resources:
requests:
cpu: "0.2"
memory: 512Mi
limits:
cpu: 2
memory: 512Mi

sqlite:
pvc:
storageClassName: "longhorn"
size: 512Mi
app:
translation:
baseUrl: "https://ifrc-translationapi.azurewebsites.net"
applicationId: "18"
apiKey: "test"
pull:
httpTimeout: "1m"
initialPullDeadline: "2m"
5 changes: 5 additions & 0 deletions helm/update-snapshots.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

export SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

$SCRIPT_DIR/../fugit/scripts/helm-update-snapshots.sh
Loading