Skip to content

Commit

Permalink
Merge pull request #5 from orkes-io/community_charts
Browse files Browse the repository at this point in the history
charts for community edition
  • Loading branch information
boney9 authored Dec 1, 2022
2 parents ee2fced + 4a0c19e commit 8750f1c
Show file tree
Hide file tree
Showing 9 changed files with 224 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/.idea/orkes-helm-charts.iml
/.idea/vcs.xml
/.idea/.gitignore
charts/orkes-conductor-community/gcp.yaml
24 changes: 24 additions & 0 deletions charts/orkes-conductor-community/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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/
gcp.yaml
11 changes: 11 additions & 0 deletions charts/orkes-conductor-community/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v2
name: orkes-conductor-community
description: Orkes Conductor Community Deployment Helm Charts

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: 1.0.0
appVersion: "1.0.3"
1 change: 1 addition & 0 deletions charts/orkes-conductor-community/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
You can access conductor using the service created by this helm chart
68 changes: 68 additions & 0 deletions charts/orkes-conductor-community/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "orkes-conductor-community.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "orkes-conductor-community.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "orkes-conductor-community.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "orkes-conductor-community.labels" -}}
helm.sh/chart: {{ include "orkes-conductor-community.chart" . }}
{{ include "orkes-conductor-community.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "orkes-conductor-community.selectorLabels" -}}
app.kubernetes.io/name: {{ include "orkes-conductor-community.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "orkes-conductor-community.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "orkes-conductor-community.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{- define "imagePullSecret" }}
{{- with .Values.imageCredentials }}
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
{{- end }}
{{- end }}
63 changes: 63 additions & 0 deletions charts/orkes-conductor-community/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "orkes-conductor-community.fullname" . }}
labels:
{{- include "orkes-conductor-community.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "orkes-conductor-community.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
prometheus.io/path: /actuator/prometheus
prometheus.io/port: "8080"
prometheus.io/scrape: "true"
labels:
{{- include "orkes-conductor-community.selectorLabels" . | nindent 8 }}
spec:
containers:
- env:
- name: cloud.env
value: gcp
- name: conductor.redis-lock.serverAddress
value: redis://{{ .Values.redis.host }}:{{ .Values.redis.port }}
- name: SPRING_PROFILES_ACTIVE
value: logrotate
- name: spring.datasource.password
value: {{ .Values.postgres.password | quote }}
- name: spring.datasource.username
value: {{ .Values.postgres.username | quote }}
- name: spring.datasource.url
value: {{ .Values.postgres.url | quote }}
- name: DEPLOY_ENV
value: prod
- name: conductor.redis.hosts
value: {{ .Values.redis.host }}:{{ .Values.redis.port }}:us-east-1c
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: Always
name: orkes-conductor-community
ports:
- name: liveness-port
containerPort: 8080
protocol: TCP
resources:
limits:
cpu: {{ .Values.app.resources.cpuLimit | quote }}
memory: {{ .Values.app.resources.memoryLimit | quote }}
requests:
cpu: {{ .Values.app.resources.cpuRequests | quote }}
memory: {{ .Values.app.resources.memoryRequests | quote }}
startupProbe:
httpGet:
path: /health
port: liveness-port
failureThreshold: 30
periodSeconds: 10
imagePullSecrets:
- name: orkesregistry
restartPolicy: Always
schedulerName: default-scheduler
terminationGracePeriodSeconds: 30
7 changes: 7 additions & 0 deletions charts/orkes-conductor-community/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: orkesregistry
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "imagePullSecret" . }}
15 changes: 15 additions & 0 deletions charts/orkes-conductor-community/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "orkes-conductor-community.fullname" . }}
labels:
{{- include "orkes-conductor-community.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
protocol: TCP
targetPort: 5000
name: default-ui-port
selector:
{{- include "orkes-conductor-community.selectorLabels" . | nindent 4 }}
34 changes: 34 additions & 0 deletions charts/orkes-conductor-community/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
replicaCount: 2

service:
port: 5000

image:
repository: orkesio/orkes-conductor-community
tag: 1.0.3
pullPolicy: Always
livenessPort: 8080


app:
resources:
cpuLimit: "3"
memoryLimit: "3Gi"
cpuRequests: "2"
memoryRequests: "2Gi"

redis:
host: host
port: "6379"
password: ""

postgres:
username: "username"
password: "password"
url: "jdbc:postgresql:/host:5432/postgres"

imageCredentials:
registry: https://index.docker.io/v1/
username: orkesdocker
password: <YOUR SECRET>
email: [email protected]

0 comments on commit 8750f1c

Please sign in to comment.