From 00676ec14dd91f858825a8284e2ebf6133a50370 Mon Sep 17 00:00:00 2001 From: awendt Date: Thu, 10 Aug 2023 10:08:16 -0600 Subject: [PATCH] Update dependencies and add calico (#19) * Upgrade dependencies * Update to use Calico --- .github/workflows/publish.yml | 4 ++-- .pre-commit-config.yaml | 6 +++--- .tool-versions | 10 +++++----- Makefile | 13 ++++++++++--- gitlab-flux-values.yaml | 2 +- go.mod | 2 +- go.sum | 4 ++-- utils/k3d/k3d-config.yaml | 6 ++++++ zarf.yaml | 26 +++++++++++++------------- 9 files changed, 43 insertions(+), 30 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 17b7f16..67cc386 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,10 +28,10 @@ jobs: uses: supplypike/setup-bin@v3 with: # renovate: zarf-uri datasource=github-tags depName=defenseunicorns/zarf - uri: 'https://github.com/defenseunicorns/zarf/releases/download/v0.28.0/zarf_v0.28.0_Linux_amd64' + uri: 'https://github.com/defenseunicorns/zarf/releases/download/v0.28.4/zarf_v0.28.4_Linux_amd64' name: 'zarf' # renovate: datasource=github-tags depName=defenseunicorns/zarf versioning=semver - version: 'v0.28.0' + version: 'v0.28.4' - name: Login to GHCR uses: docker/login-action@v2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f82e01..0254c47 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: hooks: - id: fix-smartquotes - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.23.0 + rev: 0.24.0 hooks: - id: check-jsonschema name: "Validate Zarf Configs Against Schema" @@ -44,10 +44,10 @@ repos: "--no-cache" ] - repo: https://github.com/golangci/golangci-lint - rev: v1.52.2 + rev: v1.52.3 hooks: - id: golangci-lint - repo: https://github.com/renovatebot/pre-commit-hooks - rev: 35.105.1 + rev: 36.40.0 hooks: - id: renovate-config-validator diff --git a/.tool-versions b/.tool-versions index 4892760..b695fbc 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,7 +1,7 @@ -golang 1.20.4 -golangci-lint 1.52.2 -pre-commit 3.3.2 -terraform 1.4.6 -tflint 0.46.1 +golang 1.21.0 +golangci-lint 1.53.3 +pre-commit 3.3.3 +terraform 1.5.4 +tflint 0.47.0 tfsec 1.28.1 sops 3.7.3 diff --git a/Makefile b/Makefile index faf7c2a..bb8ffc9 100755 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ # The version of Zarf to use. To keep this repo as portable as possible the Zarf binary will be downloaded and added to # the build folder. # renovate: datasource=github-tags depName=defenseunicorns/zarf -ZARF_VERSION := v0.28.2 +ZARF_VERSION := v0.28.4 # The version of the build harness container to use BUILD_HARNESS_REPO := ghcr.io/defenseunicorns/build-harness/build-harness # renovate: datasource=docker depName=ghcr.io/defenseunicorns/build-harness/build-harness -BUILD_HARNESS_VERSION := 1.7.1 +BUILD_HARNESS_VERSION := 1.10.2 # renovate: datasource=docker depName=ghcr.io/defenseunicorns/packages/dubbd-k3d extractVersion=^(?\d+\.\d+\.\d+) -DUBBD_K3D_VERSION := 0.5.0 +DUBBD_K3D_VERSION := 0.6.1 # Figure out which Zarf binary we should use based on the operating system we are on ZARF_BIN := zarf @@ -120,6 +120,13 @@ cluster/full: cluster/destroy cluster/create build/all deploy/all ## This will d cluster/create: ## Create a k3d cluster with metallb installed k3d cluster create k3d-test-cluster --config utils/k3d/k3d-config.yaml -v /etc/machine-id:/etc/machine-id@server:* k3d kubeconfig merge k3d-test-cluster -o /home/${USER}/cluster-kubeconfig.yaml + echo "Installing Calico..." + kubectl apply --wait=true -f https://k3d.io/v5.5.2/usage/advanced/calico.yaml 2>&1 >/dev/null + echo "Waiting for Calico to be ready..." + kubectl rollout status deployment/calico-kube-controllers -n kube-system --watch --timeout=90s 2>&1 >/dev/null + kubectl rollout status daemonset/calico-node -n kube-system --watch --timeout=90s 2>&1 >/dev/null + kubectl wait --for=condition=Ready pods --all --all-namespaces 2>&1 >/dev/null + echo utils/metallb/install.sh echo "Cluster is ready!" diff --git a/gitlab-flux-values.yaml b/gitlab-flux-values.yaml index f26aa04..53a4408 100644 --- a/gitlab-flux-values.yaml +++ b/gitlab-flux-values.yaml @@ -6,7 +6,7 @@ application: repository: https://repo1.dso.mil/big-bang/product/packages/gitlab.git ref: # renovate: datasource=gitlab-tags depName=big-bang/product/packages/gitlab versioning=loose registryUrl=https://repo1.dso.mil - tag: 7.0.4-bb.0 + tag: 7.1.2-bb.0 values: | ###ZARF_VAR_GITLAB_VALUES### dependsOn: diff --git a/go.mod b/go.mod index 7c9ce14..bfc14c7 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/defenseunicorns/uds-capability-gitlab go 1.20 require ( - github.com/gruntwork-io/terratest v0.43.7 + github.com/gruntwork-io/terratest v0.43.11 github.com/stretchr/testify v1.8.4 ) diff --git a/go.sum b/go.sum index f4b8d4b..b7f64c1 100644 --- a/go.sum +++ b/go.sum @@ -371,8 +371,8 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gruntwork-io/go-commons v0.8.0 h1:k/yypwrPqSeYHevLlEDmvmgQzcyTwrlZGRaxEM6G0ro= github.com/gruntwork-io/go-commons v0.8.0/go.mod h1:gtp0yTtIBExIZp7vyIV9I0XQkVwiQZze678hvDXof78= -github.com/gruntwork-io/terratest v0.43.7 h1:K1svA1v92xhiyZAm3WCwHXd8OqsrdVXzcOlhz6PGIBM= -github.com/gruntwork-io/terratest v0.43.7/go.mod h1:Tw+6/fcJFiBPpsx9NNSkLG5oHKIeaqiJHVLpQ+ORIfQ= +github.com/gruntwork-io/terratest v0.43.11 h1:k3U5lZjiNa38rqcTx/dus8cCaJY7qxShGIuGLeLfj/s= +github.com/gruntwork-io/terratest v0.43.11/go.mod h1:Tw+6/fcJFiBPpsx9NNSkLG5oHKIeaqiJHVLpQ+ORIfQ= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= diff --git a/utils/k3d/k3d-config.yaml b/utils/k3d/k3d-config.yaml index 88d5807..8c45eba 100644 --- a/utils/k3d/k3d-config.yaml +++ b/utils/k3d/k3d-config.yaml @@ -16,6 +16,12 @@ options: - arg: --disable=servicelb nodeFilters: - server:* + - arg: --flannel-backend=none + nodeFilters: + - server:* + - arg: --disable-network-policy + nodeFilters: + - server:* k3d: wait: true ports: diff --git a/zarf.yaml b/zarf.yaml index e4f1a73..9935ffb 100644 --- a/zarf.yaml +++ b/zarf.yaml @@ -3,7 +3,7 @@ kind: ZarfPackageConfig metadata: name: gitlab description: "UDS GitLab capability deployed via flux" - version: "0.0.4" + version: "0.0.5" architecture: amd64 variables: @@ -41,21 +41,21 @@ components: repos: - https://repo1.dso.mil/big-bang/product/packages/gitlab.git images: - - "registry1.dso.mil/ironbank/bitnami/analytics/redis-exporter:v1.50.0" + - "registry1.dso.mil/ironbank/bitnami/analytics/redis-exporter:v1.51.0" - "registry1.dso.mil/ironbank/bitnami/redis:7.0.0-debian-10-r3" - - "registry1.dso.mil/ironbank/gitlab/gitlab/certificates:16.0.3" + - "registry1.dso.mil/ironbank/gitlab/gitlab/certificates:16.1.2" - "registry1.dso.mil/ironbank/gitlab/gitlab/cfssl-self-sign:1.6.1" - - "registry1.dso.mil/ironbank/gitlab/gitlab/gitaly:16.0.3" - - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-container-registry:16.0.3" - - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-shell:16.0.3" - - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-sidekiq:16.0.3" - - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-toolbox:16.0.3" - - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-webservice:16.0.3" - - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-workhorse:16.0.3" - - "registry1.dso.mil/ironbank/gitlab/gitlab/kubectl:16.0.3" + - "registry1.dso.mil/ironbank/gitlab/gitlab/gitaly:16.1.2" + - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-container-registry:16.1.2" + - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-shell:16.1.2" + - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-sidekiq:16.1.2" + - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-toolbox:16.1.2" + - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-webservice:16.1.2" + - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-workhorse:16.1.2" + - "registry1.dso.mil/ironbank/gitlab/gitlab/kubectl:16.1.2" - "registry1.dso.mil/ironbank/opensource/minio/mc:RELEASE.2022-12-24T15-21-38Z" - "registry1.dso.mil/ironbank/opensource/minio/minio:RELEASE.2022-12-12T19-27-27Z" - "registry1.dso.mil/ironbank/opensource/postgres/postgresql:14.8" - "registry1.dso.mil/ironbank/redhat/ubi/ubi8:8.8" - - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-exporter:16.0.3" - - "registry1.dso.mil/ironbank/gitlab/gitlab/kubectl:16.0.3" + - "registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-exporter:16.1.2" + - "registry1.dso.mil/ironbank/gitlab/gitlab/kubectl:16.1.2"