Skip to content

Commit

Permalink
Merge pull request #670 from uselagoon/sshkey-handler
Browse files Browse the repository at this point in the history
feat: add api-sidecar internal handler
  • Loading branch information
tobybellwood authored Jul 3, 2024
2 parents de57ad5 + 8445398 commit 84b72a2
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 2 deletions.
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: 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

0 comments on commit 84b72a2

Please sign in to comment.