oracle / oracle-database-operator

The Oracle Database Operator for Kubernetes (a.k.a. OraOperator) helps developers, DBAs, DevOps and GitOps teams reduce the time and complexity of deploying and managing Oracle Databases. It eliminates the dependency on a human operator or administrator for the majority of database operations.
Universal Permissive License v1.0
141 stars 45 forks source link

do not pull image from OCR #118

Open dba2020 opened 4 months ago

dba2020 commented 4 months ago

Hi Team, when I create database with below command, it will pull the Oracle image from container-registry.oracle.com $kubectl apply -f singleinstancedatabase.yaml

If the Oracle image already exists locally(I have manually pulled it from OCR before), is it possible to use the local image directly without pulling it from container-registry.oracle.com?

yunus-qureshi commented 4 months ago

Which image are you pulling from container-registry.oracle.com?

dba2020 commented 4 months ago

Hi Yunus, The image I'm currently pulling/testing is 19.3.0.0. But it is not limited to version 19.3, and other versions image will be tested in the future. I want to know if there is such a method, instead of pulling the image from OCR during running command "kubectl apply", but using the existing image locally(manually pulled it from OCR before).

For helm env, it is possible to set "imagePullPolicy=IfNotPresent" to use local image instead pulling from OCR, so I am thinking if operator can do this. helm code: https://github.com/oracle/docker-images/blob/main/OracleDatabase/SingleInstance/helm-charts/oracle-db/values.yaml#L49

Thanks/James.

IshaanDesai45 commented 4 weeks ago

@dba2020 we don't support imagePullPolicy right now but you can leverage the default imagePullPolicy to achieve the above requirement

  1. If the image tag is :latest, the imagePullPolicy will be automatically set to Always.
  2. If the image tag isn’t :latest, the imagePullPolicy will be automatically set to IfNotPresent.
  3. And if you don’t set any image tag, the imagePullPolicy will be automatically set to latest image and Always value.
IshaanDesai45 commented 4 weeks ago

Marking it as an enhancement for the next release