Skip to content

Commit 552c94d

Browse files
authored
Merge branch 'main' into K8SPG-570
2 parents a1894ab + ef7bef9 commit 552c94d

29 files changed

+974
-20
lines changed

CONTRIBUTING.md

Lines changed: 73 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Contributing to Percona Operator for PostgreSQL
22

3+
We welcome contributions to the Percona Operator for PostgreSQL project and we're glad that you would like to become a Percona community member and participate in keeping open source open. For you to help us improve the Operator, please follow the guidelines below.
4+
35
## Prerequisites
46

5-
Before submitting code contributions, you should first complete the following prerequisites.
7+
Before submitting code contributions, complete the following prerequisites first.
68

79
### 1. Sign the CLA
810

@@ -16,40 +18,102 @@ Please make sure to read and observe the [Contribution Policy](code-of-conduct.m
1618

1719
### 1. Making a bug report
1820

19-
Improvement and bugfix tasks for Percona's projects are tracked in [Jira](https://jira.percona.com/projects/K8SPG/issues).
21+
We track improvement and bugfix tasks for Percona Operator project in [Jira](https://jira.percona.com/projects/K8SPG/issues).
2022

2123
Although not mandatory, it is a good practice to examine already open Jira issues first. For bigger contributions, we suggest creating a Jira issue and discussing it with the engineering team and community before proposing any code changes.
2224

2325
Another good place to discuss Percona's projects with developers and other community members is the [community forum](https://forums.percona.com).
2426

2527
### 2. Contributing to the source tree
2628

27-
Contributions to the source tree should follow the workflow described below:
29+
Follow the workflow described below:
30+
31+
1. [Fork the repository on GitHub](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo), clone your fork locally, and then [sync your local fork to upstream](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork). Make sure to always sync your fork with upstream before starting to work on any changes.
2832

29-
1. First, you need to [fork the repository on GitHub](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo), clone your fork locally, and then [sync your local fork to upstream](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork). After that, before starting to work on changes, make sure to always sync your fork with upstream.
30-
2. Create a branch for changes you are planning to make. If there is a Jira ticket related to your contribution, it is recommended to name your branch in the following way: `<Jira issue number>-<short description>`, where the issue number is something like `K8SPG-42`.
33+
2. Create a branch for changes you are planning to make. If there is a Jira ticket related to your contribution, name your branch in the following way: `<Jira issue number>-<short description>`, where the issue number is something like `K8SPG-42`.
3134

3235
Create the branch in your local repo as follows:
3336

3437
```
3538
$ git checkout -b K8SPG-42-fix-feature-X
3639
```
3740

38-
When your changes are ready, make a commit, mentioning the Jira issue in the commit message, if any:
41+
3. When your changes are ready, make a commit, mentioning the Jira issue in the commit message, if any:
3942

4043
```
4144
$ git add .
4245
$ git commit -m "K8SPG-42 fixed by ......"
4346
$ git push -u origin K8SPG-42-fix-feature-X
4447
```
4548

46-
3. Create a pull request to the main repository on GitHub.
47-
4. When the reviewer makes some comments, address any feedback that comes and update the pull request.
48-
5. When your contribution is accepted, your pull request will be approved and merged to the main branch.
49+
4. Create a pull request to the main repository on GitHub.
50+
5. [Build a custom Operator image based on your changes](#build-a-custom-operator-image) to verify that they work
51+
6. [Update deployment manifests](#update-deployment-manifests) to reflect your changes
52+
7. [Run e2e tests](#run-e2e-tests) to verify your changes are stable and robust.
53+
8. Someone from our team reviews your pull request. When the reviewer makes some comments, address any feedback that comes and update the pull request.
54+
9. When your contribution is accepted, your pull request will be approved and merged to the main branch.
55+
56+
#### Build a custom Operator image based on your changes
57+
58+
To build a new Operator image based on your local changes, do the following:
59+
60+
1. Set the `IMAGE` environment variable to the your image repository and tag. For example:
61+
62+
```
63+
$ export IMAGE=<your-repository>/percona-postgresql-operator:<feature-XYZ>
64+
```
65+
66+
Replace <your-repository> and <feature-XYZ> with your own values.
67+
68+
2. Build the Docker image and push it to the specified repository:
69+
70+
```
71+
$ make build-docker-image
72+
```
73+
74+
#### Update deployment manifests
75+
76+
Update the files under the `deploy/` directory to reflect any new fields in the resource API, a new image, etc. The `deploy/` directory contains the CRDs, bundles, and other manifests.
77+
78+
Run the following command to update deployment manifests:
79+
80+
```
81+
$ make generate VERSION=<feature-XYZ>
82+
```
83+
84+
`<feature-XYZ>` here is the tag of your built image.
85+
86+
Next, test your custom changes by deploying the Operator on your Kubernetes cluster.
87+
88+
First, deploy the Operator:
89+
90+
```
91+
$ kubectl apply --server-side -f deploy/bundle.yaml
92+
```
93+
94+
Then, deploy a Percona PostgreSQL cluster CRD:
95+
96+
```
97+
$ kubectl apply -f deploy/cr.yaml
98+
```
99+
100+
#### Run end-to-end tests
101+
102+
The Operator repository includes a collection of end-to-end (e2e) tests under the `e2e-tests/` directory. You can run these tests on your own Kubernetes cluster to ensure that your changes are robust and stable.
103+
104+
105+
To run a specific test by name, use the following command. In the example below, we run the `init-deploy` test:
106+
107+
```
108+
$ kubectl kuttl test --config e2e-tests/kuttl.yaml --test "^init-deploy\$" --skip-delete
109+
```
110+
111+
Replace `init-deploy` with the name of the test you want to run.
49112

50113
### 3. Contributing to documentation
51114

52115
The workflow for documentation is similar, but we store source code for the Percona Operator for PostgreSQL documentation in a [separate repository](https://github.com/percona/k8spg-docs).
116+
53117
See the [Documentation Contribution Guide](https://github.com/percona/k8spg-docs/blob/main/CONTRIBUTING.md) for more information.
54118

55119
### 4. Container images

build/crd/crunchy/generated/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18038,6 +18038,14 @@ spec:
1803818038
- Cluster
1803918039
- Local
1804018040
type: string
18041+
loadBalancerClass:
18042+
description: |-
18043+
LoadBalancerClass specifies the class of the load balancer implementation
18044+
to be used. This field is supported for Service Type LoadBalancer only.
18045+
18046+
More info:
18047+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
18048+
type: string
1804118049
loadBalancerSourceRanges:
1804218050
description: |-
1804318051
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
@@ -18382,6 +18390,14 @@ spec:
1838218390
- Cluster
1838318391
- Local
1838418392
type: string
18393+
loadBalancerClass:
18394+
description: |-
18395+
LoadBalancerClass specifies the class of the load balancer implementation
18396+
to be used. This field is supported for Service Type LoadBalancer only.
18397+
18398+
More info:
18399+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
18400+
type: string
1838518401
loadBalancerSourceRanges:
1838618402
description: |-
1838718403
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
@@ -18434,6 +18450,14 @@ spec:
1843418450
- Cluster
1843518451
- Local
1843618452
type: string
18453+
loadBalancerClass:
18454+
description: |-
18455+
LoadBalancerClass specifies the class of the load balancer implementation
18456+
to be used. This field is supported for Service Type LoadBalancer only.
18457+
18458+
More info:
18459+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
18460+
type: string
1843718461
loadBalancerSourceRanges:
1843818462
description: |-
1843918463
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
@@ -20126,6 +20150,14 @@ spec:
2012620150
- Cluster
2012720151
- Local
2012820152
type: string
20153+
loadBalancerClass:
20154+
description: |-
20155+
LoadBalancerClass specifies the class of the load balancer implementation
20156+
to be used. This field is supported for Service Type LoadBalancer only.
20157+
20158+
More info:
20159+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
20160+
type: string
2012920161
loadBalancerSourceRanges:
2013020162
description: |-
2013120163
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.

build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8227,6 +8227,14 @@ spec:
82278227
additionalProperties:
82288228
type: string
82298229
type: object
8230+
loadBalancerClass:
8231+
description: |-
8232+
LoadBalancerClass specifies the class of the load balancer implementation
8233+
to be used. This field is supported for Service Type LoadBalancer only.
8234+
8235+
More info:
8236+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
8237+
type: string
82308238
loadBalancerSourceRanges:
82318239
description: |-
82328240
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
@@ -8263,6 +8271,14 @@ spec:
82638271
additionalProperties:
82648272
type: string
82658273
type: object
8274+
loadBalancerClass:
8275+
description: |-
8276+
LoadBalancerClass specifies the class of the load balancer implementation
8277+
to be used. This field is supported for Service Type LoadBalancer only.
8278+
8279+
More info:
8280+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
8281+
type: string
82668282
loadBalancerSourceRanges:
82678283
description: |-
82688284
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
@@ -15936,6 +15952,14 @@ spec:
1593615952
additionalProperties:
1593715953
type: string
1593815954
type: object
15955+
loadBalancerClass:
15956+
description: |-
15957+
LoadBalancerClass specifies the class of the load balancer implementation
15958+
to be used. This field is supported for Service Type LoadBalancer only.
15959+
15960+
More info:
15961+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
15962+
type: string
1593915963
loadBalancerSourceRanges:
1594015964
description: |-
1594115965
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
@@ -18345,6 +18369,9 @@ spec:
1834518369
items:
1834618370
type: string
1834718371
type: array
18372+
observedGeneration:
18373+
format: int64
18374+
type: integer
1834818375
patroniVersion:
1834918376
type: string
1835018377
pgbouncer:

config/crd/bases/pgv2.percona.com_perconapgclusters.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8634,6 +8634,14 @@ spec:
86348634
additionalProperties:
86358635
type: string
86368636
type: object
8637+
loadBalancerClass:
8638+
description: |-
8639+
LoadBalancerClass specifies the class of the load balancer implementation
8640+
to be used. This field is supported for Service Type LoadBalancer only.
8641+
8642+
More info:
8643+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
8644+
type: string
86378645
loadBalancerSourceRanges:
86388646
description: |-
86398647
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
@@ -8670,6 +8678,14 @@ spec:
86708678
additionalProperties:
86718679
type: string
86728680
type: object
8681+
loadBalancerClass:
8682+
description: |-
8683+
LoadBalancerClass specifies the class of the load balancer implementation
8684+
to be used. This field is supported for Service Type LoadBalancer only.
8685+
8686+
More info:
8687+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
8688+
type: string
86738689
loadBalancerSourceRanges:
86748690
description: |-
86758691
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
@@ -16343,6 +16359,14 @@ spec:
1634316359
additionalProperties:
1634416360
type: string
1634516361
type: object
16362+
loadBalancerClass:
16363+
description: |-
16364+
LoadBalancerClass specifies the class of the load balancer implementation
16365+
to be used. This field is supported for Service Type LoadBalancer only.
16366+
16367+
More info:
16368+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
16369+
type: string
1634616370
loadBalancerSourceRanges:
1634716371
description: |-
1634816372
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
@@ -18752,6 +18776,9 @@ spec:
1875218776
items:
1875318777
type: string
1875418778
type: array
18779+
observedGeneration:
18780+
format: int64
18781+
type: integer
1875518782
patroniVersion:
1875618783
type: string
1875718784
pgbouncer:

config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17947,6 +17947,14 @@ spec:
1794717947
- Cluster
1794817948
- Local
1794917949
type: string
17950+
loadBalancerClass:
17951+
description: |-
17952+
LoadBalancerClass specifies the class of the load balancer implementation
17953+
to be used. This field is supported for Service Type LoadBalancer only.
17954+
17955+
More info:
17956+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
17957+
type: string
1795017958
loadBalancerSourceRanges:
1795117959
description: |-
1795217960
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
@@ -18291,6 +18299,14 @@ spec:
1829118299
- Cluster
1829218300
- Local
1829318301
type: string
18302+
loadBalancerClass:
18303+
description: |-
18304+
LoadBalancerClass specifies the class of the load balancer implementation
18305+
to be used. This field is supported for Service Type LoadBalancer only.
18306+
18307+
More info:
18308+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
18309+
type: string
1829418310
loadBalancerSourceRanges:
1829518311
description: |-
1829618312
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
@@ -18343,6 +18359,14 @@ spec:
1834318359
- Cluster
1834418360
- Local
1834518361
type: string
18362+
loadBalancerClass:
18363+
description: |-
18364+
LoadBalancerClass specifies the class of the load balancer implementation
18365+
to be used. This field is supported for Service Type LoadBalancer only.
18366+
18367+
More info:
18368+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
18369+
type: string
1834618370
loadBalancerSourceRanges:
1834718371
description: |-
1834818372
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
@@ -20024,6 +20048,14 @@ spec:
2002420048
- Cluster
2002520049
- Local
2002620050
type: string
20051+
loadBalancerClass:
20052+
description: |-
20053+
LoadBalancerClass specifies the class of the load balancer implementation
20054+
to be used. This field is supported for Service Type LoadBalancer only.
20055+
20056+
More info:
20057+
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
20058+
type: string
2002720059
loadBalancerSourceRanges:
2002820060
description: |-
2002920061
LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.

0 commit comments

Comments
 (0)