-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(KFLUXDP-140): Prepare all Konflux components to integrate with S…
…ealights
- Loading branch information
Showing
10 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
components/build-service/development/sealights-token-patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: build-service-controller-manager | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: manager | ||
env: | ||
- name: SEALIGHTS_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: sealights-token | ||
key: token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
components/image-controller/development/sealights-token-patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: controller-manager | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: manager | ||
env: | ||
- name: SEALIGHTS_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: sealights-token | ||
key: token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
components/integration/development/sealights-token-patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: integration-service-controller-manager | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: manager | ||
env: | ||
- name: SEALIGHTS_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: sealights-token | ||
key: token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: release-service-controller-manager | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: manager | ||
env: | ||
- name: SEALIGHTS_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: sealights-token | ||
key: token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
set -eo pipefail | ||
|
||
NAMESPACES=( | ||
"image-controller" | ||
"integration-service" | ||
"release-service" | ||
"build-service" | ||
) | ||
|
||
SEALIGHTS_TOKEN=${SEALIGHTS_TOKEN:-""} | ||
|
||
for namespace in "${NAMESPACES[@]}"; do | ||
# Create the namespace if it doesn't exist | ||
if ! kubectl get namespace "$namespace" >/dev/null 2>&1; then | ||
echo "[WARN] Namespace '$namespace' does not exist. Creating it..." | ||
kubectl create namespace "$namespace" | ||
fi | ||
|
||
if kubectl get secret sealights-token -n "$namespace" >/dev/null 2>&1; then | ||
echo "[INFO] Updating existing secret 'sealights-token' in namespace '$namespace'." | ||
kubectl delete secret sealights-token -n "$namespace" | ||
fi | ||
|
||
kubectl create secret generic sealights-token \ | ||
--from-literal=token="$SEALIGHTS_TOKEN" \ | ||
-n "$namespace" | ||
|
||
echo "[INFO] Secret 'sealights-token' has been created/updated in namespace '$namespace'." | ||
done |