Skip to content

Commit

Permalink
chore(infra): setup staging env
Browse files Browse the repository at this point in the history
  • Loading branch information
toledompm committed Feb 8, 2024
1 parent c63cfdb commit 6b46549
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: post-api
Expand Down
File renamed without changes.
File renamed without changes.
64 changes: 64 additions & 0 deletions infra/kubernetes/staging/helmRelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: post-api
spec:
interval: 5m
chart:
spec:
chart: app
version: '0.x.x'
sourceRef:
kind: HelmRepository
name: homelab
interval: 1m
upgrade:
remediation:
remediateLastFailure: true
values:
replicaCount: 1

image:
repository: 'ghcr.io/toledompm/post-api'
pullPolicy: IfNotPresent
tag: '0.6.0'

secretEnv: post-api-staging-env
secretFiles:
- name: post-api-staging-oci
mountPath: /root/.oci/

service:
type: ClusterIP
port: 3030

env:
- name: IMAGE_INDEX_FILE_PATH
value: /root/index/index.json

volumes:
- name: index
emptyDir: {}

volumeMounts:
- name: index
mountPath: /root/index

ingress:
enabled: true
annotations:
external-dns.alpha.kubernetes.io/hostname: blog-api-staging.toledompm.xyz
external-dns.alpha.kubernetes.io/target: cluster.toledompm.xyz
hosts:
- host: blog-api-staging.toledompm.xyz
paths:
- path: /api
pathType: Prefix

resources:
limits:
cpu: 100m
memory: 256Mi

autoscaling:
enabled: false
7 changes: 7 additions & 0 deletions infra/kubernetes/staging/helmRepository.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: homelab
spec:
interval: 5m0s
url: https://toledompm.github.io/homelab-charts
6 changes: 6 additions & 0 deletions infra/kubernetes/staging/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: post-api-staging
resources:
- helmRelease.yaml
- helmRepository.yaml

0 comments on commit 6b46549

Please sign in to comment.