Skip to content

Dev/consolidate services #358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Consolidate projecthub
  • Loading branch information
VeljkoMaksimovic committed Jun 5, 2025
commit 86f11ec6ac740008343324c995de2eb4323be13e
158 changes: 158 additions & 0 deletions projecthub/helm/templates/dpl-local-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{{- if .Values.global.development.minimalDeployment }}
apiVersion: v1
kind: Service
metadata:
name: "{{ .Chart.Name }}-grpc"
spec:
type: NodePort
selector:
app: "{{ .Chart.Name }}"
ports:
- name: grpc
port: 50051
targetPort: 50051
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Chart.Name }}
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 0
template:
metadata:
name: {{ .Chart.Name }}
labels:
app: {{ .Chart.Name }}
product: semaphoreci
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
automountServiceAccountToken: false
volumes:
- name: features-volume
configMap:
defaultMode: 0644
name: features
items:
- key: features.yml
path: features.yml
initContainers:
{{ include "initContainers.all" . | indent 8 }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.global.image.registry }}/{{ .Values.image }}:{{ .Values.imageTag }}"
securityContext:
privileged: false
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
volumeMounts:
- name: features-volume
mountPath: "/app/features.yml"
readOnly: true
subPath: features.yml
ports:
- name: grpc-port
containerPort: 50051
envFrom:
- configMapRef:
name: {{ .Values.global.internalApi.configMapName }}
env:
{{- include "env.db.elixir" . | indent 12 }}
- name: FEATURE_YAML_PATH
value: "/app/features.yml"
- name: SKIP_SCHEDULERS
value: "true"
- name: SKIP_CACHE
value: "true"
- name: MIX_ENV
value: prod
- name: START_INTERNAL_API
value: "true"
- name: START_PROJECT_INIT_WORKER
value: "true"
- name: START_PROJECT_CLEANER
value: "true"
- name: POSTGRES_DB_SSL
value: {{ .Values.global.database.ssl | quote }}
- name: POSTGRES_DB_NAME
value: {{ .Values.db.name | quote }}
- name: POSTGRES_DB_POOL_SIZE
value: {{ .Values.api.dbPoolSize | quote }}
- name: AMQP_URL
valueFrom:
secretKeyRef:
name: {{ .Values.global.rabbitmq.secretName }}
key: amqp-url
- name: HOOKS_HOST
valueFrom:
configMapKeyRef:
name: {{ .Values.global.domain.configMapName }}
key: HOOKS_HOST
{{- if .Values.global.statsd.enabled }}
- name: METRICS_NAMESPACE
value: {{ .Values.global.statsd.metricsNamespace }}
{{- end }}
- name: ON_PREM
value: "true"

{{- if .Values.api.resources }}
resources:
{{ toYaml .Values.api.resources | indent 13 }}
{{- end }}

startupProbe:
grpc:
port: 50051
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 30
readinessProbe:
grpc:
port: 50051
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
livenessProbe:
grpc:
port: 50051
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3

{{- if .Values.global.statsd.enabled }}
- name: {{ .Chart.Name }}-statsd
image: "{{ .Values.global.image.registry }}/{{ .Values.global.statsd.image }}:{{ .Values.global.statsd.imageTag }}"
env:
- name: FLUSH_INTERVAL
value: "60000"
- name: GRAPHITE_HOST
value: {{ .Values.global.statsd.graphiteHost }}
securityContext:
privileged: false
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
{{- if .Values.statsd.resources }}
resources:
{{ toYaml .Values.statsd.resources | indent 13 }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions projecthub/helm/templates/dpl-workers.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.global.development.minimalDeployment }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -117,3 +118,4 @@ spec:
{{ toYaml .Values.statsd.resources | indent 13 }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions projecthub/helm/templates/dpl.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.global.development.minimalDeployment }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -150,3 +151,4 @@ spec:
{{ toYaml .Values.statsd.resources | indent 13 }}
{{- end }}
{{- end }}
{{- end }}