You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Reference to one or more secrets to be used when pulling images## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/imagePullSecrets:
- name: "image-pull-secret-for-my-custom-repo"## Operatoroperator:
# Name that will be assigned to most of internal Kubernetes objects like# Deployment, ServiceAccount, Role etc.name: mongodb-kubernetes-operator# Name of the operator imageoperatorImageName: mongodb-kubernetes-operator# Name of the deployment of the operator poddeploymentName: mongodb-kubernetes-operator# Version of mongodb-kubernetes-operatorversion: 0.11.0# Uncomment this line to watch all namespaceswatchNamespace: "*"# Resources allocated to Operator Podresources:
limits:
cpu: 1100mmemory: 1Girequests:
cpu: 500mmemory: 200Mi# PriorityClass configuration for operator# ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclasspriorityClassName: ''# replicas deployed for the operator pod. Running 1 is optimal and suggested.replicas: 1# Additional environment variablesextraEnvs: []# environment:# - name: CLUSTER_DOMAIN# value: my-cluster.domainpodSecurityContext:
runAsNonRoot: truerunAsUser: 2000securityContext: {}## Operator's databasedatabase:
name: mongodb-database# set this to the namespace where you would like# to deploy the MongoDB database,# Note if the database namespace is not same# as the operator namespace,# make sure to set "watchNamespace" to "*"# to ensure that the operator has the# permission to reconcile resources in other namespaces# namespace: mongodb-databaseagent:
name: mongodb-agent-ubiversion: 107.0.7.8596-1versionUpgradeHook:
name: mongodb-kubernetes-operator-version-upgrade-post-start-hookversion: 1.0.9readinessProbe:
name: mongodb-kubernetes-readinessprobeversion: 1.0.20mongodb:
name: mongodb-community-serverrepo: my.custom.repo/folder/docker.io/mongodb # <-- custom repoimageType: ubi8registry:
agent: quay.io/mongodbversionUpgradeHook: quay.io/mongodbreadinessProbe: quay.io/mongodboperator: quay.io/mongodbpullPolicy: Always# Set to false if CRDs have been installed already. The CRDs can be installed# manually from the code repo: github.com/mongodb/mongodb-kubernetes-operator or# using the `community-operator-crds` Helm chart.community-operator-crds:
enabled: true
apply the configuration
What did you expect?
When not using a custom repo for the mongodb-community-server image, the image in the StatefulSet will be docker.io/mongodb/mongodb-community-server:4.4.29-ubi8. So I expect the StatefulSet to be configured to pull my.custom.repo/folder/docker.io/mongodb/mongodb-community-server:4.4.29-ubi8 when using a custom repo.
What happened instead?
The StatefulSet will be configured to pull my.custom.repo/folder/docker.io/mongodb/mongodb-community-server:4.4.29 instead of my.custom.repo/folder/docker.io/mongodb/mongodb-community-server:4.4.29-ubi8, missing the -ubi8 suffix and therefore making the container unable to start. That is because I pull the ubi8-image from the official repo and upload it, as it is, into my own repo with the same name. That way the image doesn't exist without the -ubi8 suffix.
The mongodb image gets constructed without the imageType suffix when not using one the of the official repos. I don't really understand the comment at the bottom of the function, so I can't tell if this is intentional or not.
(I removed all yaml definition stuff from the issue template here, because I don't think it is necessary in this case; If they are needed anyway, I can provide them)
The text was updated successfully, but these errors were encountered:
What did you do to encounter the bug?
Steps to reproduce the behavior:
mongodb.repo
is a custom repo:(I did not test this exact file, but the error should still occur as I explained further down; if not, i can provide more information)
What did you expect?
When not using a custom repo for the
mongodb-community-server
image, the image in the StatefulSet will bedocker.io/mongodb/mongodb-community-server:4.4.29-ubi8
. So I expect the StatefulSet to be configured to pullmy.custom.repo/folder/docker.io/mongodb/mongodb-community-server:4.4.29-ubi8
when using a custom repo.What happened instead?
The StatefulSet will be configured to pull
my.custom.repo/folder/docker.io/mongodb/mongodb-community-server:4.4.29
instead ofmy.custom.repo/folder/docker.io/mongodb/mongodb-community-server:4.4.29-ubi8
, missing the-ubi8
suffix and therefore making the container unable to start. That is because I pull the ubi8-image from the official repo and upload it, as it is, into my own repo with the same name. That way the image doesn't exist without the-ubi8
suffix.Operator Information
Kubernetes Cluster Information
Additional context
I think the issue lies in mongodb-kubernetes-operator/controllers/construct/mongodbstatefulset.go in the function at line 367:
https://github.com/mongodb/mongodb-kubernetes-operator/blob/master/controllers/construct/mongodbstatefulset.go#L367
The mongodb image gets constructed without the
imageType
suffix when not using one the of the official repos. I don't really understand the comment at the bottom of the function, so I can't tell if this is intentional or not.(I removed all yaml definition stuff from the issue template here, because I don't think it is necessary in this case; If they are needed anyway, I can provide them)
The text was updated successfully, but these errors were encountered: