Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Secret logic and update #20

Merged
merged 5 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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.29.1
ZARF_VERSION := v0.29.2

# 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.10.2
# renovate: datasource=docker depName=ghcr.io/defenseunicorns/packages/dubbd-k3d extractVersion=^(?<version>\d+\.\d+\.\d+)
DUBBD_K3D_VERSION := 0.8.1
DUBBD_K3D_VERSION := 0.9.0

# Figure out which Zarf binary we should use based on the operating system we are on
ZARF_BIN := zarf
Expand Down
9 changes: 9 additions & 0 deletions utils/pkg-deps/gitlab/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: gitlab-gitlab-runner-secret
namespace: gitlab-runner
type: kubernetes.io/opaque
stringData:
runner-registration-token: "###ZARF_VAR_RUNNER_REGISTRATION_TOKEN###"
runner-token: ""
12 changes: 9 additions & 3 deletions utils/pkg-deps/gitlab/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
kind: ZarfPackageConfig
metadata:
name: gitlab-runner-gitlab
version: "0.0.1"
version: "0.0.2"
architecture: amd64
yolo: true

Expand All @@ -28,5 +28,11 @@ components:
onDeploy:
after:
- cmd: kubectl get secret gitlab-gitlab-runner-secret -n gitlab -o=jsonpath={.data.runner-registration-token} | base64 -d
setVariable: RUNNER_SECRET
- cmd: kubectl create secret generic gitlab-gitlab-runner-secret --from-literal=runner-registration-token="${ZARF_VAR_RUNNER_SECRET}" -n gitlab-runner --from-literal=runner-token=""
setVariable: RUNNER_REGISTRATION_TOKEN
- name: gitlab-gitlab-runner-secret
required: true
manifests:
- name: gitlab-gitlab-runner-secret
namespace: gitlab-runner
files:
- secret.yaml