Skip to content

Commit

Permalink
chore: merge prerelease/lagoon_v217 fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Dec 14, 2023
2 parents 661d200 + bf37a80 commit 921435d
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 72 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ jobs:
if: |
(steps.list-changed.outputs.changed == 'true') ||
(contains(github.event.pull_request.labels.*.name, 'needs-testing'))
# run: make -j8 -O fill-test-ci-values TESTS=[${{ matrix.test }}] IMAGE_REGISTRY=testlagoon IMAGE_TAG=main
run: make -j8 -O fill-test-ci-values TESTS=[${{ matrix.test }}]
run: make -j8 -O fill-test-ci-values TESTS=[${{ matrix.test }}] IMAGE_REGISTRY=testlagoon IMAGE_TAG=main OVERRIDE_BUILD_DEPLOY_DIND_IMAGE=uselagoon/build-deploy-image:main OVERRIDE_ACTIVE_STANDBY_TASK_IMAGE=testlagoon/task-activestandby:main
# run: make -j8 -O fill-test-ci-values TESTS=[${{ matrix.test }}]

- name: Free up some disk space
if: |
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ SKIP_ALL_DEPS =
DISABLE_CORE_HARBOR =
# Set to `true` to enable the elements of lagoon-core that talk to OpenSearch installs
OPENSEARCH_INTEGRATION_ENABLED = false
# Ordinarily we shouldn't need to clear the API data as it's usually a first run. Set this
# variable on a test run to clear (what's clearable) first
CLEAR_API_DATA = false

TIMEOUT = 30m
HELM = helm
Expand All @@ -56,7 +59,7 @@ fill-test-ci-values:
&& export token="$$($(KUBECTL) -n lagoon create token lagoon-build-deploy --duration 3h)" \
&& export $$([ $(IMAGE_TAG) ] && echo imageTag='$(IMAGE_TAG)' || echo imageTag='latest') \
&& export webhookHandler="lagoon-core-webhook-handler" \
&& export tests='$(TESTS)' imageRegistry='$(IMAGE_REGISTRY)' \
&& export tests='$(TESTS)' imageRegistry='$(IMAGE_REGISTRY)' clearApiData='$(CLEAR_API_DATA)' \
&& valueTemplate=charts/lagoon-test/ci/linter-values.yaml \
&& envsubst < $$valueTemplate.tpl > $$valueTemplate \
&& cat $$valueTemplate
Expand Down Expand Up @@ -158,7 +161,7 @@ install-minio: install-ingress
--wait \
--timeout $(TIMEOUT) \
--set auth.rootUser=lagoonFilesAccessKey,auth.rootPassword=lagoonFilesSecretKey \
--set defaultBuckets=lagoon-files \
--set defaultBuckets='lagoon-files\,restores' \
--version=12.8.7 \
minio \
bitnami/minio
Expand Down
2 changes: 1 addition & 1 deletion charts/lagoon-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type: application
# 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.41.0
version: 1.42.0

# This is the version number of the application being deployed. This version
# number should be incremented each time you make changes to the application.
Expand Down
2 changes: 1 addition & 1 deletion charts/lagoon-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ insightsHandler:
enabled: false
image:
repository: aquasec/trivy
tag: latest
tag: 0.48.0
service:
type: ClusterIP
port: 4954
Expand Down
6 changes: 3 additions & 3 deletions charts/lagoon-remote/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies:
- name: lagoon-build-deploy
repository: https://uselagoon.github.io/lagoon-charts/
version: 0.26.2
version: 0.26.3
- name: dioscuri
repository: https://amazeeio.github.io/charts/
version: 0.4.1
Expand All @@ -11,5 +11,5 @@ dependencies:
- name: nats
repository: https://nats-io.github.io/k8s/helm/charts/
version: 0.19.17
digest: sha256:98fadf31ddfe049c50ff4554a11732ec10a9cf8a41b8e0ce1c33a37af4f81de4
generated: "2023-11-14T10:12:08.139505+11:00"
digest: sha256:1f873430b35bd44722954a1f02699e32c5e7468a9a77a135e5df3ca3766a8ed2
generated: "2023-12-08T13:18:21.18121865+11:00"
8 changes: 6 additions & 2 deletions 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.86.1
version: 0.87.0

dependencies:
- name: lagoon-build-deploy
Expand All @@ -45,4 +45,8 @@ dependencies:
annotations:
artifacthub.io/changes: |
- kind: changed
description: update lagoon-build-deploy to v0.26.2 with updated remote-controller
description: remove insights-remote service if not enabled
- kind: removed
description: removed old kubernetes build deploy references
- kind: changed
description: updated to insights-remote:v0.0.8
2 changes: 2 additions & 0 deletions charts/lagoon-remote/templates/insights-remote.service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.insightsRemote.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -13,3 +14,4 @@ spec:
name: insights-ws
selector:
{{- include "lagoon-remote.insightsRemote.selectorLabels" . | nindent 4 }}
{{- end }}

This file was deleted.

This file was deleted.

9 changes: 1 addition & 8 deletions charts/lagoon-remote/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ dockerHost:
effect: PreferNoSchedule
operator: Exists

# this account is used by the legacy Lagoon kubernetes build deploy system.
kubernetesBuildDeploy:
serviceAccount:
# The name of the service account to use.
# If not set, a name is generated using the fullname template.
name:

# sshCore creates a restricted, non-expiring ServiceAccount token for use by
# lagoon-core.
sshCore:
Expand Down Expand Up @@ -227,7 +220,7 @@ insightsRemote:
repository: uselagoon/insights-remote
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "v0.0.7"
tag: "v0.0.8"

imagePullSecrets: []
nameOverride: ""
Expand Down
4 changes: 2 additions & 2 deletions charts/lagoon-test/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# 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: 0.52.0
version: 0.53.0

# This is the version number of the application being deployed. This version
# number should be incremented each time you make changes to the application.
Expand All @@ -29,4 +29,4 @@ appVersion: v2.16.0
annotations:
artifacthub.io/changes: |
- kind: changed
description: require minimum Kubernetes 1.23
description: add minio settings to api-data-watcher-pusher and make into a helm test job
2 changes: 2 additions & 0 deletions charts/lagoon-test/ci/linter-values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ localGit:
localAPIDataWatcherPusher:
image:
repository: ${imageRegistry}/local-api-data-watcher-pusher
additonalEnvs:
CLEAR_API_DATA: ${clearApiData}

tests:
image:
Expand Down
6 changes: 3 additions & 3 deletions charts/lagoon-test/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ app.kubernetes.io/instance: {{ .Release.Name }}


{{/*
Create a default fully qualified app name for local-git.
Create a default fully qualified app name for local-api-data-watcher-pusher.
*/}}
{{- define "lagoon-test.localAPIDataWatcherPusher.fullname" -}}
{{- include "lagoon-test.fullname" . }}-local-api-data-watcher-pusher
{{- end }}

{{/*
Common labels local-git.
Common labels local-api-data-watcher-pusher.
*/}}
{{- define "lagoon-test.localAPIDataWatcherPusher.labels" -}}
helm.sh/chart: {{ include "lagoon-test.chart" . }}
Expand All @@ -111,7 +111,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels local-git.
Selector labels local-api-data-watcher-pusher.
*/}}
{{- define "lagoon-test.localAPIDataWatcherPusher.selectorLabels" -}}
app.kubernetes.io/name: {{ include "lagoon-test.name" . }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
apiVersion: apps/v1
kind: Deployment
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "lagoon-test.localAPIDataWatcherPusher.fullname" . }}
labels:
{{- include "lagoon-test.localAPIDataWatcherPusher.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
"helm.sh/hook-weight": "10"
spec:
selector:
matchLabels:
{{- include "lagoon-test.localAPIDataWatcherPusher.selectorLabels" . | nindent 6 }}
backoffLimit: 2
template:
metadata:
{{- with .Values.localAPIDataWatcherPusher.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "lagoon-test.localAPIDataWatcherPusher.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.localAPIDataWatcherPusher.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
restartPolicy: Never
securityContext:
{{- toYaml .Values.localAPIDataWatcherPusher.podSecurityContext | nindent 8 }}
terminationGracePeriodSeconds: 120
containers:
- name: api-data-watcher-pusher
securityContext:
{{- toYaml .Values.localAPIDataWatcherPusher.securityContext | nindent 10 }}
image: "{{ .Values.localAPIDataWatcherPusher.image.repository }}:{{ coalesce .Values.localAPIDataWatcherPusher.image.tag .Values.imageTag .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.localAPIDataWatcherPusher.image.pullPolicy }}
securityContext:
{{- toYaml .Values.localAPIDataWatcherPusher.securityContext | nindent 10 }}
env:
- name: API_HOST
value: {{ .Values.apiHost | quote }}
Expand All @@ -47,15 +42,18 @@ spec:
secretKeyRef:
name: {{ .Values.jwtSecretSecret | quote }}
key: JWTSECRET
- name: MINIO_SERVER_URL
value: {{ .Values.minioURL | quote }}
- name: MINIO_ROOT_USER
value: {{ .Values.minioUser | quote }}
- name: MINIO_ROOT_PASSWORD
value: {{ .Values.minioPass | quote }}
- name: TOKEN
value: {{ required "A valid .Values.token required!" .Values.token | quote }}
startupProbe:
exec:
command:
- test
- -f
- /tmp/api-data-pushed
failureThreshold: 90
{{- range $key, $val := .Values.localAPIDataWatcherPusher.additionalEnvs }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
resources:
{{- toYaml .Values.localAPIDataWatcherPusher.resources | nindent 10 }}
{{- with .Values.localAPIDataWatcherPusher.nodeSelector }}
Expand Down
3 changes: 2 additions & 1 deletion charts/lagoon-test/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ metadata:
labels:
{{- include "lagoon-test.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook": test
"helm.sh/hook-weight": "30"
spec:
containers:
- name: nc
Expand Down
3 changes: 2 additions & 1 deletion charts/lagoon-test/templates/tests/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ metadata:
labels:
{{- include "lagoon-test.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook": test
"helm.sh/hook-weight": "50"
spec:
serviceAccountName: {{ include "lagoon-test.serviceAccountName" . }}
containers:
Expand Down
6 changes: 6 additions & 0 deletions charts/lagoon-test/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ gitAuthorizedKeys: >
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw== ansible-testing
jwtSecretSecret: lagoon-core-secrets
keycloakURL: http://lagoon-core-keycloak:8080
minioURL: http://minio.minio.svc:9000
minioUser: lagoonFilesAccessKey
minioPass: lagoonFilesSecretKey
routeSuffixHTTPPort: 32080
routeSuffixHTTPSPort: 32443
sshHost: lagoon-core-ssh
Expand Down Expand Up @@ -116,6 +119,9 @@ localAPIDataWatcherPusher:
# Overrides the image tag whose default is the chart appVersion.
tag: ""

additionalEnvs:
# CLEAR_API_DATA: true

podSecurityContext: {}

securityContext: {}
Expand Down

0 comments on commit 921435d

Please sign in to comment.