opendatahub-io / model-registry-operator

Apache License 2.0
3 stars 19 forks source link

Unable to override operator image using make deploy #24

Closed lampajr closed 11 months ago

lampajr commented 1 year ago

Describe the bug Running make deploy IMG=<some-registry>/model-registry-operator:tag as described in the README does not override the operator image by using the provided one, it keeps using the :latest.

The issue seems to be in the make deploy script, in particular: $(KUSTOMIZE) edit set image controller=${IMG} - where controller is not an image, therefore nothing is going to be replaced while issuing kustomize build

To Reproduce Steps to reproduce the behavior:

  1. Run cd config/manager && kustomize edit set image controller=quay.io/opendatahub/model-registry-operator:main-4c04ff7
  2. config/manager/kustomization.yaml should contain the following changes:
    apiVersion: kustomize.config.k8s.io/v1beta1
    kind: Kustomization
    images:
    - name: controller
    newName: quay.io/opendatahub/model-registry-operator
    newTag: main-4c04ff7
  3. Issue kustomize build . or kustomize build config/manager depending if you are in the target directory or in the root.
  4. Check the generated output still contains :latest image:
    ...
          value: "false"
        image: quay.io/opendatahub/model-registry-operator:latest
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8081
    ...

Expected behavior The kustomized build should contain the overridden image: image: quay.io/opendatahub/model-registry-operator:main-4c04ff7

Additional context n/a

dhirajsb commented 11 months ago

Fixed with #38