Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom registry configuration affect default used tags #1396

Open
julienbaladier opened this issue Sep 2, 2024 · 0 comments
Open

Custom registry configuration affect default used tags #1396

julienbaladier opened this issue Sep 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@julienbaladier
Copy link

julienbaladier commented Sep 2, 2024

What happened?

I am trying to use a private registry to pull images by following these instructions.

When setting only the spec.reaper.containerImage.registry and spec.medusa.containerImage.registry properties, it seems to affect the tags that are used as well. Instead of using the default fixed versions, it is using the latest tags for the repear and medusa images.

~$ kubectl get pods -n julien thehive-dc-r2-sts-0  -o json | jq -r '.spec.initContainers[].image'
cr.k8ssandra.io/k8ssandra/cass-management-api:4.1.5-ubi8
cr.k8ssandra.io/k8ssandra/k8ssandra-client:v0.5.0
docker.io/k8ssandra/medusa:0.22.0

~$ kubectl get pods -n julien thehive-dc-r2-sts-0  -o json | jq -r '.spec.containers[].image'
cr.k8ssandra.io/k8ssandra/cass-management-api:4.1.5-ubi8
docker.io/k8ssandra/medusa:0.22.0
cr.k8ssandra.io/k8ssandra/system-logger:v1.22.0

~$ kubectl get pods -n julien thehive-dc-reaper-58d5d9b994-thxnj  -o json | jq -r '.spec.containers[].image'
docker.io/thelastpickle/cassandra-reaper:3.6.1
~$ kubectl get pods -n julien thehive-dc-reaper-58d5d9b994-thxnj  -o json | jq -r '.spec.initContainers[].image'
docker.io/thelastpickle/cassandra-reaper:3.6.1

Did you expect to see something different?

I would have expected the tags not to be affected since I am only providing the information I case about. With the current behaviour I need to provide the tags and I need to update them each time the version changes.

How to reproduce it (as minimally and precisely as possible):

  1. Create the K8ssandraCluster without setting spec.reaper.containerImage.registry and spec.medusa.containerImage.registry.
  2. Check the images versions used for each container.
  3. Delete the K8ssandraCluster.
  4. Set the spec.reaper.containerImage.registry and spec.medusa.containerImage.registry perperties with the default registry: docker.io.
  5. Check the images versions used, they are different.

Environment

  • K8ssandra Operator version: v1.18.0

  • Kubernetes version information:

    Client Version: v1.30.1
    Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
    Server Version: v1.30.3-eks-2f46c53
    ```* Kubernetes cluster kind: EKS* Manifests:
    

```yaml

apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
name: test
spec:
auth: true
cassandra:
serverVersion: "4.1.5"
serverImage: /k8ssandra/cass-management-api:4.1.5-ubi8
serviceAccount: cassandra
superuserSecretRef:
name: test-superuser
telemetry:
mcac:
enabled: false
prometheus:
enabled: true
datacenters:
- metadata:
name: dc
size: 3
racks:
- name: r1
nodeAffinityLabels:
"topology.kubernetes.io/zone": eu-west-1a
- name: r2
nodeAffinityLabels:
"topology.kubernetes.io/zone": eu-west-1b
- name: r3
nodeAffinityLabels:
"topology.kubernetes.io/zone": eu-west-1c
perNodeConfigInitContainerImage: /mikefarah/yq:4
storageConfig:
cassandraDataVolumeClaimSpec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
reaper:
cassandraUserSecretRef:
name: test-reaper
uiUserSecretRef:
name: test-reaper-ui
containerImage:
registry:
# tag: 3.6.1
pullSecretRef:
name: docker-cfg
telemetry:
mcac:
enabled: false
prometheus:
enabled: true
deploymentMode: SINGLE
medusa:
containerImage:
registry:
# tag: 0.22.0
pullSecretRef:
name: docker-cfg
cassandraUserSecretRef:
name: test-medusa
purgeBackups: false
storageProperties:
prefix: test
credentialsType: role-based
storageSecretRef:
name: ""
storageProvider: s3
region: eu-west-1
bucketName: s3-test-cassandra
sslVerify: true
maxBackupAge: 5

maxBackupCount: 30

apiVersion: v1
kind: ServiceAccount
metadata:
name: cassandra
annotations:
eks.amazonaws.com/role-arn: "arn:aws:iam::XXXXXXXXXXXX:role/iam-role-sa-test-cassandra"
imagePullSecrets:

  • name: docker-cfg



┆Issue is synchronized with this [Jira Story](https://datastax.jira.com/browse/K8OP-1) by [Unito](https://www.unito.io)
┆Issue Number: K8OP-1
@julienbaladier julienbaladier added the bug Something isn't working label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: No status
Development

No branches or pull requests

1 participant