Skip to content
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

feat: add api-sidecar internal handler #670

Merged
merged 8 commits into from
Jul 3, 2024
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 Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ install-lagoon-core: install-minio
--set autoIdler.enabled=false \
--set backupHandler.enabled=false \
--set broker.image.repository=$(IMAGE_REGISTRY)/broker \
--set apiSidecarHandler.image.repository=$(IMAGE_REGISTRY)/api-sidecar-handler \
--set insightsHandler.enabled=false \
--set keycloak.image.repository=$(IMAGE_REGISTRY)/keycloak \
--set keycloakDB.image.repository=$(IMAGE_REGISTRY)/keycloak-db \
Expand Down
2 changes: 1 addition & 1 deletion charts/lagoon-build-deploy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kubeVersion: ">= 1.25.0-0"

type: application

version: 0.28.0
version: 0.29.0

appVersion: v0.15.6

Expand Down
2 changes: 2 additions & 0 deletions charts/lagoon-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ annotations:
description: update values for local development
- kind: changed
description: bump minimum Kubernetes version to 1.25
- kind: changed
description: added api-sidecar-handler container to api and webhooks2tasks
8 changes: 6 additions & 2 deletions charts/lagoon-core/ci/linter-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ apiRedis:
requests:
cpu: "10m"

apiSidecarHandler:
image:
repository: uselagoon/api-sidecar-handler

actionsHandler:
replicaCount: 1
image:
Expand Down Expand Up @@ -216,8 +220,8 @@ natsService:
natsConfig:
users:
lagoonRemote:
- user: ci-ssh-portal
password: ci-password
- user: ci-ssh-portal
password: ci-password
tls:
secretData:
ca.crt: |
Expand Down
4 changes: 4 additions & 0 deletions charts/lagoon-core/ci/testlagoon-main-override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ apiRedis:
image:
repository: testlagoon/api-redis

apiSidecarHandler:
image:
repository: testlagoon/api-sidecar-handler

actionsHandler:
image:
repository: testlagoon/actions-handler
Expand Down
21 changes: 21 additions & 0 deletions charts/lagoon-core/templates/api.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,27 @@ spec:
- secretRef:
name: {{ include "lagoon-core.api.fullname" . }}
containers:
- name: api-sidecar-handler
securityContext:
{{- toYaml .Values.api.securityContext | nindent 10 }}
image: "{{ .Values.apiSidecarHandler.image.repository }}:{{ coalesce .Values.apiSidecarHandler.image.tag .Values.imageTag .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.apiSidecarHandler.image.pullPolicy }}
livenessProbe:
httpGet:
path: /status
port: 3333
readinessProbe:
httpGet:
path: /status
port: 3333
startupProbe:
httpGet:
path: /status
port: 3333
failureThreshold: 60
periodSeconds: 10
resources:
{{- toYaml .Values.api.resources | nindent 10 }}
- name: api
securityContext:
{{- toYaml .Values.api.securityContext | nindent 10 }}
Expand Down
21 changes: 21 additions & 0 deletions charts/lagoon-core/templates/webhooks2tasks.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,27 @@ spec:
securityContext:
{{- toYaml (coalesce .Values.webhooks2tasks.podSecurityContext .Values.podSecurityContext) | nindent 8 }}
containers:
- name: api-sidecar-handler
securityContext:
{{- toYaml .Values.webhooks2tasks.securityContext | nindent 10 }}
image: "{{ .Values.apiSidecarHandler.image.repository }}:{{ coalesce .Values.apiSidecarHandler.image.tag .Values.imageTag .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.apiSidecarHandler.image.pullPolicy }}
livenessProbe:
httpGet:
path: /status
port: 3333
readinessProbe:
httpGet:
path: /status
port: 3333
startupProbe:
httpGet:
path: /status
port: 3333
failureThreshold: 60
periodSeconds: 10
resources:
{{- toYaml .Values.webhooks2tasks.resources | nindent 10 }}
- name: webhooks2tasks
securityContext:
{{- toYaml .Values.webhooks2tasks.securityContext | nindent 10 }}
Expand Down
7 changes: 7 additions & 0 deletions charts/lagoon-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ apiRedis:
type: ClusterIP
port: 6379

apiSidecarHandler:
image:
repository: uselagoon/api-sidecar-handler
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: ""

keycloak:
# keycloak realm and email settings configuration
realmSettings:
Expand Down
2 changes: 1 addition & 1 deletion charts/lagoon-remote/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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.
version: 0.91.0
version: 0.92.0

dependencies:
- name: lagoon-build-deploy
Expand Down
Loading