Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image not updated after pushed to Docker Hub #624

Closed
bensch98 opened this issue Jun 19, 2021 · 3 comments
Closed

Image not updated after pushed to Docker Hub #624

bensch98 opened this issue Jun 19, 2021 · 3 comments

Comments

@bensch98
Copy link

I'm running a Kubernetes Cluster (version: 1.19.12) locally on my PC and installed keel via helm (version 3.5) with following steps:

helm repo add keel https://charts.keel.sh
helm repo update
helm install keel keel/keel --set helmProvider.version="v3"

The keel pod is now running along with an nginx example deployment.

NAME                    READY   STATUS    RESTARTS   AGE
keel-855d5498f8-cp9fd   1/1     Running   0          47m
nginx-97c944f68-z6fft   1/1     Running   0          54m

My Deployment looks like this:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
  namespace: default
  labels:
    app: nginx
  annotations:
    keel.sh/policy: all
    #keel.sh/trigger: poll
    #keel.sh/pollSchedule: "@every 30s"
spec:
  selector:
    matchLabels:
      run: nginx
  replicas: 1
  template:
    metadata:
      labels:
        run: nginx
    spec: 
      hostNetwork: true
      containers:
      - name: nginx
        image: bensch98/nginx-test:latest
        imagePullPolicy: Always

If I uncomment and apply this:

#keel.sh/trigger: poll
#keel.sh/pollSchedule: "@every 30s"

the pod crashes can not restart. But even when the pod is running and I push a new image to my repo with tag :latest (or any other tag) the pod is not being restarted. What am I missing, or does keel not support helm v3? Issue #567 seems to describe the same or a similar bug. Is there a solution to this?

The keel-pod logs look like this:
kubectl logs keel-855d5498f8-cp9fd

time="2021-06-19T19:42:56Z" level=info msg="extension.credentialshelper: helper registered" name=aws
time="2021-06-19T19:42:56Z" level=info msg="extension.credentialshelper: helper registered" name=gcr
time="2021-06-19T19:42:56Z" level=info msg="bot: registered" name=slack
time="2021-06-19T19:42:56Z" level=info msg="keel starting..." arch=amd64 build_date=2020-06-07T155004Z go_version=go1.14.2 os=linux revision=82ba1d50 version=0.16.1
time="2021-06-19T19:42:56Z" level=info msg="initializing database" database_path=/data/keel.db type=sqlite3
time="2021-06-19T19:42:56Z" level=info msg="extension.notification.auditor: audit logger configured" name=auditor
time="2021-06-19T19:42:56Z" level=info msg="notificationSender: sender configured" sender name=auditor
time="2021-06-19T19:42:56Z" level=info msg="provider.kubernetes: using in-cluster configuration"
time="2021-06-19T19:42:56Z" level=info msg="provider.defaultProviders: provider 'kubernetes' registered"
time="2021-06-19T19:42:56Z" level=info msg="extension.credentialshelper: helper registered" name=secrets
time="2021-06-19T19:42:56Z" level=info msg="bot.slack.Configure(): Slack approval bot is not configured"
time="2021-06-19T19:42:56Z" level=error msg="bot.Run(): can not get configuration for bot [slack]"
time="2021-06-19T19:42:56Z" level=info msg="trigger.poll.manager: polling trigger configured"
time="2021-06-19T19:42:56Z" level=info msg=started context=watch resource=statefulsets
time="2021-06-19T19:42:56Z" level=info msg=started context=watch resource=daemonsets
time="2021-06-19T19:42:56Z" level=info msg=started context=watch resource=deployments
time="2021-06-19T19:42:56Z" level=info msg="authentication is not enabled, admin HTTP handlers are not initialized"
time="2021-06-19T19:42:56Z" level=info msg="webhook trigger server starting..." port=9300
time="2021-06-19T19:42:56Z" level=info msg=started context=buffer
time="2021-06-19T19:42:56Z" level=info msg=started context=watch resource=cronjobs
@derjohn
Copy link

derjohn commented Jun 30, 2021

I have a similar issue, but at least you need "latest" keel and debug to see more:

helm install keel keel/keel --set helmProvider.version="v3" --set image.tag=latest --set debug=true

@bensch98
Copy link
Author

@derjohn sorry for my late response. Didn't manage to get it to work .. Ended up writing a Python script on my own, that I'm running as a CronJob in K8s. It checks every specified amount of time if there is a new image available and updates it if necessary.

@derjohn
Copy link

derjohn commented Aug 1, 2021

@bensch98 , me too. I used "imago" to keep track on the sha of "latest" images. https://github.com/philpep/imago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants