skaffold
skaffold copied to clipboard
Skaffold does not replaces image with Remote Helm repo with remoteChart, but it does replace with chartPath
trafficstars
Expected behavior
Skaffold should replace latest build image with remoteChart attribute.
Actual behavior
Skaffold is building new image on code change but not replacing latest image.
Information
- Skaffold version: v1.39.1
- Operating system: mac os 12.2.1
- Installed via: Homebrew
- Contents of skaffold.yaml:
apiVersion: skaffold/v2beta29
kind: Config
metadata:
name: m-svc-2
build:
artifacts:
- image: m-svc-2-image
docker:
dockerfile: Dockerfile
deploy:
# kubectl:
# manifests:
# - ./k8s/deployment.yaml
helm:
releases:
- name: m-svc-2
remoteChart: sonal-ms-github-helm-repo/micro-svc-helm-chart
version: 0.6.0
#chartPath: './micro-svc-helm-chart/'
valuesFiles:
- '../skaffold-k8s-state/helm-values/m-svc-2/local/values.yaml'
artifactOverrides:
container.image: m-svc-2-image
imageStrategy:
fqn: {}
Steps to reproduce the behavior
- clone [email protected]:sinhasonalkumar/skaffold-m-svc-1.git
- helm repo add sonal-ms-github-helm-repo https://sinhasonalkumar.github.io/helm-repository
- go 'https://github.com/sinhasonalkumar/skaffold-m-svc-1/blob/main/skaffold.yaml' and comment chartPath and uncomment remoteChart and version as show in the sample yaml above.
- This is springboot project using java17. You also should have maven and docker to build. I am running it on minikube.
- skaffold dev
- Do some code change in 'https://github.com/sinhasonalkumar/skaffold-m-svc-1/blob/main/src/main/java/com/sonal/skaffold/demo/msvc1/controller/HelloMSvc1Controller.java'
- mvn clean package
- skaffold will try to build docker image but will replace it. Please find logs
Logs
DEBU[0024] Running command: [helm --kube-context minikube get all m-svc-2] subtask=0 task=Deploy
INFO[0024] Release m-svc-2 not upgraded as it is remote... subtask=0 task=Deploy
WARN[0024] image [m-svc-2-image:556789fca8ab8a7ee1b39cc2572d447c3b26323c7944d43c0e05b2209c05cce5] is not used. subtask=-1 task=DevLoop
WARN[0024] See helm documentation on how to replace image names with their actual tags: https://skaffold.dev/docs/pipeline-stages/deployers/helm/#image-configuration subtask=-1 task=DevLoop
DEBU[0024] getting client config for kubeContext: `minikube` subtask=-1 task=DevLoop
DEBU[0024] getting client config for kubeContext: `minikube` subtask=-1 task=DevLoop
INFO[0024] Deploy completed in 48.125718ms subtask=-1 task=Deploy
Waiting for deployments to stabilize...
DEBU[0024] getting client config for kubeContext: `minikube` subtask=-1 task=DevLoop
DEBU[0024] getting client config for kubeContext: `minikube` subtask=-1 task=DevLoop
DEBU[0024] checking status deployment/m-svc-2 subtask=-1 task=Deploy
DEBU[0025] Running command: [kubectl --context minikube rollout status deployment m-svc-2 --namespace default --watch=false] subtask=-1 task=Deploy
DEBU[0025] Command output: [deployment "m-svc-2" successfully rolled out
] subtask=-1 task=Deploy
- deployment/m-svc-2 is ready.
Deployments stabilized in 1.071 second
Watching for changes...
DEBU[0025] Found dependencies for dockerfile: [{target/m-svc-2.jar /application/application.jar false 4 4}] subtask=-1 task=DevLoop