apiVersion: skaffold/v4beta7
kind: Config
metadata:
  name: my-utility-service

build:
  # This tells Skaffold to build the image locally using your Docker daemon.
  local:
    push: false
    # This is the crucial part for your workflow. Instead of pushing to a
    # registry, it loads the built image directly into your cluster's nodes.
    # load: true
  artifacts:
    # Defines the image to build. It matches the placeholder in deployment.yaml.
    - image: homelaboperator
      context: . # The build context is the root directory
      docker:
        dockerfile: Dockerfile

manifests:
  helm:
    releases:
      - name: homelab-operator
        chartPath: charts/operator
        setValueTemplates:
          image.repository: '{{.IMAGE_REPO_homelaboperator}}'
          image.tag: '{{.IMAGE_TAG_homelaboperator}}'

deploy:
  # Use kubectl to apply the manifests.
  kubectl: {}
