Skip to content

Commit 88a0127

Browse files
committed
feat: add CI-driven image tag updates, remove Image Updater
Add update-tags job (stage 3) to build workflow using wunderio/silta-actions/update-image-tags@v1. Remove images arrays from apps.yaml — tags are now managed by CI instead of Image Updater.
1 parent 52a65d6 commit 88a0127

11 files changed

Lines changed: 131 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,23 @@ jobs:
5959
registry: ${{ env.REGISTRY }}
6060
registry-username: ${{ secrets.REGISTRY_USERNAME }}
6161
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
62+
63+
# ---------------------------------------------------------------
64+
# Stage 3: Update image tags in ArgoCD values files.
65+
# Queries the registry for the latest tags and commits the update.
66+
# ---------------------------------------------------------------
67+
update-tags:
68+
name: Update Image Tags
69+
runs-on: ubuntu-latest
70+
needs: build-image
71+
permissions:
72+
contents: write
73+
steps:
74+
- name: Update image tags
75+
uses: wunderio/silta-actions/update-image-tags@v1
76+
with:
77+
image-names: nginx
78+
values-file: values/simple.yaml
79+
registry: ${{ env.REGISTRY }}
80+
registry-username: ${{ secrets.REGISTRY_USERNAME }}
81+
registry-password: ${{ secrets.REGISTRY_PASSWORD }}

k8s/feature/apps.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
# apps.yaml — ArgoCD application definitions for feature/PR environments.
3+
#
4+
# Branch mapping: feature/hotfix/epic/* PRs -> pr-<N>
5+
# (see cluster-management PR ApplicationSet).
6+
#
7+
# UPDATE: Change the namespace to match your project.
8+
9+
namespace: client-fi-CHANGEME
10+
11+
apps:
12+
- name: simple
13+
chart: simple
14+
repoURL: https://storage.googleapis.com/charts.wdr.io
15+
version: ">=1.0.0"
16+
valuesFile: values/simple.yaml
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
apiVersion: viaduct.ai/v1
3+
kind: ksops
4+
metadata:
5+
name: simple-secrets
6+
files:
7+
- simple.sops.yaml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
generators:
5+
- ksops-generator.yaml
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: simple-project-secrets
6+
type: Opaque
7+
stringData:
8+
# API_KEY: "..."

k8s/feature/values/simple.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
# Helm values for the simple chart — feature/PR environments.
3+
#
4+
# UPDATE: Change image repository paths to match your Harbor project name.
5+
6+
nginx:
7+
image:
8+
repository: registry.wdr.io/CHANGEME/nginx
9+
tag: placeholder-00000000T000000-0000000

k8s/staging/apps.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
# apps.yaml — ArgoCD application definitions for the staging environment.
3+
#
4+
# The platform chart in cluster-management reads this file and renders one
5+
# ArgoCD Application per entry in the apps[] list.
6+
# Branch mapping: main/master -> staging (see cluster-management ApplicationSets).
7+
#
8+
# UPDATE: Change the namespace to match your project (e.g. client-fi-mysite).
9+
10+
namespace: client-fi-CHANGEME
11+
12+
apps:
13+
- name: simple
14+
chart: simple
15+
repoURL: https://storage.googleapis.com/charts.wdr.io
16+
version: ">=1.0.0"
17+
valuesFile: values/simple.yaml
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
# ksops-generator.yaml — KSOPS generator config.
3+
#
4+
# This file MUST be named exactly ksops-generator.yaml to match the
5+
# CMP discover glob (**/ksops-generator.yaml) configured in ArgoCD.
6+
apiVersion: viaduct.ai/v1
7+
kind: ksops
8+
metadata:
9+
name: simple-secrets
10+
files:
11+
- simple.sops.yaml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
generators:
5+
- ksops-generator.yaml
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
# Example SOPS-encrypted secret.
3+
#
4+
# USAGE:
5+
# 1. Copy this file to simple.sops.yaml
6+
# 2. Fill in the real values in stringData
7+
# 3. Encrypt in-place:
8+
# export SOPS_AGE_RECIPIENTS=age1...
9+
# sops --encrypt --in-place k8s/staging/secrets/simple.sops.yaml
10+
# 4. Commit the encrypted file.
11+
#
12+
# IMPORTANT: Never commit the plaintext version of this file.
13+
apiVersion: v1
14+
kind: Secret
15+
metadata:
16+
name: simple-project-secrets
17+
type: Opaque
18+
stringData:
19+
# API_KEY: "..."

0 commit comments

Comments
 (0)