Skip to content

Commit 73518f5

Browse files
authored
Add etcd-shield image warehouse & promotion task (#660)
KFLUXINFRA-4242
1 parent 5952c51 commit 73518f5

9 files changed

Lines changed: 59 additions & 1 deletion

File tree

components/kargo/internal-production/projects/kargo-infra-deployments/base/stages/ring-1-stage.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ spec:
3030
sources:
3131
stages:
3232
- ring-0-etcd-shield
33+
- origin:
34+
kind: Warehouse
35+
name: etcd-shield-image-wh
36+
sources:
37+
stages:
38+
- ring-0-etcd-shield
3339
promotionTemplate:
3440
spec:
3541
vars:

components/kargo/internal-production/projects/kargo-infra-deployments/base/stages/ring-2-stage.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ spec:
2121
stages:
2222
- ring-1
2323
requiredSoakTime: 24h0m0s
24+
- origin:
25+
kind: Warehouse
26+
name: etcd-shield-image-wh
27+
sources:
28+
stages:
29+
- ring-1
30+
requiredSoakTime: 24h0m0s
2431
promotionTemplate:
2532
spec:
2633
vars:

components/kargo/internal-production/projects/kargo-infra-deployments/base/stages/ring-3-stage.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ spec:
2121
stages:
2222
- ring-2
2323
requiredSoakTime: 48h0m0s
24+
- origin:
25+
kind: Warehouse
26+
name: etcd-shield-image-wh
27+
sources:
28+
stages:
29+
- ring-2
30+
requiredSoakTime: 48h0m0s
2431
promotionTemplate:
2532
spec:
2633
vars:

components/kargo/internal-production/projects/kargo-infra-deployments/base/stages/ring-4-stage.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ spec:
1717
- origin:
1818
kind: Warehouse
1919
name: etcd-shield-manifest-wh
20+
sources:
21+
stages:
22+
- ring-3
23+
requiredSoakTime: 72h
24+
- origin:
25+
kind: Warehouse
26+
name: etcd-shield-image-wh
2027
sources:
2128
stages:
2229
- ring-3
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: kargo.akuity.io/v1alpha1
2+
kind: Warehouse
3+
metadata:
4+
name: etcd-shield-image-wh
5+
spec:
6+
freightCreationPolicy: Automatic
7+
interval: 2h0m0s
8+
subscriptions:
9+
- image:
10+
repoURL: quay.io/konflux-ci/etcd-shield
11+
imageSelectionStrategy: NewestBuild
12+
discoveryLimit: 5
13+
allowTags: ^[0-9a-f]{40}$
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- warehouse.yaml
4+
- image-wh.yaml
5+
- manifest-wh.yaml
56
- promotiontask.yaml
67
- ring-0-stage.yaml

components/kargo/internal-production/projects/kargo-infra-deployments/etcd-shield/warehouse.yaml renamed to components/kargo/internal-production/projects/kargo-infra-deployments/etcd-shield/manifest-wh.yaml

File renamed without changes.

components/kargo/internal-production/projects/kargo-infra-deployments/etcd-shield/promotiontask.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,20 @@ spec:
88
- name: component
99
- name: prevRing
1010
- name: targetRing
11+
- name: imageRepoURL
12+
value: quay.io/konflux-ci/etcd-shield
1113

1214
steps:
15+
# Updates the image
16+
- uses: kustomize-set-image
17+
as: update-image
18+
if: ${{ ctx.targetFreight.origin.name == "etcd-shield-image-wh" }}
19+
config:
20+
path: ${{ vars.srcPath }}/components/${{ vars.component }}/rings/${{ vars.targetRing }}/base
21+
images:
22+
- image: ${{ vars.imageRepoURL }}
23+
tag: ${{ imageFrom(vars.imageRepoURL).Tag }}
24+
1325
# Deletes the target ring's base-snapshot directory, if it exists, to eliminate any orphaned files deleted in the previous ring's base-snapshot directory (or base)
1426
- uses: delete
1527
as: delete-old-base-snapshot-folder

components/kargo/internal-production/projects/kargo-infra-deployments/etcd-shield/ring-0-stage.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ spec:
1212
name: etcd-shield-manifest-wh
1313
sources:
1414
direct: true
15+
- origin:
16+
kind: Warehouse
17+
name: etcd-shield-image-wh
18+
sources:
19+
direct: true
1520
promotionTemplate:
1621
spec:
1722
vars:

0 commit comments

Comments
 (0)