Skip to content

Commit

Permalink
Image push pod update
Browse files Browse the repository at this point in the history
  • Loading branch information
aliaksei-ivanou committed Apr 17, 2023
1 parent 1749c67 commit cdf7e1c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions teams/team-scan/dev/templates/image-push-pod.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
apiVersion: v1
kind: Pod
metadata:
name: privileged-pod
name: ecr-pod
namespace: scan
spec:
serviceAccountName: team-scan-sa
containers:
- name: app
image: centos
image: quay.io/skopeo/stable:latest
command: ["/bin/sh"]
args:
[
"-c",
"docker pull centos:8 && docker tag centos:8 <your-ecr-repo-url>/centos:latest && docker push <your-ecr-repo-url>/centos:latest",
]
securityContext:
- "-c"
- 'yum update -y && yum install unzip less -y && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && ./aws/install && aws ecr get-login-password --region {{ .Values.spec.region }} | skopeo login --username AWS --password-stdin {{ (split "/" .Values.spec.repositoryUri)._0 }} && skopeo copy docker://centos:8 docker://{{ .Values.spec.repositoryUri }}:latest && sleep 3600'

0 comments on commit cdf7e1c

Please sign in to comment.