Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MahdiKarimipour/afc92e93ebeebcded511788bae660ef7 to your computer and use it in GitHub Desktop.
Save MahdiKarimipour/afc92e93ebeebcded511788bae660ef7 to your computer and use it in GitHub Desktop.
Image Pull Secret Deployment File
apiVersion: v1
kind: Secret
type: kubernetes.io/dockerconfigjson
metadata:
name: image-pull-secret
namespace: imagepullsecret-patcher
data:
.dockerconfigjson: ewogICAgImF1dGhzIjogewogICAgICAgICJodHRwczovL2RvY2tlci5pbyI6IHsKICAgICAgICAgICAgInVzZXJuYW1lIjogInVzZXJuYW1lIiwKICAgICAgICAgICAgInBhc3N3b3JkIjogInBhc3N3b3JkIiwKICAgICAgICAgICAgImF1dGgiOiAiZFhObGNtNWhiV1U2Y0dGemMzZHZjbVE9IgogICAgICAgIH0KICAgIH0KfQ==
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: imagepullsecret-patcher
namespace: imagepullsecret-patcher
labels:
name: imagepullsecret-patcher
spec:
replicas: 1
selector:
matchLabels:
name: imagepullsecret-patcher
template:
metadata:
labels:
name: imagepullsecret-patcher
spec:
automountServiceAccountToken: true
serviceAccountName: imagepullsecret-patcher
containers:
- name: imagepullsecret-patcher
image: "quay.io/titansoft/imagepullsecret-patcher:v0.14"
env:
- name: CONFIG_FORCE
value: "true"
- name: CONFIG_DEBUG
value: "false"
- name: CONFIG_ALLSERVICEACCOUNT
value: "true"
- name: CONFIG_DOCKERCONFIGJSONPATH
value: "/app/secrets/.dockerconfigjson"
volumeMounts:
- name: src-dockerconfigjson
mountPath: "/app/secrets"
readOnly: true
resources:
requests:
cpu: 0.1
memory: 15Mi
limits:
cpu: 0.2
memory: 30Mi
volumes:
- name: src-dockerconfigjson
secret:
secretName: image-pull-secret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment