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

Question: Helm with k8s_yaml not refreshing resources? #5932

Closed
adam-aph opened this issue Sep 1, 2022 · 8 comments
Closed

Question: Helm with k8s_yaml not refreshing resources? #5932

adam-aph opened this issue Sep 1, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@adam-aph
Copy link

adam-aph commented Sep 1, 2022

I'm not sure if this is bug or I'm doing something in a wrong way. Here it goes:

I have simple test Spring Boot app, for which Jib plugin is creating the container and pushes it to local registry during each software build. Then I wanted Tilt to deploy it automatically to local K8s cluster, using my Helm setup. Here is my Tiltfile contents:

k8s_yaml(helm('target-helm', name='k8s-srv-deployment-k8s-test-app', values='target-helm/values-local.yaml',
               set=['arg={}'.format(read_yaml('version.yaml'))]))

k8s_resource('k8s-srv-deployment-k8s-test-app', port_forwards='8080:8080')

So after intial start with tilt up the App is deployed by Tilt and I can see in the console all the logs etc, everything works nice. But for some reason it is not updating my App after new build will happen.
I disabled in .tiltignore the target-helm folder as it is recreated during each build and this seems to confuse Tilt. However each successful build (which is also pushing new image to the local registry) is refreshing dummy version.yaml file which is containing just a timestamp. And I see that Tilt is watching properly on that file.
After each build I can see in the console that Tilt discovers changes to version.yaml, however it is not triggerring updates to the App running in the cluster. And when I click manual updates, it works properly, helm is executed and the App is redeployed.

$ tilt doctor

Tilt: v0.30.7, built 2022-08-12
System: windows-amd64
---
Docker
- Host: [default]
- Server Version:
- API Version:
- Builder:
---
Kubernetes
- Env: crc
- Context: c1demo/api-crc-testing:6443/kubeadmin
- Cluster Name: api-crc-testing:6443
- Namespace: c1demo
- Container Runtime: cri-o
- Version: v1.24.0+9546431
- Cluster Local Registry: none
---

Also output from filewatch:

$ tilt get filewatch -o yaml

apiVersion: v1
items:
- apiVersion: tilt.dev/v1alpha1
  kind: FileWatch
  metadata:
    annotations:
      tilt.dev/resource: (Tiltfile)
      tilt.dev/target-id: configs:(Tiltfile)
    creationTimestamp: "2022-09-01T11:01:23Z"
    name: configs:(Tiltfile)
    ownerReferences:
    - apiVersion: tilt.dev/v1alpha1
      blockOwnerDeletion: true
      controller: true
      kind: Tiltfile
      name: (Tiltfile)
      uid: 116e222b-506f-412a-aa0b-03d128251295
    resourceVersion: "500"
    uid: e92744e0-9943-4d43-b000-cf2832238e95
  spec:
    ignores:
    - basePath: C:\Projects\k8s-test
      patterns:
      - target
      - target-helm
    - basePath: C:\Users\xxxx\AppData\Local\tilt-dev\tilt_modules\github.com\tilt-dev\tilt-extensions\helm_remote
      patterns:
      - C:\Users\xxxx\AppData\Local\tilt-dev\.helm
    watchedPaths:
    - C:\Projects\k8s-test\.tiltignore
    - C:\Projects\k8s-test\Tiltfile
    - C:\Projects\k8s-test\target-helm
    - C:\Projects\k8s-test\target-helm\values-local.yaml
    - C:\Projects\k8s-test\version.yaml
    - C:\Users\xxxx\AppData\Local\tilt-dev\tilt_modules\github.com\tilt-dev\tilt-extensions\global_vars\Tiltfile
    - C:\Users\xxxx\AppData\Local\tilt-dev\tilt_modules\github.com\tilt-dev\tilt-extensions\helm_remote\Tiltfile
  status:
    disableStatus:
      disabled: false
      lastUpdateTime: "2022-09-01T11:01:23Z"
      reason: object does not specify a DisableSource
      state: Enabled
    fileEvents:
    - seenFiles:
      - C:\Projects\k8s-test\Tiltfile
      - C:\Projects\k8s-test\Tiltfile
      time: "2022-09-01T12:41:31.645227Z"
    - seenFiles:
      - C:\Projects\k8s-test\version.yaml
      time: "2022-09-01T12:42:10.794257Z"
    - seenFiles:
      - C:\Projects\k8s-test\version.yaml
      time: "2022-09-01T12:43:51.805638Z"
    - seenFiles:
      - C:\Projects\k8s-test\Tiltfile
      time: "2022-09-01T13:28:51.512267Z"
    - seenFiles:
      - C:\Projects\k8s-test\Tiltfile
      time: "2022-09-01T13:28:51.816806Z"
    - seenFiles:
      - C:\Projects\k8s-test\version.yaml
      time: "2022-09-01T13:31:55.039086Z"
    - seenFiles:
      - C:\Projects\k8s-test\version.yaml
      time: "2022-09-01T13:34:33.066615Z"
    lastEventTime: "2022-09-01T13:34:33.066615Z"
    monitorStartTime: "2022-09-01T12:39:21.033957Z"
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

Any hints greatly appreciated!

@adam-aph adam-aph added the bug Something isn't working label Sep 1, 2022
@nicks
Copy link
Member

nicks commented Sep 1, 2022

if you change the version.yaml, does that change the kubernetes yaml that helm() generates?

(you can see this yaml if you do a tilt describe kubernetesapply. That will show you both what object tilt thinks it's supposed to apply, and the result that actually got applied to the cluster)

if the yaml doesn't change, then kubernetes will not restart the app.

@adam-aph
Copy link
Author

adam-aph commented Sep 1, 2022

I think it changes only the initial request, which at the end includes the fresh timestamp:

Loading Tiltfile at: C:\Projects\k8s-test\Tiltfile 
Running: helm template k8s-srv-deployment-k8s-test-app C:\Projects\k8s-test\target-helm --include-crds --values target-helm/values-local.yaml --set "arg={\"build-time\": \"2022-09-01-13:34:12\"}" 
Successfully loaded Tiltfile (3.2134143s)

I don't think it changes anything else, except the container image nothing else is changing.

The container is different though, so this should probably trigger the update? Anyways, do you see any workaround for me, to force redeployment in such case?

Here is the helm yaml for the reference:

tilt describe kubernetesapply

Name:         uncategorized
Namespace:
Labels:       <none>
Annotations:  [tilt.dev/log-span-id](http://tilt.dev/log-span-id): kubernetesapply:uncategorized
              [tilt.dev/managed-by](http://tilt.dev/managed-by): buildcontrol
              [tilt.dev/resource](http://tilt.dev/resource): uncategorized
API Version:  [tilt.dev/v1alpha1](http://tilt.dev/v1alpha1)
Kind:         KubernetesApply
Metadata:
  Creation Timestamp:  2022-09-01T11:01:32Z
  Managed Fields:
    API Version:  [tilt.dev/v1alpha1](http://tilt.dev/v1alpha1)
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:[tilt.dev/log-span-id](http://tilt.dev/log-span-id):
          f:[tilt.dev/managed-by](http://tilt.dev/managed-by):
          f:[tilt.dev/resource](http://tilt.dev/resource):
        f:ownerReferences:
          .:
          k:{"uid":"116e222b-506f-412a-aa0b-03d128251295"}:
      f:spec:
        f:cluster:
        f:disableSource:
          .:
          f:configMap:
            .:
            f:key:
            f:name:
        f:podLogStreamTemplateSpec:
          .:
          f:ignoreContainers:
          f:sinceTime:
        f:timeout:
        f:yaml:
    Manager:    tilt
    Operation:  Update
    Time:       2022-09-01T11:01:32Z
  Owner References:
    API Version:           [tilt.dev/v1alpha1](http://tilt.dev/v1alpha1)
    Block Owner Deletion:  true
    Controller:            true
    Kind:                  Tiltfile
    Name:                  (Tiltfile)
    UID:                   116e222b-506f-412a-aa0b-03d128251295
  Resource Version:        62
  UID:                     62d360a6-cae5-4944-a32e-faf2a89b98ec
Spec:
  Cluster:  default
  Disable Source:
    Config Map:
      Key:   isDisabled
      Name:  uncategorized-disable
  Pod Log Stream Template Spec:
    Ignore Containers:
      istio-init
      istio-proxy
    Since Time:  2022-09-01T11:01:22Z
  Timeout:       30s
  Yaml:          apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
    [app.kubernetes.io/managed-by](http://app.kubernetes.io/managed-by): Helm
    [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
    [app.kubernetes.io/version](http://app.kubernetes.io/version): 0.0.1-SNAPSHOT
    [helm.sh/chart](http://helm.sh/chart): k8s-test-app-0.0.1-SNAPSHOT
  name: k8s-srv-deployment-k8s-test-app

---
apiVersion: [networking.k8s.io/v1](http://networking.k8s.io/v1)
kind: Ingress
metadata:
  labels:
    [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
    [app.kubernetes.io/managed-by](http://app.kubernetes.io/managed-by): Helm
    [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
    [app.kubernetes.io/version](http://app.kubernetes.io/version): 0.0.1-SNAPSHOT
    [helm.sh/chart](http://helm.sh/chart): k8s-test-app-0.0.1-SNAPSHOT
  name: k8s-srv-deployment-k8s-test-app
spec:
  rules:
  - host: api.apps-crc.testing
    http:
      paths:
      - backend:
          service:
            name: k8s-srv-deployment-k8s-test-app
            port:
              number: 8080
        path: /api/v1/all-customers
        pathType: Prefix

Status:
  Applied Input Hash:  GMzaCFcsQ9WahFqeuPBPRbKR5m8=
  Disable Status:
    Disabled:             false
    Last Update Time:     2022-09-01T11:01:32Z
    Reason:               ConfigMap/key "uncategorized-disable"/"isDisabled" is false
    State:                Enabled
  Last Apply Start Time:  2022-09-01T11:01:32.611941Z
  Last Apply Time:        2022-09-01T11:01:35.847507Z
  Result YAML:            apiVersion: v1
kind: ServiceAccount
metadata:
  creationTimestamp: "2022-09-01T11:01:35Z"
  labels:
    [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
    [app.kubernetes.io/managed-by](http://app.kubernetes.io/managed-by): tilt
    [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
    [app.kubernetes.io/version](http://app.kubernetes.io/version): 0.0.1-SNAPSHOT
    [helm.sh/chart](http://helm.sh/chart): k8s-test-app-0.0.1-SNAPSHOT
  name: k8s-srv-deployment-k8s-test-app
  namespace: c1demo
  resourceVersion: "32181"
  uid: b263710c-1250-474e-abe1-084164ba6a4f

---
apiVersion: [networking.k8s.io/v1](http://networking.k8s.io/v1)
kind: Ingress
metadata:
  creationTimestamp: "2022-09-01T11:01:35Z"
  generation: 1
  labels:
    [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
    [app.kubernetes.io/managed-by](http://app.kubernetes.io/managed-by): tilt
    [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
    [app.kubernetes.io/version](http://app.kubernetes.io/version): 0.0.1-SNAPSHOT
    [helm.sh/chart](http://helm.sh/chart): k8s-test-app-0.0.1-SNAPSHOT
  name: k8s-srv-deployment-k8s-test-app
  namespace: c1demo
  resourceVersion: "32184"
  uid: 3fdfbb84-77ba-4b4c-90cc-fad3da2762ea
spec:
  rules:
  - host: api.apps-crc.testing
    http:
      paths:
      - backend:
          service:
            name: k8s-srv-deployment-k8s-test-app
            port:
              number: 8080
        path: /api/v1/all-customers
        pathType: Prefix



Name:         k8s-srv-deployment-k8s-test-app
Namespace:
Labels:       <none>
Annotations:  [tilt.dev/log-span-id](http://tilt.dev/log-span-id): kubernetesapply:k8s-srv-deployment-k8s-test-app
              [tilt.dev/managed-by](http://tilt.dev/managed-by): buildcontrol
              [tilt.dev/resource](http://tilt.dev/resource): k8s-srv-deployment-k8s-test-app
API Version:  [tilt.dev/v1alpha1](http://tilt.dev/v1alpha1)
Kind:         KubernetesApply
Metadata:
  Creation Timestamp:  2022-09-01T11:01:32Z
  Managed Fields:
    API Version:  [tilt.dev/v1alpha1](http://tilt.dev/v1alpha1)
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:[tilt.dev/log-span-id](http://tilt.dev/log-span-id):
          f:[tilt.dev/managed-by](http://tilt.dev/managed-by):
          f:[tilt.dev/resource](http://tilt.dev/resource):
        f:ownerReferences:
          .:
          k:{"uid":"116e222b-506f-412a-aa0b-03d128251295"}:
      f:spec:
        f:cluster:
        f:disableSource:
          .:
          f:configMap:
            .:
            f:key:
            f:name:
        f:podLogStreamTemplateSpec:
          .:
          f:ignoreContainers:
          f:sinceTime:
        f:portForwardTemplateSpec:
          .:
          f:forwards:
        f:timeout:
        f:yaml:
    Manager:    tilt
    Operation:  Update
    Time:       2022-09-01T11:01:32Z
  Owner References:
    API Version:           [tilt.dev/v1alpha1](http://tilt.dev/v1alpha1)
    Block Owner Deletion:  true
    Controller:            true
    Kind:                  Tiltfile
    Name:                  (Tiltfile)
    UID:                   116e222b-506f-412a-aa0b-03d128251295
  Resource Version:        477
  UID:                     a1c14400-88ca-4d2c-ac59-9be1cc27cb4e
Spec:
  Cluster:  default
  Disable Source:
    Config Map:
      Key:   isDisabled
      Name:  k8s-srv-deployment-k8s-test-app-disable
  Pod Log Stream Template Spec:
    Ignore Containers:
      istio-init
      istio-proxy
    Since Time:  2022-09-01T11:01:22Z
  Port Forward Template Spec:
    Forwards:
      Container Port:  8080
      Host:            localhost
      Local Port:      8080
  Timeout:             30s
  Yaml:                apiVersion: v1
kind: Service
metadata:
  labels:
    [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
    [app.kubernetes.io/managed-by](http://app.kubernetes.io/managed-by): Helm
    [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
    [app.kubernetes.io/version](http://app.kubernetes.io/version): 0.0.1-SNAPSHOT
    [helm.sh/chart](http://helm.sh/chart): k8s-test-app-0.0.1-SNAPSHOT
  name: k8s-srv-deployment-k8s-test-app
spec:
  ports:
  - name: http
    port: 8080
    protocol: TCP
    targetPort: http
  selector:
    [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
    [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
    [app.kubernetes.io/managed-by](http://app.kubernetes.io/managed-by): Helm
    [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
    [app.kubernetes.io/version](http://app.kubernetes.io/version): 0.0.1-SNAPSHOT
    [helm.sh/chart](http://helm.sh/chart): k8s-test-app-0.0.1-SNAPSHOT
  name: k8s-srv-deployment-k8s-test-app
spec:
  replicas: 1
  selector:
    matchLabels:
      [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
      [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
  strategy: {}
  template:
    metadata:
      labels:
        [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
        [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
    spec:
      containers:
      - image: image-registry.openshift-image-registry.svc:5000/c1demo/k8s-test-app:latest
        imagePullPolicy: Always
        livenessProbe:
          httpGet:
            path: /actuator/health/liveness
            port: 8080
          initialDelaySeconds: 10
          periodSeconds: 10
        name: k8s-test-app
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        readinessProbe:
          httpGet:
            path: /actuator/health/readiness
            port: 8080
          initialDelaySeconds: 10
          periodSeconds: 10
        resources:
          limits:
            cpu: "1"
            memory: 512Mi
          requests:
            cpu: 500m
            memory: 512Mi
        securityContext: {}
      securityContext: {}
      serviceAccountName: k8s-srv-deployment-k8s-test-app

Status:
  Applied Input Hash:  PTFz_Z0qiXzltu0Ww77vbfGZjyE=
  Disable Status:
    Disabled:             false
    Last Update Time:     2022-09-01T11:01:32Z
    Reason:               ConfigMap/key "k8s-srv-deployment-k8s-test-app-disable"/"isDisabled" is false
    State:                Enabled
  Last Apply Start Time:  2022-09-01T13:33:28.247998Z
  Last Apply Time:        2022-09-01T13:33:28.704845Z
  Result YAML:            apiVersion: v1
kind: Service
metadata:
  creationTimestamp: "2022-09-01T13:33:28Z"
  labels:
    [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
    [app.kubernetes.io/managed-by](http://app.kubernetes.io/managed-by): tilt
    [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
    [app.kubernetes.io/version](http://app.kubernetes.io/version): 0.0.1-SNAPSHOT
    [helm.sh/chart](http://helm.sh/chart): k8s-test-app-0.0.1-SNAPSHOT
  name: k8s-srv-deployment-k8s-test-app
  namespace: c1demo
  resourceVersion: "62546"
  uid: 55803c4b-01b8-4f83-820c-6cb7623f4f40
spec:
  clusterIP: 10.217.5.236
  clusterIPs:
  - 10.217.5.236
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - name: http
    port: 8080
    protocol: TCP
    targetPort: http
  selector:
    [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
    [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
  sessionAffinity: None
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: "2022-09-01T13:33:28Z"
  generation: 1
  labels:
    [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
    [app.kubernetes.io/managed-by](http://app.kubernetes.io/managed-by): tilt
    [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
    [app.kubernetes.io/version](http://app.kubernetes.io/version): 0.0.1-SNAPSHOT
    [helm.sh/chart](http://helm.sh/chart): k8s-test-app-0.0.1-SNAPSHOT
  name: k8s-srv-deployment-k8s-test-app
  namespace: c1demo
  resourceVersion: "62550"
  uid: 82e6c98b-a846-4af5-92f8-baa57559d639
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
      [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        [app.kubernetes.io/instance](http://app.kubernetes.io/instance): k8s-srv-deployment-k8s-test-app
        [app.kubernetes.io/managed-by](http://app.kubernetes.io/managed-by): tilt
        [app.kubernetes.io/name](http://app.kubernetes.io/name): k8s-test-app
        [tilt.dev/pod-template-hash](http://tilt.dev/pod-template-hash): 26edb532b976f5d69550
    spec:
      containers:
      - image: image-registry.openshift-image-registry.svc:5000/c1demo/k8s-test-app:latest
        imagePullPolicy: Always
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /actuator/health/liveness
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        name: k8s-test-app
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /actuator/health/readiness
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        resources:
          limits:
            cpu: "1"
            memory: 512Mi
          requests:
            cpu: 500m
            memory: 512Mi
        securityContext: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: k8s-srv-deployment-k8s-test-app
      serviceAccountName: k8s-srv-deployment-k8s-test-app
      terminationGracePeriodSeconds: 30

@adam-aph
Copy link
Author

adam-aph commented Sep 1, 2022

Anyways, I added extra tag to helm chart which contains timestamp value, this made the yaml different and now the re-deployment is triggered.

This seems however like some dirty trick, it would be great if Tilt could handle it natively.

I'm kind of missing two features, to add additional dependency outside the helm chart and force the update even if the chart produces the same yaml:

k8s_yaml(helm(...), resource_deps=[], pull=False)

@nicks
Copy link
Member

nicks commented Sep 6, 2022

A couple things to note here:

All of Tilt's image-building primitives will use an immutable tag instead of a mutable one. In your example, you're using image-registry.openshift-image-registry.svc:5000/c1demo/k8s-test-app:latest. This will not work correctly if you want to update the image on every tilt up. Is there a reason you're not using tilt's image-building primitives (docker_build or custom_build).

For more on this, see: https://docs.tilt.dev/custom_build.html#why-tilt-uses-immutable-tags

re: "This seems however like some dirty trick" -- Most modern orchestrators work this way by default -- you declare the infrastructure you want, and if nothing has changed, than the orchestrator will not make any changes. Here's some docs on Kubernetes on this: https://kubernetes.io/docs/concepts/architecture/controller/. i.e., if you deploy the same yaml, but you've mutated the image that the YAML points to, then Kubernetes will not restart the pod.

@nicks
Copy link
Member

nicks commented Sep 6, 2022

(closing this issue, because this is basically working as I would expect, though happy to answer further questions about how you're building/deploying the image -- which i think is the underlying misunderstanding here)

@nicks nicks closed this as completed Sep 6, 2022
@adam-aph
Copy link
Author

adam-aph commented Sep 6, 2022

Yeah, perhaps I'm not using Tilt as it was initially designed. The system which I'm building locally just for development tests is also built for production via full blown CI/CD pipeline, so I don't want to duplicate all these building details in the Tiltfile. Therefore it is convenient for me to build the container image and deliver it to local image registry via maven plugins, as it will work the same way for production builds, just the registry address will be different. Also Helm chart is the same as for production, with different variable values. That's why I'm not using any tilt-specific building primitives.
So while using Tilt just for re-deployment of refreshed container image, I was trying to find a proper "tilt way" to trigger the deployment. If there is a better way to do it other than just use that dummy version.yaml file, I'm happy to discuss it. BTW, I'm not using docker at all, these images are cri-o containers.
Does that make sense?

@adam-aph
Copy link
Author

adam-aph commented Sep 6, 2022

Interesting, it seems that with my version.yaml file I resolved my problem with similar way as discussed by kubernetes folks here. 😃

@nicks
Copy link
Member

nicks commented Sep 6, 2022

ya, that makes sense. tilt doesn't care what you use to build container images; custom_build lets you use non-docker builders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants