Skip to content

Commit

Permalink
Add params.env file for opendatahub-operator install support, fixes o…
Browse files Browse the repository at this point in the history
  • Loading branch information
dhirajsb committed Dec 5, 2023
1 parent 34de95b commit 295c5f2
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
12 changes: 11 additions & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Adds namespace to all resources.
namespace: model-registry-operator-system
namespace: opendatahub

# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
Expand Down Expand Up @@ -39,3 +39,13 @@ patchesStrategicMerge:
#- manager_webhook_patch.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

# config and replacements to use params.env for use in opendatahub-operator
configMapGenerator:
- envs:
- params.env
name: parameters
generatorOptions:
disableNameSuffixHash: true
replacements:
- path: replacements.yaml
3 changes: 3 additions & 0 deletions config/default/params.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
IMAGES_MODELREGISTRY_OPERATOR=quay.io/opendatahub/model-registry-operator:latest
IMAGES_GRPC_SERVICE=gcr.io/tfx-oss-public/ml_metadata_store_server:1.14.0
IMAGES_REST_SERVICE=quay.io/opendatahub/model-registry:latest
31 changes: 31 additions & 0 deletions config/default/replacements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# replacements from configmap using params.env for use in opendatahub-operator
- source:
kind: ConfigMap
name: model-registry-operator-parameters
fieldPath: data.IMAGES_MODELREGISTRY_OPERATOR
targets:
- select:
kind: Deployment
name: controller-manager
fieldPaths:
- spec.template.spec.containers.[name=manager].image
- source:
kind: ConfigMap
name: model-registry-operator-parameters
fieldPath: data.IMAGES_GRPC_SERVICE
targets:
- select:
kind: Deployment
name: controller-manager
fieldPaths:
- spec.template.spec.containers.[name=manager].env.[name=GRPC_IMAGE].value
- source:
kind: ConfigMap
name: model-registry-operator-parameters
fieldPath: data.IMAGES_REST_SERVICE
targets:
- select:
kind: Deployment
name: controller-manager
fieldPaths:
- spec.template.spec.containers.[name=manager].env.[name=REST_IMAGE].value
2 changes: 1 addition & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
- /manager
args:
- --leader-elect
image: quay.io/opendatahub/model-registry-operator:latest
image: controller
name: manager
env:
- name: GRPC_IMAGE
Expand Down

0 comments on commit 295c5f2

Please sign in to comment.