fromcrd use doesn't create fromcrd-backrest-repo-config
Describe the bug A clear and concise description of what the bug is.
As we can see from the script below. The run.sh command doesn't create the fromcrd-backrest-repo-config file, which causes the pod not being able to create.
However, the pgo command could create that file
$ source examples/create-by-resource/run.sh Error from server (NotFound): secrets "fromcrd-postgres-secret" not found Error from server (NotFound): secrets "fromcrd-primaryuser-secret" not found Error from server (NotFound): secrets "fromcrd-testuser-secret" not found Error from server (NotFound): pgclusters.crunchydata.com "fromcrd" not found persistentvolumeclaim "fromcrd" deleted secret "fromcrd-postgres-secret" created secret "fromcrd-primaryuser-secret" created secret "fromcrd-testuser-secret" created pgcluster.crunchydata.com "fromcrd" created
$ k get secret -n pgouser1 NAME TYPE DATA AGE default-token-jv6nf kubernetes.io/service-account-token 3 54d fromcrd-postgres-secret Opaque 2 16s fromcrd-primaryuser-secret Opaque 2 14s fromcrd-testuser-secret Opaque 2 12s pgo-backrest-repo-config Opaque 4 43d pgo-backrest-token-sr6jd kubernetes.io/service-account-token 3 10h
$ pgo create cluster testcluster -n pgouser1 created Pgcluster testcluster workflow id cb926693-8b46-4fe2-9a45-e5f904af162a
$ k get secret -n pgouser1 NAME TYPE DATA AGE default-token-jv6nf kubernetes.io/service-account-token 3 54d pgo-backrest-repo-config Opaque 4 43d pgo-backrest-token-sr6jd kubernetes.io/service-account-token 3 10h testcluster-backrest-repo-config Opaque 7 1m testcluster-postgres-secret Opaque 2 1m testcluster-primaryuser-secret Opaque 2 1m testcluster-testuser-secret Opaque 2 1m
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Please tell us about your environment:
- Operating System:
- PGO: 4.0.0
- Where is this running ( Local, Cloud Provider): IBM Cloud Private
- Storage being used (NFS, Hostpath, Gluster, etc): Local volume
- Container Image Tag:
- PostgreSQL Version:
- Platform (Docker, Kubernetes, OpenShift):
- Platform Version:
Additional context Add any other context about the problem here.
we will review, I think that example didn't set up backrest but we will likely change it to do that.
Sorry if this is in the docs already, but I can't seem to find information on the use of the pgo-backrest-repo-config secret. I created my own with the example data in order to get the pod running.
@jmccormick2001
I changed the "pgo-backrest" label to "true" in both the metadata field and the userlabels field in the fromcrd.json file. The only difference is a new pod named fromcrd-backrest-shared-repo-58d594d85-tl5fr is created, but the file is still missing.
As you can see below, the mycluster was created using the pgo command, which looks normal, but since the fromcrd misses that file fromcrd-backrest-repo-config, and the containers can't be created.
NAME READY STATUS RESTARTS AGE
fromcrd-79bf7d97b-qsdsm 0/1 ContainerCreating 0 9s
fromcrd-backrest-shared-repo-58d594d85-tl5fr 0/1 ContainerCreating 0 9s
mycluster-86f5d86f64-trrvj 1/1 Running 0 6h
mycluster-backrest-shared-repo-55897c5c55-9n7bl 1/1 Running 0 6h
mycluster-stanza-create-zkpxn 0/1 Completed 0 6h
mycluster-udbh-5dc989d669-bgztt 0/1 Pending 0 6h
$ k get secrets -n pgouser1
NAME TYPE DATA AGE
default-token-jv6nf kubernetes.io/service-account-token 3 54d
fromcrd-postgres-secret Opaque 2 45s
fromcrd-primaryuser-secret Opaque 2 43s
fromcrd-testuser-secret Opaque 2 41s
mycluster-backrest-repo-config Opaque 7 6h
mycluster-postgres-secret Opaque 2 6h
mycluster-primaryuser-secret Opaque 2 6h
mycluster-testuser-secret Opaque 2 6h
pgo-backrest-repo-config Opaque 4 44d
pgo-backrest-token-lx6s9 kubernetes.io/service-account-token 3 9h
the issue is that the backrest repo secret is not being created in the example, I will check in a fixed example for this in the next hour that will be in the develop branch. backrest repo secrets are generated dynamically by the API, so, for the example you will see a Secret with 'canned' keys. You can look at how the Secret is created and keys generated in apiserver/clusterservice/clusterimpl.go, in the createBackrestRepoSecrets() function.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.