Skip to content

Commit

Permalink
cloudcore server helm deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkmcc committed Nov 24, 2023
1 parent 4421919 commit f7cd96e
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/cloudcore-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ FROM scratch

COPY cloudcore /cloudcore

ENTRYPOINT ["cloudcore"]
ENTRYPOINT ["/cloudcore"]
3 changes: 3 additions & 0 deletions deploy/helm/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.md
.git
.gitignore
5 changes: 5 additions & 0 deletions deploy/helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
name: cloudcore
description: A Helm chart for the CloudCore application
version: 0.1.0
appVersion: "0.1.0"
42 changes: 42 additions & 0 deletions deploy/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: cloudcore-deployment
spec:
replicas: 1
selector:
matchLabels:
app: cloudcore
template:
metadata:
labels:
app: cloudcore
spec:
containers:
- name: cloudcore
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.service.agentServer.port }}
- containerPort: {{ .Values.service.appServer.port }}
env:
- name: AGENT_SERVER_PORT
value: "{{ .Values.env.agentServerPort }}"
- name: APP_SERVER_PORT
value: "{{ .Values.env.appServerPort }}"
- name: AUTH0_DOMAIN
value: "{{ .Values.env.auth0Domain }}"
- name: AUTH0_AUDIENCE
value: "{{ .Values.env.auth0Audience }}"
- name: LOGGING_LEVEL
value: "{{ .Values.env.loggingLevel }}"
- name: AUTH_TOKEN_SIGNING_SECRET
valueFrom:
secretKeyRef:
name: cloudcore-secret
key: authTokenSigningSecret
- name: DATABASE_CONNECTION_STRING
valueFrom:
secretKeyRef:
name: cloudcore-secret
key: databaseConnectionString
8 changes: 8 additions & 0 deletions deploy/helm/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: cloudcore-secret
type: Opaque
data:
authTokenSigningSecret: {{ randAlphaNum 32 | b64enc | quote }}
databaseConnectionString: {{ .Values.env.databaseConnectionString | b64enc | quote }}
25 changes: 25 additions & 0 deletions deploy/helm/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
apiVersion: v1
kind: Service
metadata:
name: agent-server-service
spec:
type: ClusterIP
ports:
- port: {{ .Values.service.agentServer.port }}
targetPort: {{ .Values.service.agentServer.port }}
selector:
app: cloudcore

---
apiVersion: v1
kind: Service
metadata:
name: app-server-service
spec:
type: ClusterIP
ports:
- port: {{ .Values.service.appServer.port }}
targetPort: {{ .Values.service.appServer.port }}
selector:
app: cloudcore
19 changes: 19 additions & 0 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
image:
repository: ghcr.io/clarkmcc/cloudcore
pullPolicy: IfNotPresent
tag: "latest"

service:
agentServer:
port: 10000
appServer:
port: 10001

env:
agentServerPort: 10000
appServerPort: 10001
auth0Domain: ""
auth0Audience: ""
loggingLevel: ""
authTokenSigningSecret: "" # This will be set in the deployment
databaseConnectionString: "" # This will be set from a secret

0 comments on commit f7cd96e

Please sign in to comment.