Skip to content

Commit c3331a0

Browse files
authored
Use InternalImages for backup restic and unattended upgrades addons (#3904)
* Use InternalImages for backup restic and unattended upgrades addons Signed-off-by: Archana Sawant <[email protected]> * Update codegen Signed-off-by: Archana Sawant <[email protected]> --------- Signed-off-by: Archana Sawant <[email protected]>
1 parent 1433858 commit c3331a0

File tree

7 files changed

+30
-10
lines changed

7 files changed

+30
-10
lines changed

addons/backups-restic/backups-restic.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ spec:
5252
path: /etc/kubernetes/pki
5353
initContainers:
5454
- name: snapshotter
55-
image: {{ Registry "registry.k8s.io" }}/etcd:3.5.16-0
55+
image: '{{ .InternalImages.Get "BackupResticSnapshotter" }}'
5656
imagePullPolicy: IfNotPresent
5757
command:
5858
- etcdctl
@@ -83,7 +83,7 @@ spec:
8383
readOnly: true
8484
containers:
8585
- name: uploader
86-
image: {{ Registry "ghcr.io" }}/restic/restic:0.18.0
86+
image: '{{ .InternalImages.Get "BackupResticUploader" }}'
8787
imagePullPolicy: IfNotPresent
8888
command:
8989
- /bin/sh

addons/unattended-upgrades/apt.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
hostPID: true
3939
containers:
4040
- name: "unattended-upgrades-install"
41-
image: "alpine:3"
41+
image: '{{ .InternalImages.Get "UUApline" }}'
4242
imagePullPolicy: Always
4343
securityContext:
4444
privileged: true

addons/unattended-upgrades/fluo.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ spec:
200200
valueFrom:
201201
fieldRef:
202202
fieldPath: metadata.namespace
203-
image: '{{ Registry "ghcr.io" }}/flatcar/flatcar-linux-update-operator:v0.10.0-rc1'
203+
image: '{{ .InternalImages.Get "UUFluo" }}'
204204
name: update-operator
205205
serviceAccountName: flatcar-linux-update-operator-sa
206206
tolerations:
@@ -251,7 +251,7 @@ spec:
251251
valueFrom:
252252
fieldRef:
253253
fieldPath: metadata.namespace
254-
image: '{{ Registry "ghcr.io" }}/flatcar/flatcar-linux-update-operator:v0.10.0-rc1'
254+
image: '{{ .InternalImages.Get "UUFluo" }}'
255255
name: update-agent
256256
securityContext:
257257
runAsUser: 0

addons/unattended-upgrades/fluo/Kustomization

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ patches:
3131
- op: replace
3232
path: /spec/template/spec/containers/0/image
3333
value: |-
34-
{{ Registry "ghcr.io" }}/flatcar/flatcar-linux-update-operator:v0.10.0-rc1
34+
'{{ .InternalImages.Get "UUFluo" }}'
3535

3636
- target:
3737
group: apps
@@ -58,4 +58,4 @@ patches:
5858
- op: replace
5959
path: /spec/template/spec/containers/0/image
6060
value: |-
61-
{{ Registry "ghcr.io" }}/flatcar/flatcar-linux-update-operator:v0.10.0-rc1
61+
'{{ .InternalImages.Get "UUFluo" }}'

addons/unattended-upgrades/yum.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
hostPID: true
4444
containers:
4545
- name: "yum-cron-install"
46-
image: "alpine:3"
46+
image: '{{ .InternalImages.Get "UUApline" }}'
4747
imagePullPolicy: Always
4848
securityContext:
4949
privileged: true

pkg/templates/images/images.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ const (
209209
KubeVirtCSILivenessProbe
210210
KubeVirtCSIProvisioner
211211
KubeVirtCSIAttacher
212+
213+
// Backup Restic
214+
BackupResticSnapshotter
215+
BackupResticUploader
216+
217+
// Unatttended Upgrades
218+
UUApline
219+
UUFluo
212220
)
213221

214222
func FindResource(name string) (Resource, error) {
@@ -418,6 +426,14 @@ func optionalResources() map[Resource]map[string]string {
418426
KubeVirtCSILivenessProbe: {"*": "quay.io/openshift/origin-csi-livenessprobe:4.20.0"},
419427
KubeVirtCSIProvisioner: {"*": "quay.io/openshift/origin-csi-external-provisioner:4.20.0"},
420428
KubeVirtCSIAttacher: {"*": "quay.io/openshift/origin-csi-external-attacher:4.20.0"},
429+
430+
// Backup Restic
431+
BackupResticSnapshotter: {"*": "registry.k8s.io/etcd:3.5.16-0"},
432+
BackupResticUploader: {"*": "ghcr.io/restic/restic:0.18.0"},
433+
434+
// Unattended upgrades
435+
UUApline: {"*": "docker.io/library/alpine:3.22.2"},
436+
UUFluo: {"*": "ghcr.io/flatcar/flatcar-linux-update-operator:v0.10.0-rc1"},
421437
}
422438
}
423439

pkg/templates/images/resource_string.go

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)