Skip to content

Commit

Permalink
chore: merge main fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Oct 16, 2023
2 parents afd5a7a + d1d3aa4 commit c32eced
Show file tree
Hide file tree
Showing 32 changed files with 341 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-test-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: "0"

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Helm
run: |
cd /tmp
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: "0"

Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: "0"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: "0"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
continue-on-error: true

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: "0"

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ install-mariadb:
--wait \
--timeout $(TIMEOUT) \
$$($(KUBECTL) get ns mariadb > /dev/null 2>&1 && echo --set auth.rootPassword=$$($(KUBECTL) get secret --namespace mariadb mariadb -o json | $(JQ) -r '.data."mariadb-root-password" | @base64d')) \
--version=11.5.7 \
--version=12.2.9 \
mariadb \
bitnami/mariadb

Expand Down Expand Up @@ -178,7 +178,7 @@ install-lagoon-core: install-minio
$$([ $(OVERRIDE_BUILD_DEPLOY_DIND_IMAGE) ] && echo '--set buildDeployImage.default.image=$(OVERRIDE_BUILD_DEPLOY_DIND_IMAGE)') \
$$([ $(DISABLE_CORE_HARBOR) ] && echo '--set api.additionalEnvs.DISABLE_CORE_HARBOR=$(DISABLE_CORE_HARBOR)') \
$$([ $(OPENSEARCH_INTEGRATION_ENABLED) ] && echo '--set api.additionalEnvs.OPENSEARCH_INTEGRATION_ENABLED=$(OPENSEARCH_INTEGRATION_ENABLED)') \
--set "keycloakAPIURL=http://lagoon-keycloak.$$($(KUBECTL) get nodes -o jsonpath='{.items[0].status.addresses[0].address}').nip.io:32080/auth" \
--set "keycloakFrontEndURL=http://lagoon-keycloak.$$($(KUBECTL) get nodes -o jsonpath='{.items[0].status.addresses[0].address}').nip.io:32080" \
--set "lagoonAPIURL=http://lagoon-api.$$($(KUBECTL) get nodes -o jsonpath='{.items[0].status.addresses[0].address}').nip.io:32080/graphql" \
--set actionsHandler.image.repository=$(IMAGE_REGISTRY)/actions-handler \
--set api.image.repository=$(IMAGE_REGISTRY)/api \
Expand Down
8 changes: 4 additions & 4 deletions charts/lagoon-build-deploy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ kubeVersion: ">= 1.21.0-0"

type: application

version: 0.24.0
version: 0.25.2

appVersion: v0.14.0
appVersion: v0.15.2

annotations:
artifacthub.io/changes: |
- kind: changed
description: update remote-controller appVersion to v0.14.0
description: update remote-controller appVersion to v0.15.2
- kind: changed
description: updated lagoontask crd, will require crds to be re-applied
description: added flag support for enabling k8up v2 support
3 changes: 3 additions & 0 deletions charts/lagoon-build-deploy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ spec:
{{- with .Values.lagoonFeatureFlagBackupWeeklyRandom }}
- "--lagoon-feature-flag-backup-weekly-random={{ . }}"
{{- end }}
{{- with .Values.lagoonFeatureFlagSupportK8upV2 }}
- "--lagoon-feature-flag-support-k8upv2={{ . }}"
{{- end }}
{{- with .Values.lagoonBackupDefaultSchedule }}
- "--backup-default-schedule={{ . }}"
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions charts/lagoon-build-deploy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ namespacePrefix: ""
# lagoonFeatureFlagDefaultInsights: disabled
# lagoonFeatureFlagForceRWX2RWO: disabled
# lagoonFeatureFlagDefaultRWX2RWO: disabled
# lagoonFeatureFlagSupportK8upV2: false

# It is also possible to define feature flags using `extraEnvs` by defining them like so
# this method is useful for enabling features on the fly, ones that might not have built in support
Expand Down
6 changes: 3 additions & 3 deletions charts/lagoon-core/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: nats
repository: https://nats-io.github.io/k8s/helm/charts/
version: 0.18.3
digest: sha256:23ec68e1604f1b9f90bd9571e7e17c6101524be61b304de03f378a31a6c55fbd
generated: "2022-11-24T11:53:36.184266854+11:00"
version: 0.19.17
digest: sha256:9c58fc4ddeec7b86f5ef2cf1996a48a7e09d9bd4aa149971e2525a6f05649bf8
generated: "2023-07-28T09:49:46.220986689+08:00"
6 changes: 3 additions & 3 deletions charts/lagoon-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ 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.35.1
version: 1.37.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.
# Versions are not expected to follow Semantic Versioning. They should reflect
# the version the application is using.
appVersion: v2.15.3
appVersion: v2.16.0

dependencies:
- name: nats
version: ~0.18.0
version: ~0.19.0
repository: https://nats-io.github.io/k8s/helm/charts/
condition: nats.enabled

Expand Down
2 changes: 1 addition & 1 deletion charts/lagoon-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ kind create cluster
helm upgrade --install --create-namespace --namespace lagoon-core \
--values ./charts/lagoon-core/ci/linter-values.yaml \
--set lagoonAPIURL=http://localhost:7070/graphql \
--set keycloakAPIURL=http://localhost:8080/auth \
--set keycloakFrontEndURL=http://localhost:8080 \
lagoon-core \
./charts/lagoon-core

Expand Down
22 changes: 20 additions & 2 deletions charts/lagoon-core/ci/linter-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ lagoonWebhookURL: http://webhook:11213
defaultIngressClassName: nginx

# used in ui
lagoonAPIURL: https://api.example.com/graphql
keycloakAPIURL: https://keycloak.example.com/auth
# lagoonAPIURL: https://api.example.com/graphql
# keycloakFrontEndURL: https://keycloak.example.com

keycloakAdminEmail: [email protected]

api:
replicaCount: 1
Expand Down Expand Up @@ -53,6 +55,22 @@ actionsHandler:
repository: uselagoon/actions-handler

keycloak:
keycloakFrontEndURL: https://keycloak.example.com
realmSettings:
enabled: true
options:
resetPasswordAllowed: true
rememberMe: true
email:
enabled: true
settings:
host: mailhog
port: '1025'
fromDisplayName: Lagoon
from: [email protected]
replyToDisplayName: Lagoon No-Reply
replyTo: [email protected]
envelopeFrom: [email protected]
image:
repository: uselagoon/keycloak
resources:
Expand Down
15 changes: 15 additions & 0 deletions charts/lagoon-core/templates/api-redis.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,22 @@ spec:
secretKeyRef:
name: {{ include "lagoon-core.api.fullname" . }}
key: REDIS_PASSWORD
{{- if .Values.apiRedis.persistence.enabled }}
- name: FLAVOR
value: persistent
{{- end }}
{{- range $key, $val := .Values.apiRedis.additionalEnvs }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
ports:
- name: redis
containerPort: 6379
{{- if .Values.apiRedis.persistence.enabled }}
volumeMounts:
- name: {{ include "lagoon-core.apiRedis.fullname" . }}-data
mountPath: /data
{{- end }}
livenessProbe:
tcpSocket:
port: redis
Expand All @@ -51,6 +60,12 @@ spec:
port: redis
resources:
{{- toYaml .Values.apiRedis.resources | nindent 10 }}
{{- if .Values.apiRedis.persistence.enabled }}
volumes:
- name: {{ include "lagoon-core.apiRedis.fullname" . }}-data
persistentVolumeClaim:
claimName: {{ include "lagoon-core.apiRedis.fullname" . }}-data
{{- end }}
{{- with .Values.apiRedis.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
17 changes: 17 additions & 0 deletions charts/lagoon-core/templates/api-redis.pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.apiRedis.persistence.enabled -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "lagoon-core.apiRedis.fullname" . }}-data
labels:
{{- include "lagoon-core.apiRedis.labels" . | nindent 4 }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.apiRedis.persistence.size | quote }}
{{- with .Values.apiRedis.persistence.storageClass }}
storageClassName: {{ . | quote }}
{{- end }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/lagoon-core/templates/api.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,13 @@ spec:
name: {{ include "lagoon-core.keycloak.fullname" . }}
key: KEYCLOAK_API_CLIENT_SECRET
- name: KEYCLOAK_URL
{{- if .Values.keycloakFrontEndURL }}
value: {{ .Values.keycloakFrontEndURL }}
{{- else if .Values.keycloak.ingress.enabled }}
value: https://{{ index .Values.keycloak.ingress.hosts 0 "host" }}
{{- else }}
value: http://{{ include "lagoon-core.keycloak.fullname" . }}:{{ .Values.keycloak.service.port }}
{{- end }}
- name: KIBANA_URL
value: {{ required "A valid .Values.kibanaURL required!" .Values.kibanaURL | quote }}
- name: LAGOON_VERSION
Expand Down
8 changes: 8 additions & 0 deletions charts/lagoon-core/templates/broker.servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ metadata:
spec:
endpoints:
- port: metrics
- interval: 30s
params:
family:
- queue_coarse_metrics
- queue_metrics
path: /metrics/detailed
port: metrics
scrapeTimeout: 29s
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down
24 changes: 24 additions & 0 deletions charts/lagoon-core/templates/keycloak.configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- if .Values.keycloak.email.enabled -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "lagoon-core.keycloak.fullname" . }}-smtp-settings
labels:
{{- include "lagoon-core.keycloak.labels" . | nindent 4 }}
data:
keycloak-smtp-settings.json: |
{"smtpServer":{{ .Values.keycloak.email.settings | toJson }}}
{{ end -}}
{{- if .Values.keycloak.realmSettings.enabled -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "lagoon-core.keycloak.fullname" . }}-realm-settings
labels:
{{- include "lagoon-core.keycloak.labels" . | nindent 4 }}
data:
keycloak-realm-settings.json: |
{{ .Values.keycloak.realmSettings.options | toJson }}
{{ end -}}
36 changes: 36 additions & 0 deletions charts/lagoon-core/templates/keycloak.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ spec:
value: {{ include "lagoon-core.keycloakDB.fullname" . }}
- name: KEYCLOAK_ADMIN_USER
value: {{ .Values.keycloakAdminUser | quote }}
- name: KEYCLOAK_FRONTEND_URL
{{- if .Values.keycloakFrontEndURL }}
value: {{ .Values.keycloakFrontEndURL }}/auth
{{- else if .Values.keycloak.ingress.enabled }}
value: https://{{ index .Values.keycloak.ingress.hosts 0 "host" }}/auth
{{- else }}
value: http://{{ include "lagoon-core.keycloak.fullname" . }}:{{ .Values.keycloak.service.port }}/auth
{{- end }}
{{- with .Values.keycloakAdminEmail }}
- name: KEYCLOAK_ADMIN_EMAIL
value: {{ . | quote }}
{{- end }}
{{- range $key, $val := .Values.keycloak.additionalEnvs }}
- name: {{ $key }}
value: {{ $val | quote }}
Expand All @@ -67,6 +79,17 @@ spec:
- /tmp/keycloak-config-complete
failureThreshold: 90
periodSeconds: 20
volumeMounts:
{{- if .Values.keycloak.email.enabled }}
- mountPath: /lagoon/keycloak/keycloak-smtp-settings.json
name: {{ include "lagoon-core.keycloak.fullname" . }}-smtp-settings
subPath: keycloak-smtp-settings.json
{{- end }}
{{- if .Values.keycloak.realmSettings.enabled }}
- mountPath: /lagoon/keycloak/keycloak-realm-settings.json
name: {{ include "lagoon-core.keycloak.fullname" . }}-realm-settings
subPath: keycloak-realm-settings.json
{{- end }}
resources:
{{- toYaml .Values.keycloak.resources | nindent 10 }}
{{- with .Values.keycloak.nodeSelector }}
Expand All @@ -81,3 +104,16 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.keycloak.email.enabled }}
- configMap:
defaultMode: 420
name: {{ include "lagoon-core.keycloak.fullname" . }}-smtp-settings
name: {{ include "lagoon-core.keycloak.fullname" . }}-smtp-settings
{{- end }}
{{- if .Values.keycloak.realmSettings.enabled }}
- configMap:
defaultMode: 420
name: {{ include "lagoon-core.keycloak.fullname" . }}-realm-settings
name: {{ include "lagoon-core.keycloak.fullname" . }}-realm-settings
{{- end }}
6 changes: 6 additions & 0 deletions charts/lagoon-core/templates/opensearch-sync.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ spec:
name: {{ include "lagoon-core.apiDB.fullname" . }}
key: API_DB_PASSWORD
- name: KEYCLOAK_BASE_URL
{{- if .Values.keycloakFrontEndURL }}
value: {{ .Values.keycloakFrontEndURL }}/
{{- else if .Values.keycloak.ingress.enabled }}
value: https://{{ index .Values.keycloak.ingress.hosts 0 "host" }}/
{{- else }}
value: http://{{ include "lagoon-core.keycloak.fullname" . }}:{{ .Values.keycloak.service.port }}/
{{- end }}
- name: KEYCLOAK_CLIENT_ID
value: lagoon-opensearch-sync
- name: KEYCLOAK_CLIENT_SECRET
Expand Down
6 changes: 6 additions & 0 deletions charts/lagoon-core/templates/ssh-portal-api.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ spec:
value: "true"
{{- end }}
- name: KEYCLOAK_BASE_URL
{{- if .Values.keycloakFrontEndURL }}
value: {{ .Values.keycloakFrontEndURL }}/
{{- else if .Values.keycloak.ingress.enabled }}
value: https://{{ index .Values.keycloak.ingress.hosts 0 "host" }}/
{{- else }}
value: http://{{ include "lagoon-core.keycloak.fullname" . }}:{{ .Values.keycloak.service.port }}/
{{- end }}
- name: KEYCLOAK_SERVICE_API_CLIENT_SECRET
valueFrom:
secretKeyRef:
Expand Down
6 changes: 6 additions & 0 deletions charts/lagoon-core/templates/ssh-token.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ spec:
value: "true"
{{- end }}
- name: KEYCLOAK_BASE_URL
{{- if .Values.keycloakFrontEndURL }}
value: {{ .Values.keycloakFrontEndURL }}/
{{- else if .Values.keycloak.ingress.enabled }}
value: https://{{ index .Values.keycloak.ingress.hosts 0 "host" }}/
{{- else }}
value: http://{{ include "lagoon-core.keycloak.fullname" . }}:{{ .Values.keycloak.service.port }}/
{{- end }}
- name: KEYCLOAK_AUTH_SERVER_CLIENT_SECRET
valueFrom:
secretKeyRef:
Expand Down
Loading

0 comments on commit c32eced

Please sign in to comment.