Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
🔀 Merge remote-tracking branch 'grdryn/INTLY-4379'
Browse files Browse the repository at this point in the history
  • Loading branch information
grdryn committed Jan 14, 2020
2 parents 3ea5e7a + 9825890 commit 5613587
Show file tree
Hide file tree
Showing 43 changed files with 687 additions and 18,943 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## Unreleased

## [0.5.0] - 2020-01-12
### Added
- New field databaseSecret to UnifiedPushServer CRD spec.

### Removed
- Logic that cleans up DeploymentConfigs & ImageStreams after migration

### Changed
- Reduced permissions given to operator SA, since it no longer uses DC/IS

## [0.4.2] - 2019-12-12
### Fixed
- Re-add POSTGRES_VERSION to secret to allow backup jobs to succeed again
Expand Down
12 changes: 2 additions & 10 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ code/compile: code/gen
.PHONY: test/integration-cover
test/integration-cover:
echo "mode: count" > coverage-all.out
GOCACHE=off $(foreach pkg,$(PACKAGES),\
$(foreach pkg,$(PACKAGES),\
go test -failfast -tags=integration -coverprofile=coverage.out -covermode=count $(addprefix $(PKG)/,$(pkg)) || exit 1;\
tail -n +2 coverage.out >> coverage-all.out;)

Expand Down
15 changes: 1 addition & 14 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import (
enmassev1beta "github.com/enmasseproject/enmasse/pkg/apis/enmasse/v1beta1"
messaginguserv1beta "github.com/enmasseproject/enmasse/pkg/apis/user/v1beta1"
integreatlyv1alpha1 "github.com/integr8ly/grafana-operator/pkg/apis/integreatly/v1alpha1"
openshiftappsv1 "github.com/openshift/api/apps/v1"
imagev1 "github.com/openshift/api/image/v1"
routev1 "github.com/openshift/api/route/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
k8sruntime "k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -131,6 +129,7 @@ func main() {
log.Error(err, "")
os.Exit(1)
}

//Watch AMQ Online Resources
if err := messaginguserv1beta.AddToScheme(mgr.GetScheme()); err != nil {
log.Error(err, "")
Expand All @@ -142,18 +141,6 @@ func main() {
os.Exit(1)
}

// Setup Scheme for OpenShift Apis
if err := openshiftappsv1.AddToScheme(mgr.GetScheme()); err != nil {
log.Error(err, "")
os.Exit(1)
}

// Setup Scheme for OpenShift Image apis
if err := imagev1.AddToScheme(mgr.GetScheme()); err != nil {
log.Error(err, "")
os.Exit(1)
}

// Setup Scheme for Monitoring apis
if err := monitoringv1.AddToScheme(mgr.GetScheme()); err != nil {
log.Error(err, "")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: push.aerogear.org/v1alpha1
kind: UnifiedPushServer
metadata:
name: example-unifiedpushserver
spec:
useMessageBroker: false
externalDB: true
databaseSecret: ext-postgresql
15 changes: 15 additions & 0 deletions deploy/crds/push_v1alpha1_unifiedpushserver_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ spec:
type: object
type: array
database:
description: Database allows specifying the external PostgreSQL details
directly in the CR. Only one of Database or DatabaseSecret should
be specified, and ExternalDB must be true, otherwise a new PostgreSQL
instance will be created (and deleted) on the cluster automatically.
properties:
host:
description: Host for external database support
Expand All @@ -89,6 +93,17 @@ spec:
description: User for external database support
type: string
type: object
databaseSecret:
description: 'DatabaseSecret allows reading the external PostgreSQL
details from a pre-existing Secret (ExternalDB must be true for it
to be used). Only one of Database or DatabaseSecret should be specified,
and ExternalDB must be true, otherwise a new PostgreSQL instance will
be created (and deleted) on the cluster automatically. Here''s an
example of all of the fields that the secret must contain: POSTGRES_DATABASE:
sampledb POSTGRES_HOST: 172.30.139.148 POSTGRES_PORT: "5432" POSTGRES_USERNAME:
userMSM POSTGRES_PASSWORD: RmwWKKIM7or7oJig POSTGRES_SUPERUSER: "false"
POSTGRES_VERSION: "10"'
type: string
externalDB:
description: ExternalDB can be set to true to use details from Database
and connect to external db
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: unifiedpushservers.push.aerogear.org
spec:
group: push.aerogear.org
names:
kind: UnifiedPushServer
listKind: UnifiedPushServerList
plural: unifiedpushservers
shortNames:
- ups
singular: unifiedpushserver
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
backups:
description: Backups is an array of configs that will be used to create
CronJob resource instances
items:
properties:
backendSecretName:
description: BackendSecretName is the name of a secret containing
storage backend details, such as "AWS_S3_BUCKET_NAME", "AWS_ACCESS_KEY_ID",
and "AWS_SECRET_ACCESS_KEY"
type: string
backendSecretNamespace:
description: BackendSecretNamespace is the name of the namespace
that the secret referenced in BackendSecretName resides in
type: string
encryptionKeySecretName:
description: EncryptionKeySecretName is the name of a secret containing
PGP/GPG details, including "GPG_PUBLIC_KEY", "GPG_TRUST_MODEL",
and "GPG_RECIPIENT"
type: string
encryptionKeySecretNamespace:
description: EncryptionKeySecretNamespace is the name of the namespace
that the secret referenced in EncryptionKeySecretName resides
in
type: string
name:
description: Name is the name that will be given to the resulting
CronJob
type: string
schedule:
description: Schedule is the schedule that the job will be run
at, in cron format
type: string
required:
- name
- schedule
- backendSecretName
type: object
type: array
database:
description: Database allows specifying the external PostgreSQL details
directly in the CR. Only one of Database or DatabaseSecret should
be specified, and ExternalDB must be true, otherwise a new PostgreSQL
instance will be created (and deleted) on the cluster automatically.
properties:
host:
description: Host for external database support
type: string
name:
description: Name for external database support
type: string
password:
description: Password for external database support
type: string
port:
anyOf:
- type: string
- type: integer
description: Port for external database support
user:
description: User for external database support
type: string
type: object
databaseSecret:
description: 'DatabaseSecret allows reading the external PostgreSQL
details from a pre-existing Secret (ExternalDB must be true for it
to be used). Only one of Database or DatabaseSecret should be specified,
and ExternalDB must be true, otherwise a new PostgreSQL instance will
be created (and deleted) on the cluster automatically. Here''s an
example of all of the fields that the secret must contain: POSTGRES_DATABASE:
sampledb POSTGRES_HOST: 172.30.139.148 POSTGRES_PORT: "5432" POSTGRES_USERNAME:
userMSM POSTGRES_PASSWORD: RmwWKKIM7or7oJig POSTGRES_SUPERUSER: "false"
POSTGRES_VERSION: "10"'
type: string
externalDB:
description: ExternalDB can be set to true to use details from Database
and connect to external db
type: boolean
oAuthResourceRequirements:
type: object
postgresPVCSize:
description: PVC size for Postgres service
type: string
postgresResourceRequirements:
type: object
unifiedPushResourceRequirements:
type: object
useMessageBroker:
description: UseMessageBroker can be set to true to use managed queues,
if you are using enmasse. Defaults to false.
type: boolean
type: object
status:
properties:
message:
description: Message is a more human-readable message indicating details
about current phase or error.
type: string
phase:
description: Phase indicates whether the CR is reconciling(good), failing(bad),
or initializing.
type: string
ready:
description: Ready is True if all resources are in a ready state and
all work is done (phase should be "reconciling"). The type in the
Go code here is deliberately a pointer so that we can distinguish
between false and "not set", since it's an optional field.
type: boolean
secondaryResources:
additionalProperties:
items:
type: string
type: array
description: 'SecondaryResources is a map of all the secondary resources
types and names created for this CR. e.g "Deployment": [ "DeploymentName1",
"DeploymentName2" ]'
type: object
required:
- phase
type: object
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
Loading

0 comments on commit 5613587

Please sign in to comment.