-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add kubernetes deployment (#19)
Co-authored-by: Zoey Kaiser <[email protected]>
- Loading branch information
1 parent
2091148
commit e683ac0
Showing
5 changed files
with
189 additions
and
2 deletions.
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,73 @@ | ||
--- | ||
kind: pipeline | ||
type: docker | ||
name: publish-sidebase-nuxt-auth-on-merge-main | ||
|
||
trigger: | ||
event: | ||
- push | ||
branch: | ||
- main | ||
|
||
steps: | ||
- name: publish-sidebase-nuxt-auth-on-merge-main | ||
image: plugins/docker | ||
settings: | ||
repo: ghcr.io/sidebase/nuxt-auth-example/nuxt-auth-example | ||
tags: | ||
- "main" | ||
- "${DRONE_COMMIT_SHA}" | ||
custom_labels: | ||
- key: org.opencontainers.image.source | ||
value: https://github.com/sidebase/nuxt-auth-example | ||
dockerfile: ./Dockerfile | ||
context: ./ | ||
cache_from: | ||
- ghcr.io/sidebase/nuxt-auth-example/nuxt-auth-example:main | ||
registry: https://ghcr.io | ||
username: | ||
from_secret: SIDECHART_USERNAME | ||
password: | ||
from_secret: GITHUB_PACKAGES_TOKEN | ||
|
||
--- | ||
|
||
kind: pipeline | ||
types: kubernetes | ||
name: deploy-sidebase-nuxt-auth-example | ||
|
||
environment: | ||
GIT_LFS_SKIP_SMUDGE: 1 | ||
|
||
clone: | ||
depth: 1 | ||
|
||
trigger: | ||
event: | ||
- push | ||
branch: | ||
- main | ||
|
||
steps: | ||
- name: deploy | ||
image: deusavalon/aws-chamber-helmsman:0.1.0 | ||
environment: | ||
AWS_ACCESS_KEY_ID: | ||
from_secret: "AWS_ACCESS_KEY_ID_FOR_KUBECONFIG" | ||
AWS_SECRET_ACCESS_KEY: | ||
from_secret: "AWS_SECRET_ACCESS_KEY_FOR_KUBECONFIG" | ||
AWS_DEFAULT_REGION: "eu-central-1" | ||
SIDECHART_TOKEN: | ||
from_secret: "SIDECHART_TOKEN" | ||
SIDECHART_USERNAME: | ||
from_secret: "SIDECHART_USERNAME" | ||
GITHUB_PACKAGES_TOKEN: | ||
from_secret: "GITHUB_PACKAGES_TOKEN" | ||
commands: | ||
- cd kubernetes/helm | ||
- chamber export sidebase/nuxt-auth-example/dev --format dotenv > .env | ||
- aws eks update-kubeconfig --name eks-cluster-sidestream | ||
- helmsman --apply --debug -f helmsman.yml | ||
|
||
depends_on: | ||
- publish-sidebase-nuxt-auth-on-merge-main |
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
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,41 @@ | ||
context: default | ||
|
||
metadata: | ||
org: "github.com/sidebase/" | ||
maintainer: "DevOps" | ||
description: "Desired State File of the sidebase nuxt-auth-example deployment" | ||
|
||
settings: | ||
kubeContext: "arn:aws:eks:eu-central-1:802385070966:cluster/eks-cluster-sidestream" | ||
globalMaxHistory: 5 | ||
|
||
namespaces: | ||
sidebase-nuxt-auth: | ||
protected: false | ||
|
||
helmRepos: | ||
sidechart: "https://$SIDECHART_USERNAME:[email protected]/sidestream-tech/helm-charts/gh-pages/" | ||
|
||
apps: | ||
sidebase-nuxt-auth: | ||
namespace: "sidebase-nuxt-auth" | ||
enabled: true | ||
chart: "sidechart/sidechart" | ||
version: "0.2.1" | ||
valuesFile: values-sidebase-nuxt-auth.yml | ||
test: false | ||
protected: false | ||
priority: -1 | ||
wait: true | ||
timeout: 500 | ||
helmFlags: [ | ||
"--atomic", | ||
] | ||
set: | ||
"commitShortSHA": "$DRONE_COMMIT_SHA" | ||
"image.tag": "$DRONE_COMMIT_SHA" | ||
"imageCredentials.password": "$GITHUB_PACKAGES_TOKEN" | ||
"secrets.data.github_client_id": "$GITHUB_CLIENT_ID" | ||
"secrets.data.github_client_secret": "$GITHUB_CLIENT_SECRET" | ||
"secrets.data.nuxt_secret": "$NUXT_SECRET" | ||
"secrets.data.auth_origin": "$ORIGIN" |
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,67 @@ | ||
replicaCount: 1 | ||
|
||
image: | ||
repository: ghcr.io/sidebase/nuxt-auth-example/nuxt-auth-example | ||
tag: main | ||
pullPolicy: IfNotPresent | ||
|
||
imageCredentials: | ||
password: | ||
|
||
volumes: [] | ||
|
||
volumeMounts: [] | ||
|
||
commitShortSHA: 123456 | ||
|
||
service: | ||
type: LoadBalancer | ||
annotations: | ||
external-dns.alpha.kubernetes.io/hostname: nuxt-auth-example.sidebase.io | ||
ports: | ||
http: | ||
port: 80 | ||
health: /api/healthz | ||
env: | ||
- name: "GREET" | ||
value: "scaffoldWashere" | ||
|
||
podAutoscaler: | ||
minReplicas: 1 | ||
maxReplicas: 1 | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: 75 | ||
|
||
oauth2: | ||
enabled: false | ||
|
||
ingress: | ||
enabled: false | ||
class: nginx | ||
certManager: | ||
enabled: true | ||
issuer: cloudflare-issuer | ||
url: main.the-scaffold.k8s.sidestream.tech | ||
timeoutEnabled: false | ||
annotations: {} | ||
|
||
resources: | ||
limits: | ||
cpu: 250m | ||
memory: 3Gi | ||
requests: | ||
cpu: 150m | ||
memory: 2Gi | ||
|
||
secrets: | ||
name: sidebase-nuxt-auth-secrets | ||
data: | ||
github_client_id: "" | ||
github_client_secret: "" | ||
nuxt_secret: "" | ||
auth_origin: "" |
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,5 @@ | ||
export default defineEventHandler((event) => { | ||
return { | ||
service: 'online' | ||
} | ||
}) |