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 all commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*/out/*
*/*/out/*
**/_wildcard*
2 changes: 2 additions & 0 deletions artifacthub/helm/templates/dpl-bucketcleaner-scheduler.yml
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 @@ -85,3 +86,4 @@ spec:
drop:
- ALL
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions artifacthub/helm/templates/dpl-bucketcleaner-worker.yml
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 @@ -84,3 +85,4 @@ spec:
drop:
- ALL
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions artifacthub/helm/templates/dpl-internal-api.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 @@ -112,3 +113,4 @@ spec:
drop:
- ALL
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions artifacthub/helm/templates/dpl-public-api.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 @@ -106,3 +107,4 @@ spec:
drop:
- ALL
{{- end }}
{{- end }}
146 changes: 146 additions & 0 deletions artifacthub/helm/templates/minimal-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{{- if .Values.global.development.minimalDeployment }}
apiVersion: v1
kind: Service
metadata:
name: "{{ .Chart.Name }}-public-grpc-api"
spec:
type: ClusterIP
clusterIP: None
selector:
app: "{{ .Chart.Name }}"
ports:
- name: public-grpc-api
port: 50052
targetPort: 50052
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: "{{ .Chart.Name }}-internal-grpc-api"
spec:
type: ClusterIP
clusterIP: None
selector:
app: "{{ .Chart.Name }}"
ports:
- name: public-grpc-api
port: 50051
targetPort: 50051
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ .Chart.Name }}"
spec:
selector:
matchLabels:
app: "{{ .Chart.Name }}"
replicas: 1
template:
metadata:
name: "{{ .Chart.Name }}"
labels:
app: "{{ .Chart.Name }}"
product: semaphoreci
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
automountServiceAccountToken: false
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
ports:
- name: grpc-port
containerPort: 50052
envFrom:
- secretRef:
name: {{ .Values.global.artifacts.secretName }}
env:
{{- include "env.db.go" . | indent 12 }}
- name: START_PUBLIC_API
value: "yes"
- name: START_INTERNAL_API
value: "yes"
- name: LOG_LEVEL
value: "INFO"
- name: START_BUCKETCLEANER_WORKER
value: "yes"
- name: BUCKETCLEANER_WORKER_NUMBER_OF_PAGES_TO_PROCESS_IN_ONE_GO
value: "10"
- name: START_BUCKETCLEANER_SCHEDULER
value: "yes"
- name: BUCKETCLEANER_SCHEDULER_NAPTIME
value: "60"
- name: BUCKETCLEANER_SCHEDULER_BATCHSIZE
value: "100"
- name: OIB_OTHER_MIMES
value: ".md:text/plain,.txt:text/plain; charset=utf-8"
- name: OPEN_IN_BROWSER
value: "image/jpeg,image/png,text/html; charset=utf-8,image/svg+xml"
- name: CORS_ORIGINS
valueFrom:
configMapKeyRef:
name: {{ .Values.global.domain.configMapName }}
key: CORS_ORIGINS
- name: POSTGRES_DB_SSL
value: {{ .Values.global.database.ssl | quote }}
- name: DB_NAME
value: {{ .Values.db.name | quote }}
- name: APPLICATION_NAME
value: "{{ .Chart.Name }}"
- name: AMQP_URL
valueFrom:
secretKeyRef:
name: {{ .Values.global.rabbitmq.secretName }}
key: amqp-url
- name: JWT_HMAC_SECRET
valueFrom:
secretKeyRef:
name: {{ include "secrets.jwt.name" . }}
key: artifacts
{{- if .Values.global.statsd.enabled }}
- name: METRICS_NAMESPACE
value: {{ .Values.global.statsd.metricsNamespace }}
{{- end }}

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

{{- 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 }}
{{- if .Values.statsd.resources }}
resources:
{{ toYaml .Values.statsd.resources | indent 13 }}
{{- end }}
securityContext:
privileged: false
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions github_notifier/helm/templates/api.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 @@ -91,3 +92,4 @@ spec:
drop:
- ALL
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions github_notifier/helm/templates/consumer.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 @@ -93,3 +94,4 @@ spec:
drop:
- ALL
{{- end }}
{{- end }}
95 changes: 95 additions & 0 deletions github_notifier/helm/templates/minimal-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{{- if .Values.global.development.minimalDeployment }}
apiVersion: v1
kind: Service
metadata:
name: "{{ .Chart.Name }}"
namespace: {{ .Release.Namespace }}
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 }}"
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
app: "{{ .Chart.Name }}"
replicas: {{ .Values.api.replicas }}
template:
metadata:
name: "{{ .Chart.Name }}"
labels:
app: "{{ .Chart.Name }}"
product: semaphoreci
spec:
automountServiceAccountToken: false
initContainers:
{{ include "initContainers.waitForRabbitMQ" . | 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
envFrom:
- configMapRef:
name: {{ .Values.global.internalApi.configMapName }}
env:
- name: START_CONSUMERS
value: "true"
- name: START_API
value: "true"
- name: BASE_DOMAIN
valueFrom:
configMapKeyRef:
name: {{ .Values.global.domain.configMapName }}
key: BASE_DOMAIN
{{- if .Values.global.statsd.enabled }}
- name: METRICS_NAMESPACE
value: {{ .Values.global.statsd.metricsNamespace }}
{{- end }}
- name: AMQP_URL
valueFrom:
secretKeyRef:
name: {{ .Values.global.rabbitmq.secretName }}
key: amqp-url

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

{{- 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 }}
{{- if .Values.statsd.resources }}
resources:
{{ toYaml .Values.statsd.resources | indent 13 }}
{{- end }}
securityContext:
privileged: false
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions guard/helm/templates/dpl-api.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 @@ -168,3 +169,4 @@ spec:
{{ toYaml .Values.statsd.resources | indent 13 }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions guard/helm/templates/dpl-authentication-api.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 @@ -207,3 +208,4 @@ spec:
drop:
- ALL
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions guard/helm/templates/dpl-id-api.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 @@ -223,3 +224,4 @@ spec:
drop:
- ALL
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions guard/helm/templates/dpl-worker.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 @@ -138,3 +139,4 @@ spec:
drop:
- ALL
{{- end }}
{{- end }}
3 changes: 2 additions & 1 deletion guard/helm/templates/instance-config.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 @@ -226,4 +227,4 @@ spec:
{{ toYaml .Values.statsd.resources | indent 13 }}
{{- end }}
{{- end }}

{{- end }}
Loading