zalando / zalando/postgres-operator
ArgoCD "custom health check"
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
Anyone else using ArgoCD to deploy this operator?
I'd like to suggest we create an ArgoCD "Custom Health Check" for this operator.
Read more about what that is here:
https://argo-cd.readthedocs.io/en/stable/operator-manual/health/
And here's how to add one:
https://argo-cd.readthedocs.io/en/stable/operator-manual/health/#way-2-contribute-a-custom-health-check
Essentially something like this:
$ cd github.com/argoproj/argo-cd
$ cat resource_customizations/acid.zalan.do/postgresql/health.lua
hs = {}
if obj.status == nil or obj.status.PostgresClusterStatus == nil then
hs.status = "Progressing"
hs.message = "Waiting for postgres cluster status..."
return hs
end
if obj.status.PostgresClusterStatus == "Running" then
hs.status = "Healthy"
hs.message = obj.status.PostgresClusterStatus
return hs
end
if obj.status.PostgresClusterStatus == "Creating" or obj.status.PostgresClusterStatus == "Updating" then
hs.status = "Progressing"
hs.message = obj.status.PostgresClusterStatus
return hs
end
-- CreateFailed/UpdateFailed/SyncFailed/Invalid/etc
-- See: https://github.com/zalando/postgres-operator/blob/0745ce7cce63ab6431103d27eb08e54ec47d2b15/pkg/apis/acid.zalan.do/v1/const.go#L4-L13
hs.status = "Degraded"
hs.message = obj.status.PostgresClusterStatus
return hs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ArgoCD custom health check documentation linked in the issue and compare it with the provided Lua example for the PostgreSQL operator. Review the status values referenced from pkg/apis/acid.zalan.do/v1/const.go, then determine where this repository should provide the health check and how its status transitions should be represented. Done means the operator has an ArgoCD custom health check covering the listed statuses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, lua, postgresql
- Domain
- databases, devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100