Skip to content

Commit

Permalink
feat: add Executor Service chart
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiendan committed Aug 14, 2023
1 parent 4f584b2 commit b79504e
Show file tree
Hide file tree
Showing 9 changed files with 170 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/executor-service/.helmignore
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/
24 changes: 24 additions & 0 deletions charts/executor-service/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: executor-service
description: A Helm chart for the Executor Service

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "main"
16 changes: 16 additions & 0 deletions charts/executor-service/templates/00-executor-service-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: executor-service
labels:
app: executor-service
spec:
type: ClusterIP
ports:
- name: http
port: {{ .Values.ports.http }}
targetPort: http
protocol: TCP
selector:
app: executor-service
sessionAffinity: ClientIP
28 changes: 28 additions & 0 deletions charts/executor-service/templates/01-executor-service-pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: v1
kind: Pod
metadata:
name: executor-service
labels:
app: executor-service
spec:
restartPolicy: Always
containers:
- name: executor-service
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: Always
ports:
- name: http
containerPort: {{ .Values.containerPorts.http }}
env:
- name: AUTH0_AUDIENCE
value: {{ .Values.env.AUTH0_AUDIENCE }}
- name: AUTH0_ISSUER_URL
value: {{ .Values.env.AUTH0_ISSUER_URL }}
- name: PRIVATE_KEY
value: {{ .Values.env.PRIVATE_KEY }}
- name: REDIS_HOST
value: "redis"
- name: REDIS_PORT
value: "6379"
- name: TOPOS_SUBNET_ENDPOINT
value: {{ .Values.env.TOPOS_SUBNET_ENDPOINT }}
23 changes: 23 additions & 0 deletions charts/executor-service/templates/02-executor-service-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: executor-service
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-{{ .Values.acme.environment }}"
spec:
tls:
- hosts:
- {{ .Values.host }}
secretName: "{{ .Values.host }}-secret-tls"
rules:
- host: {{ .Values.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: executor-service
port:
name: http
16 changes: 16 additions & 0 deletions charts/executor-service/templates/03-redis-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: redis
labels:
app: redis
spec:
type: ClusterIP
ports:
- name: http
port: 6379
targetPort: http
protocol: TCP
selector:
app: redis
sessionAffinity: ClientIP
15 changes: 15 additions & 0 deletions charts/executor-service/templates/04-redis-pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: redis
labels:
app: redis
spec:
restartPolicy: Always
containers:
- name: redis
image: redis/redis-stack-server:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 6379
25 changes: 25 additions & 0 deletions charts/executor-service/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Default values for tce-all-in-one.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

host: nowhere.com

acme:
# acme issuer type (staging | production)
environment: staging

image:
repository: nobody
tag: main

containerPorts:
http: 3000

ports:
http: 80

env:
AUTH0_AUDIENCE: "${AUTH0_AUDIENCE}"
AUTH0_ISSUER_URL: "${AUTH0_ISSUER_URL}"
PRIVATE_KEY: "${PRIVATE_KEY}"
TOPOS_SUBNET_ENDPOINT: "localhost:${TOPOS_HOST_PORT}"

0 comments on commit b79504e

Please sign in to comment.