Skip to content

Commit

Permalink
Tracking pull request to merge release-1.6.27 to master (#1800)
Browse files Browse the repository at this point in the history
* update to 1.6.27

* Fixed the address not loading properly with the new packages (#1802)

* Forgot this one (#1803)

* Fixed an issue during creation (#1804)

* update backup (#1811)

* add patroni readonly service (#1820)

Co-authored-by: Richard <[email protected]>
  • Loading branch information
kuanfandevops and amichard committed Oct 7, 2022
1 parent 391e177 commit 5fe2d75
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 42 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tfrs",
"version": "1.6.26",
"version": "1.6.27",
"private": true,
"dependencies": {
"@fortawesome/fontawesome": "^1.1.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,9 @@ class ComplianceReportingEditContainer extends Component {
<p className="schedule-organization-address" key="organization-address">
{organizationAddress &&
AddressBuilder({
address_line_1: organizationAddress.addressLine_1,
address_line_2: organizationAddress.addressLine_2,
address_line_3: organizationAddress.addressLine_3,
address_line_1: organizationAddress.addressLine1,
address_line_2: organizationAddress.addressLine2,
address_line_3: organizationAddress.addressLine3,
city: organizationAddress.city,
state: organizationAddress.state,
postal_code: organizationAddress.postalCode
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/dashboard/components/OrganizationDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const OrganizationDetails = props => (
{props.loggedInUser.organization.name}
{props.loggedInUser.organization.organizationAddress &&
<dl>
<dd>{props.loggedInUser.organization.organizationAddress.addressLine_1}</dd>
<dd>{props.loggedInUser.organization.organizationAddress.addressLine1}</dd>
<dt />
<dd>{props.loggedInUser.organization.organizationAddress.addressLine_2}</dd>
<dd>{props.loggedInUser.organization.organizationAddress.addressLine2}</dd>
<dt />
<dd>{props.loggedInUser.organization.organizationAddress.addressLine_3}</dd>
<dd>{props.loggedInUser.organization.organizationAddress.addressLine3}</dd>
<dt />
<dd>{props.loggedInUser.organization.organizationAddress.city && `${props.loggedInUser.organization.organizationAddress.city}, `}
{props.loggedInUser.organization.organizationAddress.postalCode && `${props.loggedInUser.organization.organizationAddress.postalCode}`}
Expand Down Expand Up @@ -96,9 +96,9 @@ OrganizationDetails.propTypes = {
id: PropTypes.number,
name: PropTypes.string,
organizationAddress: PropTypes.shape({
addressLine_1: PropTypes.string,
addressLine_2: PropTypes.string,
addressLine_3: PropTypes.string,
addressLine1: PropTypes.string,
addressLine2: PropTypes.string,
addressLine3: PropTypes.string,
city: PropTypes.string,
postalCode: PropTypes.string,
state: PropTypes.string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@ class ExclusionReportEditContainer extends Component {
<p key="organization-address">
{organizationAddress &&
AddressBuilder({
address_line_1: organizationAddress.addressLine_1,
address_line_2: organizationAddress.addressLine_2,
address_line_3: organizationAddress.addressLine_3,
address_line_1: organizationAddress.addressLine1,
address_line_2: organizationAddress.addressLine2,
address_line_3: organizationAddress.addressLine3,
city: organizationAddress.city,
state: organizationAddress.state,
postal_code: organizationAddress.postalCode
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/organizations/OrganizationEditContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ class OrganizationEditContainer extends Component {
actionsType: this.state.fields.actionsType,
status: this.state.fields.status,
organizationAddress: {
addressLine_1: this.state.fields.addressLine_1,
addressLine_2: this.state.fields.addressLine_2,
addressLine_3: this.state.fields.addressLine_3,
addressLine_1: this.state.fields.addressLine1,
addressLine_2: this.state.fields.addressLine2,
addressLine_3: this.state.fields.addressLine3,
city: this.state.fields.city,
postalCode: this.state.fields.postalCode,
state: this.state.fields.state,
Expand Down Expand Up @@ -162,9 +162,9 @@ class OrganizationEditContainer extends Component {
actionsType: this.state.fields.actionsType,
status: this.state.fields.status,
organizationAddress: {
addressLine_1: this.state.fields.addressLine_1,
addressLine_2: this.state.fields.addressLine_2,
addressLine_3: this.state.fields.addressLine_3,
addressLine_1: this.state.fields.addressLine1,
addressLine_2: this.state.fields.addressLine2,
addressLine_3: this.state.fields.addressLine3,
city: this.state.fields.city,
postalCode: this.state.fields.postalCode,
state: this.state.fields.state,
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/organizations/components/OrganizationDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ const OrganizationDetails = props => (
<div className="address">
<dl className="dl-horizontal">
<dt>Address:</dt>
<dd>{props.organization.organizationAddress.addressLine_1}</dd>
<dd>{props.organization.organizationAddress.addressLine1}</dd>
<dt />
<dd>{props.organization.organizationAddress.addressLine_2}</dd>
<dd>{props.organization.organizationAddress.addressLine2}</dd>
<dt />
<dd>{props.organization.organizationAddress.addressLine_3}</dd>
<dd>{props.organization.organizationAddress.addressLine3}</dd>
<dt />
<dd>{props.organization.organizationAddress.city && `${props.organization.organizationAddress.city}, `}
{props.organization.organizationAddress.postalCode && `${props.organization.organizationAddress.postalCode}, `}
Expand Down Expand Up @@ -114,9 +114,9 @@ OrganizationDetails.propTypes = {
id: PropTypes.number,
name: PropTypes.string,
organizationAddress: PropTypes.shape({
addressLine_1: PropTypes.string,
addressLine_2: PropTypes.string,
addressLine_3: PropTypes.string,
addressLine1: PropTypes.string,
addressLine2: PropTypes.string,
addressLine3: PropTypes.string,
city: PropTypes.string,
postalCode: PropTypes.string,
state: PropTypes.string,
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/organizations/components/OrganizationEditForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ const OrganizationEditForm = props => (
<input
className="form-control"
id="organization-address-line-1"
name="addressLine_1"
name="addressLine1"
onChange={props.handleInputChange}
value={props.fields.addressLine_1 || ''}
value={props.fields.addressLine1 || ''}
/>
</label>
</div>
Expand All @@ -99,9 +99,9 @@ const OrganizationEditForm = props => (
<input
className="form-control"
id="organization-address-line-2"
name="addressLine_2"
name="addressLine2"
onChange={props.handleInputChange}
value={props.fields.addressLine_2 || ''}
value={props.fields.addressLine2 || ''}
/>
</label>
</div>
Expand All @@ -113,9 +113,9 @@ const OrganizationEditForm = props => (
<input
className="form-control"
id="organization-address-line-3"
name="addressLine_3"
name="addressLine3"
onChange={props.handleInputChange}
value={props.fields.addressLine_3 || ''}
value={props.fields.addressLine3 || ''}
/>
</label>
</div>
Expand Down Expand Up @@ -232,9 +232,9 @@ OrganizationEditForm.defaultProps = {
OrganizationEditForm.propTypes = {
fields: PropTypes.shape({
name: PropTypes.string,
addressLine_1: PropTypes.string,
addressLine_2: PropTypes.string,
addressLine_3: PropTypes.string,
addressLine1: PropTypes.string,
addressLine2: PropTypes.string,
addressLine3: PropTypes.string,
city: PropTypes.string,
postalCode: PropTypes.string,
state: PropTypes.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ postgres=patroni-master-prod:5432/tfrs
0 13 * * * default ./backup.sh -s
0 19 * * * default ./backup.sh -s
0 22 * * * default ./backup.sh -s -v all
0 23 * * * default find /backups/minio-backup/* -type d -ctime +7 | xargs rm -rf;mkdir -p /backups/minio-backup/$(date +%Y%m%d);cp -rp /minio-data/* /backups/minio-backup/$(date +%Y%m%d)
0 23 * * * default rsync -avu --delete "/minio-data/" "/backups/minio-backup"
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ postgres=patroni-master-test:5432/tfrs
0 13 * * * default ./backup.sh -s
0 19 * * * default ./backup.sh -s
0 22 * * * default ./backup.sh -s -v all
0 23 * * * default find /backups/minio-backup/* -type d -ctime +7 | xargs rm -rf;mkdir -p /backups/minio-backup/$(date +%Y%m%d);cp -rp /minio-data/* /backups/minio-backup/$(date +%Y%m%d)
0 23 * * * default rsync -avu --delete "/minio-data/" "/backups/minio-backup"
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ oc -n 0ab226-test process -f ./backup-deploy-test.yaml \
-p ENVIRONMENT_FRIENDLY_NAME='ZEVA Database Backup' \
-p ENVIRONMENT_NAME=0ab226-test \
-p BACKUP_DIR=/backups/patroni-backup/ \
-p DAILY_BACKUPS=10 \
-p WEEKLY_BACKUPS=12 \
-p MONTHLY_BACKUPS=3 \
-p DAILY_BACKUPS=4 \
-p WEEKLY_BACKUPS=2 \
-p MONTHLY_BACKUPS=1 \
-p CONFIG_MAP_NAME=backup-conf \
-p CONFIG_MOUNT_PATH=/ \
-p BACKUP_VOLUME_NAME=backup-tfrs-test \
Expand All @@ -50,9 +50,9 @@ oc -n 0ab226-prod process -f ./backup-deploy-prod.yaml \
-p ENVIRONMENT_FRIENDLY_NAME='ZEVA Database Backup' \
-p ENVIRONMENT_NAME=0ab226-prod \
-p BACKUP_DIR=/backups/patroni-backup/ \
-p DAILY_BACKUPS=10 \
-p WEEKLY_BACKUPS=12 \
-p MONTHLY_BACKUPS=3 \
-p DAILY_BACKUPS=14 \
-p WEEKLY_BACKUPS=4 \
-p MONTHLY_BACKUPS=2 \
-p CONFIG_MAP_NAME=backup-conf \
-p CONFIG_MOUNT_PATH=/ \
-p BACKUP_VOLUME_NAME=backup-tfrs-prod \
Expand Down
25 changes: 25 additions & 0 deletions openshift-v4/templates/patroni/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,31 @@ objects:
type: ClusterIP
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
cluster-name: ${NAME}${SUFFIX}
name: ${NAME}-replica${SUFFIX}
spec:
ports:
- port: 5432
name: postgresql
protocol: TCP
targetPort: 5432
- port: 8008
name: health
protocol: TCP
targetPort: 8008
selector:
cluster-name: ${NAME}${SUFFIX}
role: replica
app.kubernetes.io/name: patroni
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
#- apiVersion: v1
# kind: Service
# metadata:
Expand Down

0 comments on commit 5fe2d75

Please sign in to comment.