Skip to content

Commit

Permalink
Merge branch 'main' into docker-host-chart
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon authored Jun 30, 2023
2 parents b7348b6 + 2c52e76 commit de86335
Show file tree
Hide file tree
Showing 48 changed files with 229 additions and 2,639 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/lint-test-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ jobs:
fail-fast: false
matrix:
kindest_node_version:
- v1.21.14@sha256:9d9eb5fb26b4fbc0c6d95fa8c790414f9750dd583f5d7cee45d92e8c26670aa1
- v1.22.15@sha256:7d9708c4b0873f0fe2e171e2b1b7f45ae89482617778c1c875f1053d4cef2e41
- v1.23.13@sha256:ef453bb7c79f0e3caba88d2067d4196f427794086a7d0df8df4f019d5e336b61
- v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
- v1.26.0@sha256:691e24bd2417609db7e589e1a479b902d2e209892a10ce375fab60a8407c7352
- v1.21.14@sha256:220cfafdf6e3915fbce50e13d1655425558cb98872c53f802605aa2fb2d569cf
- v1.22.17@sha256:9af784f45a584f6b28bce2af84c494d947a05bd709151466489008f80a9ce9d5
- v1.23.17@sha256:f77f8cf0b30430ca4128cc7cfafece0c274a118cd0cdb251049664ace0dee4ff
- v1.24.13@sha256:cea86276e698af043af20143f4bf0509e730ec34ed3b7fa790cc0bea091bc5dd
- v1.26.4@sha256:f4c0d87be03d6bea69f5e5dc0adb678bb498a190ee5c38422bf751541cebe92e
- v1.27.1@sha256:b7d12ed662b873bd8510879c1846e87c7e676a79fefc93e17b2a52989d3ff42b
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -41,13 +42,18 @@ jobs:
run: ct lint --config ./default.ct.yaml

- name: Create kind cluster
uses: helm/kind-action@v1.5.0
uses: helm/kind-action@v1.7.0
with:
version: v0.17.0
version: v0.19.0
node_image: kindest/node:${{ matrix.kindest_node_version }}
if: |
(steps.list-changed.outputs.changed == 'true') ||
(contains(github.event.pull_request.labels.*.name, 'needs-testing'))
- name: Run chart-testing (install)
run: ct install --config ./default.ct.yaml

- name: Run chart-testing (needs-testing)
run: ct install --config ./default.ct.yaml --all
if: |
(contains(github.event.pull_request.labels.*.name, 'needs-testing'))
15 changes: 4 additions & 11 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ jobs:
helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com
helm repo add lagoon https://uselagoon.github.io/lagoon-charts/
helm repo add amazeeio https://amazeeio.github.io/charts/
helm repo add gatekeeper https://open-policy-agent.github.io/gatekeeper/charts
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm repo add kube-logging https://kube-logging.github.io/helm-charts
- name: Generate helm templates
run: |
cd charts
# hacky workaround for lagoon-test templated values
tests=[foo,bar] envsubst '$tests' < lagoon-test/ci/linter-values.yaml.tpl > lagoon-test/ci/linter-values.yaml
# don't lint lagoon-gatekeeper
rm -rf lagoon-gatekeeper
for chart in *; do
helm dependency build $chart
mkdir -p /tmp/charts/$chart
Expand All @@ -37,11 +35,6 @@ jobs:
--output-dir /tmp/charts/$chart
done
# workaround until gatekeeper templates are fixed:
# * https://github.com/open-policy-agent/gatekeeper/pull/1114
# * https://github.com/open-policy-agent/gatekeeper/pull/1115
rm -rf /tmp/charts/lagoon-gatekeeper/lagoon-gatekeeper/charts/gatekeeper
rm -rf /tmp/charts/lagoon-remote/lagoon-remote/charts/lagoon-gatekeeper/charts/gatekeeper
# workaround until logging-operator templates are fixed:
# https://github.com/banzaicloud/logging-operator/pull/792
rm -rf /tmp/charts/lagoon-logging/lagoon-logging/charts/logging-operator
Expand Down Expand Up @@ -91,10 +84,10 @@ jobs:
run: ct lint --config ./default.ct.yaml

- name: Create kind cluster
uses: helm/kind-action@v1.5.0
uses: helm/kind-action@v1.7.0
with:
version: v0.17.0
node_image: kindest/node:v1.24.7@sha256:577c630ce8e509131eab1aea12c022190978dd2f745aac5eb1fe65c0807eb315
version: v0.19.0
node_image: kindest/node:v1.25.9@sha256:c08d6c52820aa42e533b70bce0c2901183326d86dcdcbedecc9343681db45161
if: |
(steps.list-changed.outputs.changed == 'true') ||
(contains(github.event.pull_request.labels.*.name, 'needs-testing'))
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com
helm repo add lagoon https://uselagoon.github.io/lagoon-charts/
helm repo add amazeeio https://amazeeio.github.io/charts/
helm repo add gatekeeper https://open-policy-agent.github.io/gatekeeper/charts
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm repo add kube-logging https://kube-logging.github.io/helm-charts
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.5.0
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: pull_request
jobs:
# runs for lagoon-core, lagoon-remote, lagoon-test
test-suite:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -69,15 +69,15 @@ jobs:
envsubst < test-suite.kind-config.yaml.tpl > test-suite.kind-config.yaml
- name: Create kind cluster
uses: helm/kind-action@v1.5.0
uses: helm/kind-action@v1.7.0
if: |
(steps.list-changed.outputs.changed == 'true') ||
(contains(github.event.pull_request.labels.*.name, 'needs-testing'))
with:
version: v0.17.0
node_image: kindest/node:v1.24.7@sha256:577c630ce8e509131eab1aea12c022190978dd2f745aac5eb1fe65c0807eb315
version: v0.19.0
node_image: kindest/node:v1.25.9@sha256:c08d6c52820aa42e533b70bce0c2901183326d86dcdcbedecc9343681db45161
config: test-suite.kind-config.yaml
kubectl_version: v1.24.7
kubectl_version: v1.25.9

- name: Check node IP matches kind configuration
if: |
Expand All @@ -97,7 +97,6 @@ jobs:
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo add stable https://charts.helm.sh/stable
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add gatekeeper https://open-policy-agent.github.io/gatekeeper/charts
helm repo add amazeeio https://amazeeio.github.io/charts/
helm repo add lagoon https://uselagoon.github.io/lagoon-charts/
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
Expand All @@ -108,9 +107,9 @@ jobs:
(contains(github.event.pull_request.labels.*.name, 'needs-testing'))
run: |
cd /tmp
curl -sSLO https://github.com/itchyny/gojq/releases/download/v0.12.9/gojq_v0.12.9_linux_amd64.tar.gz
tar -xf ./gojq_v0.12.9_linux_amd64.tar.gz
sudo cp /tmp/gojq_v0.12.9_linux_amd64/gojq /usr/local/bin/jq
curl -sSLO https://github.com/itchyny/gojq/releases/download/v0.12.12/gojq_v0.12.12_linux_amd64.tar.gz
tar -xf ./gojq_v0.12.12_linux_amd64.tar.gz
sudo cp /tmp/gojq_v0.12.12_linux_amd64/gojq /usr/local/bin/jq
- name: Install kubens and kubectl alias
run: |
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ install-ingress:
--set controller.config.hsts="false" \
--set controller.watchIngressWithoutClass=true \
--set controller.ingressClassResource.default=true \
--version=4.5.2 \
--version=4.6.1 \
ingress-nginx \
ingress-nginx/ingress-nginx

Expand All @@ -103,7 +103,7 @@ install-registry: install-ingress
--set clair.enabled=false \
--set notary.enabled=false \
--set trivy.enabled=false \
--version=1.11.0 \
--version=1.12.1 \
registry \
harbor/harbor

Expand All @@ -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.4.7 \
--version=11.5.7 \
mariadb \
bitnami/mariadb

Expand Down Expand Up @@ -159,7 +159,7 @@ install-minio: install-ingress
--timeout $(TIMEOUT) \
--set auth.rootUser=lagoonFilesAccessKey,auth.rootPassword=lagoonFilesSecretKey \
--set defaultBuckets=lagoon-files \
--version=12.1.7 \
--version=12.6.0 \
minio \
bitnami/minio

Expand Down
6 changes: 3 additions & 3 deletions charts/lagoon-build-deploy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ kubeVersion: ">= 1.21.0-0"

type: application

version: 0.22.0
version: 0.23.1

appVersion: v0.12.0
appVersion: v0.13.1

annotations:
artifacthub.io/changes: |
- kind: changed
description: update remote-controller appVersion to v0.12.0
description: update remote-controller appVersion to v0.13.1
8 changes: 5 additions & 3 deletions charts/lagoon-build-deploy/ci/linter-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ rabbitMQUsername: lagoon
rabbitMQPassword: ci
rabbitMQHostname: lagoon-core-broker
lagoonTargetName: ci-local-control-k8s
taskSSHHost: lagoon-core-ssh.lagoon.svc
taskSSHPort: 2020
taskAPIHost: http://lagoon-core-api.lagoon.svc:80
sshPortalHost: lagoon-remote-ssh-portal.lagoon.svc
sshPortalPort: 22
lagoonTokenHost: lagoon-core-token.lagoon.svc
lagoonTokenPort: 22
lagoonAPIHost: http://lagoon-core-api.lagoon.svc:80
20 changes: 17 additions & 3 deletions charts/lagoon-build-deploy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,29 @@ spec:
- name: OVERRIDE_BUILD_DEPLOY_DIND_IMAGE
value: {{ . | quote }}
{{- end }}
{{- with .Values.taskSSHHost }}
{{- with .Values.sshPortalHost | default .Values.taskSSHHost}}
- name: LAGOON_CONFIG_SSH_HOST
value: {{ . | quote }}
{{- end }}
{{- with .Values.sshPortalPort | default .Values.taskSSHPort }}
- name: LAGOON_CONFIG_SSH_PORT
value: {{ . | quote }}
{{- end }}
{{- with .Values.lagoonTokenHost | default .Values.taskSSHHost }}
- name: LAGOON_CONFIG_TOKEN_HOST
value: {{ . | quote }}
- name: TASK_SSH_HOST
value: {{ . | quote }}
{{- end }}
{{- with .Values.taskSSHPort }}
{{- with .Values.lagoonTokenPort | default .Values.taskSSHPort }}
- name: LAGOON_CONFIG_TOKEN_PORT
value: {{ . | quote }}
- name: TASK_SSH_PORT
value: {{ . | quote }}
{{- end }}
{{- with .Values.taskAPIHost }}
{{- with .Values.lagoonAPIHost | default .Values.taskAPIHost }}
- name: LAGOON_CONFIG_API_HOST
value: {{ . | quote }}
- name: TASK_API_HOST
value: {{ . | quote }}
{{- end }}
Expand Down
23 changes: 23 additions & 0 deletions charts/lagoon-build-deploy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,32 @@ lagoonTargetName: ""
rabbitMQHostname: ""
rabbitMQPassword: ""
rabbitMQUsername: ""

# NOTE!! lagoon api/host/port values if left empty fall back to the task api/host/port values
# taskSSHHost/lagoonTokenHost is the hostname for the lagoon token service
# taskSSHHost will be deprecated in favor of lagoonTokenHost
taskSSHHost: ""
lagoonTokenHost: ""
# taskSSHPort/lagoonTokenPort is the port number for the lagoon token service
# taskSSHPort will be deprecated in favor of lagoonTokenHost
taskSSHPort: ""
lagoonTokenPort: ""
# taskAPIHost/lagoonAPIHost is the lagoon graphql API hostname, omitting `/graphql, eg: https://api.example.com
# taskAPIHost will be deprecated in favor of lagoonAPIHost
taskAPIHost: ""
lagoonAPIHost: ""

# NOTE!! sshPortal host/port values if left empty fall back to the task ssh host/port values
# NOTE!! if `lagoonTokenHost/Port` are configured with the dedicated token service in lagoon core instead of the legacy ssh service in core
# NOTE!! you will need to define the sshPortalHost/Port values for the ssh-portal that this remote is configured with
# The sshPortalHost/Port can be configured with the legacy ssh service in core, but it is recommended that it is configured
# to be the ssh-portal configured for this remote cluster.
# sshPortalHost is the hostname for this remote clusters ssh portal service
# the internal service name can be used (eg: lagoon-remote-ssh-portal.lagoon.svc) but a public dns can also be set
sshPortalHost: ""
# sshPortalPort is the port number for this remote clusters ssh portal service (public or internal port depending on how the host is configured)
sshPortalPort: ""


# if using controller namespace prefixing, define that prefix here
# limited to 8 characters (will be truncated by controller if it exceeds this)
Expand Down
6 changes: 3 additions & 3 deletions charts/lagoon-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ 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.30.0
version: 1.32.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.0
appVersion: v2.15.1

dependencies:
- name: nats
Expand All @@ -41,4 +41,4 @@ dependencies:
annotations:
artifacthub.io/changes: |
- kind: changed
description: bump lagoon-opensearch-sync version to v0.7.0
description: add resource requests to lagoon-core deployments
36 changes: 36 additions & 0 deletions charts/lagoon-core/ci/linter-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,24 @@ api:
replicaCount: 1
image:
repository: uselagoon/api
resources:
requests:
cpu: "10m"

apiDB:
image:
repository: uselagoon/api-db
storageSize: 16Gi
resources:
requests:
cpu: "10m"

apiRedis:
image:
repository: uselagoon/api-redis
resources:
requests:
cpu: "10m"

# TODO - update repo/tag before v2.11 release
actionsHandler:
Expand All @@ -46,42 +55,66 @@ actionsHandler:
keycloak:
image:
repository: uselagoon/keycloak
resources:
requests:
cpu: "10m"

keycloakDB:
image:
repository: uselagoon/keycloak-db
resources:
requests:
cpu: "10m"

broker:
replicaCount: 1
serviceMonitor:
enabled: false
image:
repository: uselagoon/broker
resources:
requests:
cpu: "10m"

authServer:
replicaCount: 1
image:
repository: uselagoon/auth-server
resources:
requests:
cpu: "10m"

webhooks2tasks:
replicaCount: 1
image:
repository: uselagoon/webhooks2tasks
resources:
requests:
cpu: "10m"

webhookHandler:
replicaCount: 1
image:
repository: uselagoon/webhook-handler
resources:
requests:
cpu: "10m"

ui:
replicaCount: 1
image:
repository: uselagoon/ui
resources:
requests:
cpu: "10m"

backupHandler:
replicaCount: 1
image:
repository: uselagoon/backup-handler
resources:
requests:
cpu: "10m"

insightsHandler:
image:
Expand All @@ -102,6 +135,9 @@ ssh:
replicaCount: 1
image:
repository: uselagoon/ssh
resources:
requests:
cpu: "10m"

sshPortalAPI:
enabled: true
Expand Down
Loading

0 comments on commit de86335

Please sign in to comment.