Merge branch 'master' into pooler-deployment-label-selector-test
This commit is contained in:
commit
add50fd009
|
|
@ -0,0 +1,24 @@
|
||||||
|
name: ubuntu
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: "^1.15.5"
|
||||||
|
- name: Make dependencies
|
||||||
|
run: make deps
|
||||||
|
- name: Compile
|
||||||
|
run: make linux
|
||||||
|
- name: Run unit tests
|
||||||
|
run: go test ./...
|
||||||
|
- name: Run end-2-end tests
|
||||||
|
run: make e2e
|
||||||
23
.travis.yml
23
.travis.yml
|
|
@ -1,23 +0,0 @@
|
||||||
dist: trusty
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
language: go
|
|
||||||
|
|
||||||
go:
|
|
||||||
- "1.14.x"
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- go get github.com/mattn/goveralls
|
|
||||||
|
|
||||||
install:
|
|
||||||
- make deps
|
|
||||||
|
|
||||||
script:
|
|
||||||
- hack/verify-codegen.sh
|
|
||||||
- travis_wait 20 go test -race -covermode atomic -coverprofile=profile.cov ./pkg/... -v
|
|
||||||
- goveralls -coverprofile=profile.cov -service=travis-ci -v
|
|
||||||
- make e2e
|
|
||||||
|
|
@ -1,11 +1,5 @@
|
||||||
# Postgres Operator
|
# Postgres Operator
|
||||||
|
|
||||||
[](https://travis-ci.org/zalando/postgres-operator)
|
|
||||||
[](https://coveralls.io/github/zalando/postgres-operator)
|
|
||||||
[](https://goreportcard.com/report/github.com/zalando/postgres-operator)
|
|
||||||
[](https://godoc.org/github.com/zalando/postgres-operator)
|
|
||||||
[](https://golangci.com/r/github.com/zalando/postgres-operator)
|
|
||||||
|
|
||||||
<img src="docs/diagrams/logo.png" width="200">
|
<img src="docs/diagrams/logo.png" width="200">
|
||||||
|
|
||||||
The Postgres Operator delivers an easy to run highly-available [PostgreSQL](https://www.postgresql.org/)
|
The Postgres Operator delivers an easy to run highly-available [PostgreSQL](https://www.postgresql.org/)
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ spec:
|
||||||
singular: operatorconfiguration
|
singular: operatorconfiguration
|
||||||
shortNames:
|
shortNames:
|
||||||
- opconfig
|
- opconfig
|
||||||
|
categories:
|
||||||
|
- all
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
versions:
|
versions:
|
||||||
- name: v1
|
- name: v1
|
||||||
|
|
@ -45,6 +47,7 @@ spec:
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
type: object
|
type: object
|
||||||
|
x-preserve-unknown-fields: true
|
||||||
required:
|
required:
|
||||||
- kind
|
- kind
|
||||||
- apiVersion
|
- apiVersion
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ spec:
|
||||||
singular: postgresql
|
singular: postgresql
|
||||||
shortNames:
|
shortNames:
|
||||||
- pg
|
- pg
|
||||||
|
categories:
|
||||||
|
- all
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
versions:
|
versions:
|
||||||
- name: v1
|
- name: v1
|
||||||
|
|
@ -57,6 +59,7 @@ spec:
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
type: object
|
type: object
|
||||||
|
x-preserve-unknown-fields: true
|
||||||
required:
|
required:
|
||||||
- kind
|
- kind
|
||||||
- apiVersion
|
- apiVersion
|
||||||
|
|
@ -320,6 +323,7 @@ spec:
|
||||||
- "10"
|
- "10"
|
||||||
- "11"
|
- "11"
|
||||||
- "12"
|
- "12"
|
||||||
|
- "13"
|
||||||
parameters:
|
parameters:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ spec:
|
||||||
singular: postgresteam
|
singular: postgresteam
|
||||||
shortNames:
|
shortNames:
|
||||||
- pgteam
|
- pgteam
|
||||||
|
categories:
|
||||||
|
- all
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
versions:
|
versions:
|
||||||
- name: v1
|
- name: v1
|
||||||
|
|
@ -25,6 +27,7 @@ spec:
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
type: object
|
type: object
|
||||||
|
x-preserve-unknown-fields: true
|
||||||
required:
|
required:
|
||||||
- kind
|
- kind
|
||||||
- apiVersion
|
- apiVersion
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ pipeline:
|
||||||
- desc: 'Install go'
|
- desc: 'Install go'
|
||||||
cmd: |
|
cmd: |
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget -q https://storage.googleapis.com/golang/go1.14.7.linux-amd64.tar.gz -O go.tar.gz
|
wget -q https://storage.googleapis.com/golang/go1.15.5.linux-amd64.tar.gz -O go.tar.gz
|
||||||
tar -xf go.tar.gz
|
tar -xf go.tar.gz
|
||||||
mv go /usr/local
|
mv go /usr/local
|
||||||
ln -s /usr/local/go/bin/go /usr/bin/go
|
ln -s /usr/local/go/bin/go /usr/bin/go
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ spec:
|
||||||
singular: operatorconfiguration
|
singular: operatorconfiguration
|
||||||
shortNames:
|
shortNames:
|
||||||
- opconfig
|
- opconfig
|
||||||
|
categories:
|
||||||
|
- all
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
versions:
|
versions:
|
||||||
- name: v1
|
- name: v1
|
||||||
|
|
@ -41,6 +43,7 @@ spec:
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
type: object
|
type: object
|
||||||
|
x-preserve-unknown-fields: true
|
||||||
required:
|
required:
|
||||||
- kind
|
- kind
|
||||||
- apiVersion
|
- apiVersion
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ spec:
|
||||||
singular: postgresql
|
singular: postgresql
|
||||||
shortNames:
|
shortNames:
|
||||||
- pg
|
- pg
|
||||||
|
categories:
|
||||||
|
- all
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
versions:
|
versions:
|
||||||
- name: v1
|
- name: v1
|
||||||
|
|
@ -53,6 +55,7 @@ spec:
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
type: object
|
type: object
|
||||||
|
x-preserve-unknown-fields: true
|
||||||
required:
|
required:
|
||||||
- kind
|
- kind
|
||||||
- apiVersion
|
- apiVersion
|
||||||
|
|
@ -316,6 +319,7 @@ spec:
|
||||||
- "10"
|
- "10"
|
||||||
- "11"
|
- "11"
|
||||||
- "12"
|
- "12"
|
||||||
|
- "13"
|
||||||
parameters:
|
parameters:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ spec:
|
||||||
singular: postgresteam
|
singular: postgresteam
|
||||||
shortNames:
|
shortNames:
|
||||||
- pgteam
|
- pgteam
|
||||||
|
categories:
|
||||||
|
- all
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
versions:
|
versions:
|
||||||
- name: v1
|
- name: v1
|
||||||
|
|
@ -21,6 +23,7 @@ spec:
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
type: object
|
type: object
|
||||||
|
x-preserve-unknown-fields: true
|
||||||
required:
|
required:
|
||||||
- kind
|
- kind
|
||||||
- apiVersion
|
- apiVersion
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
acidzalando "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do"
|
acidzalando "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do"
|
||||||
|
"github.com/zalando/postgres-operator/pkg/util"
|
||||||
apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
|
@ -111,8 +112,9 @@ var minDisable = -1.0
|
||||||
// PostgresCRDResourceValidation to check applied manifest parameters
|
// PostgresCRDResourceValidation to check applied manifest parameters
|
||||||
var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
|
var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
|
||||||
OpenAPIV3Schema: &apiextv1.JSONSchemaProps{
|
OpenAPIV3Schema: &apiextv1.JSONSchemaProps{
|
||||||
Type: "object",
|
Type: "object",
|
||||||
Required: []string{"kind", "apiVersion", "spec"},
|
XPreserveUnknownFields: util.True(),
|
||||||
|
Required: []string{"kind", "apiVersion", "spec"},
|
||||||
Properties: map[string]apiextv1.JSONSchemaProps{
|
Properties: map[string]apiextv1.JSONSchemaProps{
|
||||||
"kind": {
|
"kind": {
|
||||||
Type: "string",
|
Type: "string",
|
||||||
|
|
@ -412,6 +414,9 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
|
||||||
{
|
{
|
||||||
Raw: []byte(`"12"`),
|
Raw: []byte(`"12"`),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Raw: []byte(`"13"`),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"parameters": {
|
"parameters": {
|
||||||
|
|
@ -779,8 +784,9 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
|
||||||
// OperatorConfigCRDResourceValidation to check applied manifest parameters
|
// OperatorConfigCRDResourceValidation to check applied manifest parameters
|
||||||
var OperatorConfigCRDResourceValidation = apiextv1.CustomResourceValidation{
|
var OperatorConfigCRDResourceValidation = apiextv1.CustomResourceValidation{
|
||||||
OpenAPIV3Schema: &apiextv1.JSONSchemaProps{
|
OpenAPIV3Schema: &apiextv1.JSONSchemaProps{
|
||||||
Type: "object",
|
Type: "object",
|
||||||
Required: []string{"kind", "apiVersion", "configuration"},
|
XPreserveUnknownFields: util.True(),
|
||||||
|
Required: []string{"kind", "apiVersion", "configuration"},
|
||||||
Properties: map[string]apiextv1.JSONSchemaProps{
|
Properties: map[string]apiextv1.JSONSchemaProps{
|
||||||
"kind": {
|
"kind": {
|
||||||
Type: "string",
|
Type: "string",
|
||||||
|
|
@ -1394,6 +1400,7 @@ func buildCRD(name, kind, plural, short string, columns []apiextv1.CustomResourc
|
||||||
Plural: plural,
|
Plural: plural,
|
||||||
ShortNames: []string{short},
|
ShortNames: []string{short},
|
||||||
Kind: kind,
|
Kind: kind,
|
||||||
|
Categories: []string{"all"},
|
||||||
},
|
},
|
||||||
Scope: apiextv1.NamespaceScoped,
|
Scope: apiextv1.NamespaceScoped,
|
||||||
Versions: []apiextv1.CustomResourceDefinitionVersion{
|
Versions: []apiextv1.CustomResourceDefinitionVersion{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue