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

Enable schema validation for postgresql CRD #388

Closed
sdudoladov opened this issue Sep 17, 2018 · 9 comments · Fixed by #599
Closed

Enable schema validation for postgresql CRD #388

sdudoladov opened this issue Sep 17, 2018 · 9 comments · Fixed by #599

Comments

@sdudoladov
Copy link
Member

A few misconfigurations may be catched by k8s-native CRD validation early

@gane5hvarma
Copy link

Hi @sdudoladov I would like to work on this issue.by the way im new to kubernetes and i would like to work on it.

@Jan-M
Copy link
Member

Jan-M commented Apr 17, 2019

@gane5hvarma PRs are always welcome ;)

@yujunz
Copy link
Contributor

yujunz commented Jul 9, 2019

Absolutely needed. Any progress so far?

For example, I'd like the change being rejected if it has no effect. Otherwise the actual status will deviate from the spec.

postgres-operator-8886ccf-nqdvf:postgres-operator time="2019-07-09T07:11:40Z" level=warning msg="postgresql version change(\"10\" -> \"9.6\") has no effect" cluster-name=postgres-operator/hl-dev pkg=cluster worker=2

@Jan-M
Copy link
Member

Jan-M commented Jul 9, 2019

We are working on syntax/schema validation now. See referenced PR.

We do not yet intend to include checking "semantic" meaning and valid transitions. Which is also not supported I think by CRD schema.

And ultimately the 9.6 to 10 transition could be implemented by someone in the Docker image.

@yujunz
Copy link
Contributor

yujunz commented Jul 9, 2019

How does the operator determine some modifications has no effect at the moment?

@Jan-M
Copy link
Member

Jan-M commented Jul 9, 2019

I think this particular change is hard coded to inform users that this is not how major version upgrade works. (Spilo does it via Clone/Restore in Custom Bootstrap).

@yujunz
Copy link
Contributor

yujunz commented Jul 9, 2019

And ultimately the 9.6 to 10 transition could be implemented by someone in the Docker image.
(Spilo does it via Clone/Restore in Custom Bootstrap).

A bit confused on current status. Is it supported (even with some adhoc operations) or not?

@Jan-M
Copy link
Member

Jan-M commented Jul 10, 2019

The Postgres operator itself does not really support/do this. Migrating to a new major version in place is not supported right now and we are also not working on it right now.

What is supported is upgrading the major version when doing a clone or restore from AWS S3 e.g.

This is implemented in Spilo during the custom bootstrap. So we bootstrap from S3 backup. Upgrade single node and only then continue bootstraping replica nodes.

Using clone/restore is a convenient and safe flow that is still easier than dump restore.

@Jan-M Jan-M closed this as completed Jul 10, 2019
@Jan-M Jan-M reopened this Jul 10, 2019
@yujunz
Copy link
Contributor

yujunz commented Jul 10, 2019

What is supported is upgrading the major version when doing a clone or restore from AWS S3

This is good enough since major version upgrade is not that often.

@FxKu FxKu closed this as completed in #599 Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants