I’m looking for a CD solution for my k8s cluster. Now after pushing a commit with dev-*
tag, dockerhub creates new image tagged as dev-latest
. Here’s my deployment config:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-image-backend-local-deployment
labels:
app: my-image
type: web
spec:
replicas: 2
minReadySeconds: 15
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 1
selector:
matchLabels:
app: my-image
template:
metadata:
labels:
app: my-image
spec:
imagePullSecrets:
- name: regcred
containers:
- name: backend
image: cosmicfruit/my-image:dev-latest
imagePullPolicy: IfNotPresent
envFrom:
- secretRef:
name: my-image-backend-local-secret
ports:
- containerPort: 8000
readinessProbe:
httpGet:
path: /flvby
port: 8000
initialDelaySeconds: 10
periodSeconds: 5
- name: celery
image: cosmicfruit/my-image:dev-latest
imagePullPolicy: IfNotPresent
workingDir: /code
command: ["/code/run/celery.sh"]
envFrom:
- secretRef:
name: my-image-backend-local-secret
- name: redis
image: redis:latest
imagePullPolicy: IfNotPresent
I want new images to be automatically deployed into the pods but cant find a relevant solution. I’ve already looked at fluxcd but it’s working with github not dockerhub and it’s sleazy.