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

Fix ArgoCD diff on postgresql keys #441

Merged
merged 11 commits into from
Dec 17, 2024

Conversation

bozorgmehr96
Copy link
Contributor

Use with for every key in the cluster's spec.postgresql to prevent generating empty keys.

Fixes: #426

@bozorgmehr96
Copy link
Contributor Author

If there are other problems like this, give me the key names, and I will fix them.

@pschichtel
Copy link

@bozorgmehr96 this is my ignoreDifferences rule:

group: postgresql.cnpg.io
kind: Cluster
jsonPointers:
- /spec/bootstrap/initdb/postInitApplicationSQL
- /spec/managed
- /spec/postgresql/shared_preload_libraries
- /spec/priorityClassName
- /spec/postgresql/pg_hba
- /spec/postgresql/pg_ident

You covered the last two for me

@bozorgmehr96 bozorgmehr96 marked this pull request as draft November 5, 2024 11:50
@bozorgmehr96
Copy link
Contributor Author

@pschichtel Thanks. I wrapped them in if blocks.

@bozorgmehr96 bozorgmehr96 marked this pull request as ready for review November 5, 2024 12:10
@bozorgmehr96 bozorgmehr96 force-pushed the argocd_diff branch 2 times, most recently from 13ae008 to f8e49c2 Compare November 8, 2024 18:52
@pschichtel
Copy link

@bozorgmehr96 one more:

@bozorgmehr96
Copy link
Contributor Author

@pschichtel, can you provide a repro? It has a non-empty default value, so it shouldn't have the problem I'm trying to fix here.

@pschichtel
Copy link

@bozorgmehr96 I customized the schedule, so I don't get the defaults since it's an array. According to

and
default: barmanObjectStore
the method field is not required

@itay-grudev itay-grudev added the chart( cluster ) Related to the cluster chart label Nov 29, 2024
@Stevenpc3
Copy link
Contributor

Stevenpc3 commented Dec 5, 2024

I am getting a few items in argocd that are oddly just missing on the live manifest. Not sure if it's the CRD/operator or something with values that might be false by default removed or if these values don't exist anymore?

{63806B04-DB46-4FBC-A9BF-0B554DCE9E79}

  • bypassrls
  • createrole
  • replication
  • superuser

There might be more since we didn't set them all.

Here are other issues just to list them all. Some are shown in other places.

{AB567D58-6BC4-482A-8375-D0A06F91B185}
{58A7285D-3A19-45F6-8EAB-863C0390380E}
{0460AD8F-3BE0-4C63-981D-E384C28A5789}
{A4D569A2-20B2-4287-8B36-FAB09AFDC351}
{93121620-DB94-43DC-A361-3A2F450A17B8}

I think the issue is clearly the operator doesn't generate these empty or default values in the spec it creates.

@itay-grudev itay-grudev merged commit a366a33 into cloudnative-pg:main Dec 17, 2024
5 checks passed
hapeho pushed a commit to hapeho/cloudnative-pg-charts that referenced this pull request Dec 18, 2024
Signed-off-by: Mohammad Bozorgmehr <[email protected]>
Signed-off-by: Itay Grudev <[email protected]>
Co-authored-by: Mohammad Bozorgmehr <[email protected]>
Co-authored-by: Itay Grudev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart( cluster ) Related to the cluster chart
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ArgoCD is forever stuck on updating the Cluster resource generated by the cluster chart
4 participants