Skip to content

Commit bdd0db7

Browse files
author
Jeff McCormick
committed
massive rename
1 parent dba5181 commit bdd0db7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1987
-1833
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pgo: check-go-vars
3232
runpgo: check-go-vars
3333
pgo --kubeconfig=/etc/kubernetes/admin.conf
3434
clean: check-go-vars
35-
rm -rf $(GOPATH)/pkg/* $(GOBIN)/main $(GOBIN)/pgo
35+
rm -rf $(GOPATH)/pkg/* $(GOBIN)/postgres-operator $(GOBIN)/apiserver $(GOBIN)/*pgo
3636
godep restore
3737
operatorimage: check-go-vars
3838
go install postgres-operator.go

apis/cr/v1/BUILD

Lines changed: 0 additions & 37 deletions
This file was deleted.

apis/cr/v1/backup.go

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package v1
2+
13
/*
24
Copyright 2017 Crunchy Data Solutions, Inc.
35
Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,25 +15,26 @@
1315
limitations under the License.
1416
*/
1517

16-
package v1
17-
1818
import (
1919
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2020
)
2121

22+
// PgbackupResourcePlural ...
2223
const PgbackupResourcePlural = "pgbackups"
2324

25+
// PgbackupSpec ...
2426
type PgbackupSpec struct {
25-
Name string `json:"name"`
26-
StorageSpec PgStorageSpec `json:"storagespec"`
27-
CCP_IMAGE_TAG string `json:"ccpimagetag"`
28-
BACKUP_HOST string `json:"backuphost"`
29-
BACKUP_USER string `json:"backupuser"`
30-
BACKUP_PASS string `json:"backuppass"`
31-
BACKUP_PORT string `json:"backupport"`
32-
BACKUP_STATUS string `json:"backupstatus"`
27+
Name string `json:"name"`
28+
StorageSpec PgStorageSpec `json:"storagespec"`
29+
CCPImageTag string `json:"ccpimagetag"`
30+
BackupHost string `json:"backuphost"`
31+
BackupUser string `json:"backupuser"`
32+
BackupPass string `json:"backuppass"`
33+
BackupPort string `json:"backupport"`
34+
BackupStatus string `json:"backupstatus"`
3335
}
3436

37+
// Pgbackup ...
3538
type Pgbackup struct {
3639
metav1.TypeMeta `json:",inline"`
3740
metav1.ObjectMeta `json:"metadata"`
@@ -40,21 +43,26 @@ type Pgbackup struct {
4043
Status PgbackupStatus `json:"status,omitempty"`
4144
}
4245

46+
// PgbackupList ...
4347
type PgbackupList struct {
4448
metav1.TypeMeta `json:",inline"`
4549
metav1.ListMeta `json:"metadata"`
4650

4751
Items []Pgbackup `json:"items"`
4852
}
4953

54+
// PgbackupStatus ...
5055
type PgbackupStatus struct {
5156
State PgbackupState `json:"state,omitempty"`
5257
Message string `json:"message,omitempty"`
5358
}
5459

60+
// PgbackupState ...
5561
type PgbackupState string
5662

5763
const (
58-
PgbackupStateCreated PgbackupState = "Created"
64+
// PgbackupStateCreated ...
65+
PgbackupStateCreated PgbackupState = "Created"
66+
// PgbackupStateProcessed ...
5967
PgbackupStateProcessed PgbackupState = "Processed"
6068
)

apis/cr/v1/cluster.go

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package v1
2+
13
/*
24
Copyright 2017 Crunchy Data Solutions, Inc.
35
Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,67 +15,71 @@
1315
limitations under the License.
1416
*/
1517

16-
package v1
17-
1818
import (
1919
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2020
)
2121

22+
// PgclusterResourcePlural ..
2223
const PgclusterResourcePlural = "pgclusters"
2324

25+
// Pgcluster ..
2426
type Pgcluster struct {
2527
metav1.TypeMeta `json:",inline"`
2628
metav1.ObjectMeta `json:"metadata"`
2729
Spec PgclusterSpec `json:"spec"`
2830
Status PgclusterStatus `json:"status,omitempty"`
2931
}
3032

31-
//anonymous struct field usage somecluster.metav1.ObjectMeta = foo
32-
33+
// PgclusterSpec ...
3334
type PgclusterSpec struct {
34-
Name string `json:"name"`
35-
ClusterName string `json:"clustername"`
36-
Policies string `json:"policies"`
37-
CCP_IMAGE_TAG string `json:"ccpimagetag"`
38-
Port string `json:"port"`
39-
NodeName string `json:"nodename"`
40-
MasterStorage PgStorageSpec `json:masterstorage`
41-
ReplicaStorage PgStorageSpec `json:replicastorage`
42-
PG_MASTER_HOST string `json:"pgmasterhost"`
43-
PG_MASTER_USER string `json:"pgmasteruser"`
44-
PG_MASTER_PASSWORD string `json:"pgmasterpassword"`
45-
PG_USER string `json:"pguser"`
46-
PG_PASSWORD string `json:"pgpassword"`
47-
PG_DATABASE string `json:"pgdatabase"`
48-
PG_ROOT_PASSWORD string `json:"pgrootpassword"`
49-
REPLICAS string `json:"replicas"`
50-
STRATEGY string `json:"strategy"`
51-
SECRET_FROM string `json:"secretfrom"`
52-
BACKUP_PVC_NAME string `json:"backuppvcname"`
53-
BACKUP_PATH string `json:"backuppath"`
54-
PGUSER_SECRET_NAME string `json:"pgusersecretname"`
55-
PGROOT_SECRET_NAME string `json:"pgrootsecretname"`
56-
PGMASTER_SECRET_NAME string `json:"pgmastersecretname"`
57-
STATUS string `json:"status"`
58-
PSW_LAST_UPDATE string `json:"pswlastupdate"`
59-
UserLabels map[string]string `json:"userlabels"`
35+
Name string `json:"name"`
36+
ClusterName string `json:"clustername"`
37+
Policies string `json:"policies"`
38+
CCPImageTag string `json:"ccpimagetag"`
39+
Port string `json:"port"`
40+
NodeName string `json:"nodename"`
41+
PrimaryStorage PgStorageSpec `json:primarystorage`
42+
ReplicaStorage PgStorageSpec `json:replicastorage`
43+
PrimaryHost string `json:"primaryhost"`
44+
PrimaryUser string `json:"primaryuser"`
45+
PrimaryPassword string `json:"primarypassword"`
46+
User string `json:"user"`
47+
Password string `json:"password"`
48+
Database string `json:"database"`
49+
RootPassword string `json:"rootpassword"`
50+
Replicas string `json:"replicas"`
51+
Strategy string `json:"strategy"`
52+
SecretFrom string `json:"secretfrom"`
53+
BackupPVCName string `json:"backuppvcname"`
54+
BackupPath string `json:"backuppath"`
55+
UserSecretName string `json:"usersecretname"`
56+
RootSecretName string `json:"rootsecretname"`
57+
PrimarySecretName string `json:"primarysecretname"`
58+
Status string `json:"status"`
59+
PswLastUpdate string `json:"pswlastupdate"`
60+
UserLabels map[string]string `json:"userlabels"`
6061
}
6162

63+
// PgclusterList ...
6264
type PgclusterList struct {
6365
metav1.TypeMeta `json:",inline"`
6466
metav1.ListMeta `json:"metadata"`
6567

6668
Items []Pgcluster `json:"items"`
6769
}
6870

71+
// PgclusterStatus ...
6972
type PgclusterStatus struct {
7073
State PgclusterState `json:"state,omitempty"`
7174
Message string `json:"message,omitempty"`
7275
}
7376

77+
// PgclusterState ...
7478
type PgclusterState string
7579

7680
const (
77-
PgclusterStateCreated PgclusterState = "Created"
81+
// PgclusterStateCreated ...
82+
PgclusterStateCreated PgclusterState = "Created"
83+
// PgclusterStateProcessed ...
7884
PgclusterStateProcessed PgclusterState = "Processed"
7985
)

apis/cr/v1/common.go

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,50 @@
11
package v1
22

3+
/*
4+
Copyright 2017 Crunchy Data Solutions, Inc.
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
*/
17+
318
import ()
419

5-
const PGROOT_SECRET_SUFFIX = "-pgroot-secret"
6-
const PGUSER_SECRET_SUFFIX = "-pguser-secret"
7-
const PGMASTER_SECRET_SUFFIX = "-pgmaster-secret"
20+
// RootSecretSuffix ...
21+
const RootSecretSuffix = "-pgroot-secret"
22+
23+
// UserSecretSuffix ...
24+
const UserSecretSuffix = "-pguser-secret"
25+
26+
// PrimarySecretSuffix ...
27+
const PrimarySecretSuffix = "-pgprimary-secret"
28+
29+
// StorageExisting ...
30+
const StorageExisting = "existing"
31+
32+
// StorageCreate ...
33+
const StorageCreate = "create"
34+
35+
// StorageEmptydir ...
36+
const StorageEmptydir = "emptydir"
837

9-
const STORAGE_EXISTING = "existing"
10-
const STORAGE_CREATE = "create"
11-
const STORAGE_EMPTYDIR = "emptydir"
12-
const STORAGE_DYNAMIC = "dynamic"
38+
// StorageDynamic ...
39+
const StorageDynamic = "dynamic"
1340

41+
// PgStorageSpec ...
1442
type PgStorageSpec struct {
15-
PvcName string `json:"pvcname"`
16-
StorageClass string `json:"storageclass"`
17-
PvcAccessMode string `json:"pvcaccessmode"`
18-
PvcSize string `json:"pvcsize"`
19-
StorageType string `json:"storagetype"`
20-
FSGROUP string `json:"fsgroup"`
21-
SUPPLEMENTAL_GROUPS string `json:"supplementalgroups"`
43+
Name string `json:"name"`
44+
StorageClass string `json:"storageclass"`
45+
AccessMode string `json:"accessmode"`
46+
Size string `json:"size"`
47+
StorageType string `json:"storagetype"`
48+
Fsgroup string `json:"fsgroup"`
49+
SupplementalGroups string `json:"supplementalgroups"`
2250
}

apis/cr/v1/policy.go

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package v1
2+
13
/*
24
Copyright 2017 Crunchy Data Solutions, Inc.
35
Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,21 +15,22 @@
1315
limitations under the License.
1416
*/
1517

16-
package v1
17-
1818
import (
1919
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2020
)
2121

22+
// PgpolicyResourcePlural ...
2223
const PgpolicyResourcePlural = "pgpolicies"
2324

25+
// PgpolicySpec ...
2426
type PgpolicySpec struct {
2527
Name string `json:"name"`
26-
Url string `json:"url"`
27-
Sql string `json:"sql"`
28+
URL string `json:"url"`
29+
SQL string `json:"sql"`
2830
Status string `json:"status"`
2931
}
3032

33+
// Pgpolicy ...
3134
type Pgpolicy struct {
3235
metav1.TypeMeta `json:",inline"`
3336
metav1.ObjectMeta `json:"metadata"`
@@ -36,21 +39,26 @@ type Pgpolicy struct {
3639
Status PgpolicyStatus `json:"status,omitempty"`
3740
}
3841

42+
// PgpolicyList ...
3943
type PgpolicyList struct {
4044
metav1.TypeMeta `json:",inline"`
4145
metav1.ListMeta `json:"metadata"`
4246

4347
Items []Pgpolicy `json:"items"`
4448
}
4549

50+
// PgpolicyStatus ...
4651
type PgpolicyStatus struct {
4752
State PgpolicyState `json:"state,omitempty"`
4853
Message string `json:"message,omitempty"`
4954
}
5055

56+
// PgpolicyState ...
5157
type PgpolicyState string
5258

5359
const (
54-
PgpolicyStateCreated PgpolicyState = "Created"
60+
// PgpolicyStateCreated ...
61+
PgpolicyStateCreated PgpolicyState = "Created"
62+
// PgpolicyStateProcessed ...
5563
PgpolicyStateProcessed PgpolicyState = "Processed"
5664
)

0 commit comments

Comments
 (0)