diff --git a/charts/executor-service/.helmignore b/charts/executor-service/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/executor-service/.helmignore @@ -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/ diff --git a/charts/executor-service/Chart.yaml b/charts/executor-service/Chart.yaml new file mode 100644 index 0000000..9f2b57d --- /dev/null +++ b/charts/executor-service/Chart.yaml @@ -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" diff --git a/charts/executor-service/templates/00-executor-service-service.yaml b/charts/executor-service/templates/00-executor-service-service.yaml new file mode 100644 index 0000000..2a54c16 --- /dev/null +++ b/charts/executor-service/templates/00-executor-service-service.yaml @@ -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 diff --git a/charts/executor-service/templates/01-executor-service-pod.yaml b/charts/executor-service/templates/01-executor-service-pod.yaml new file mode 100644 index 0000000..b0b49d3 --- /dev/null +++ b/charts/executor-service/templates/01-executor-service-pod.yaml @@ -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 }} diff --git a/charts/executor-service/templates/02-executor-service-ingress.yaml b/charts/executor-service/templates/02-executor-service-ingress.yaml new file mode 100644 index 0000000..e7b2c43 --- /dev/null +++ b/charts/executor-service/templates/02-executor-service-ingress.yaml @@ -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 diff --git a/charts/executor-service/templates/03-redis-service.yaml b/charts/executor-service/templates/03-redis-service.yaml new file mode 100644 index 0000000..edf610b --- /dev/null +++ b/charts/executor-service/templates/03-redis-service.yaml @@ -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 diff --git a/charts/executor-service/templates/04-redis-pod.yaml b/charts/executor-service/templates/04-redis-pod.yaml new file mode 100644 index 0000000..b0cf894 --- /dev/null +++ b/charts/executor-service/templates/04-redis-pod.yaml @@ -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 diff --git a/charts/executor-service/values.yaml b/charts/executor-service/values.yaml new file mode 100644 index 0000000..a003751 --- /dev/null +++ b/charts/executor-service/values.yaml @@ -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}" diff --git a/charts/explorer/templates/04-explorer-ingress.yaml b/charts/explorer/templates/02-explorer-ingress.yaml similarity index 100% rename from charts/explorer/templates/04-explorer-ingress.yaml rename to charts/explorer/templates/02-explorer-ingress.yaml