diff --git a/CHANGELOG.md b/CHANGELOG.md index 9716743b..5054a734 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Unreleased +## [0.4.1] - 2019-12-11 +### Fixed +- UnifiedPushDatabaseDown alert always fired if using external database + ## [0.4.0] - 2019-12-03 ### Added - UnifiedpushServer CRs can contain coordinates for an external PostgreSQL database diff --git a/deploy/olm-catalog/unifiedpush-operator/0.4.1/push_v1alpha1_unifiedpushserver_crd.yaml b/deploy/olm-catalog/unifiedpush-operator/0.4.1/push_v1alpha1_unifiedpushserver_crd.yaml new file mode 100644 index 00000000..60c959ac --- /dev/null +++ b/deploy/olm-catalog/unifiedpush-operator/0.4.1/push_v1alpha1_unifiedpushserver_crd.yaml @@ -0,0 +1,142 @@ +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: + 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 + 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 diff --git a/deploy/olm-catalog/unifiedpush-operator/0.4.1/unifiedpush-operator.v0.4.1.clusterserviceversion.yaml b/deploy/olm-catalog/unifiedpush-operator/0.4.1/unifiedpush-operator.v0.4.1.clusterserviceversion.yaml new file mode 100644 index 00000000..25e237cd --- /dev/null +++ b/deploy/olm-catalog/unifiedpush-operator/0.4.1/unifiedpush-operator.v0.4.1.clusterserviceversion.yaml @@ -0,0 +1,260 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: '[{"apiVersion":"push.aerogear.org/v1alpha1","kind":"UnifiedPushServer","metadata":{"name":"example-unifiedpushserver"},"spec":{"useMessageBroker":false}},{"apiVersion":"push.aerogear.org/v1alpha1","kind":"UnifiedPushServer","metadata":{"name":"example-ups-with-backups"},"spec":{"backups":[{"backendSecretName":"example-aws-key","backendSecretNamespace":"unifiedpush","encryptionKeySecretName":"example-encryption-key","encryptionKeySecretNamespace":"unifiedpush","name":"ups-daily-at-midnight","schedule":"0 + 0 * * *"}]}},{"apiVersion":"push.aerogear.org/v1alpha1","kind":"UnifiedPushServer","metadata":{"name":"ups-with-enmasse"},"spec":{"useMessageBroker":true}},{"apiVersion":"push.aerogear.org/v1alpha1","kind":"UnifiedPushServer","metadata":{"name":"example-unifiedpushserver"},"spec":{"database":{"host":"example-host","name":"example-name","password":"password","port":5432,"user":"user"},"externalDB":true,"useMessageBroker":false}},{"apiVersion":"push.aerogear.org/v1alpha1","kind":"UnifiedPushServer","metadata":{"name":"example-unifiedpushserver"},"spec":{"oAuthResourceRequirements":{"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"50m","memory":"64Mi"}},"postgresPVCSize":"10Gi","postgresResourceRequirements":{"limits":{"cpu":"2","memory":"2Gi"},"requests":{"cpu":"1","memory":"1Gi"}},"unifiedPushResourceRequirements":{"limits":{"cpu":"2","memory":"3Gi"},"requests":{"cpu":"1","memory":"1Gi"}}}}]' + capabilities: Basic Install + name: unifiedpush-operator.v0.4.1 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: Represents an AeroGear UnifiedPush Server + displayName: UnifiedPush Server + kind: UnifiedPushServer + name: unifiedpushservers.push.aerogear.org + version: v1alpha1 + description: The UnifiedPush Operator for Kubernetes provides an easy way to install + and manage an AeroGear UnifiedPush Server on OpenShift. + displayName: UnifiedPush Operator + icon: + - base64data: iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAABYlAAAWJQFJUiTwAAAVBklEQVR4nO2dfWyV133Hv+deG2OCY/MyAgTHbmCRyYviKKwNajfcTUqkSRNGCorS/WGzalX/2WSWSlPVpJClVdsp2Zz9s0rTFPNPt5RJwDptTaQOI7UNaohiWha8qAl27MJKeDM2+PXeM/2uz4Hre57n3uf97f4+0hXwnGvuvY/98e/lnOc8QkoJJlhGO0QbgG4Aneqh/w3198c9vuBZADfU30fU38fUY6RrXN4wvoLxBQvik9EO0aN++LUQe2J+S6e0MEqaYeMZjGNYEBeMdggSoEc9un1Egqg5q4QhWYa7xuVYSt537LAgVVCpEsnQq/7ssH92qhhXshxXwnBqZgMLUoGKElqIvcYTsskJLQxHl5WwIHcjBUkxkKK0KSwoHRtUstR9ZKlrQUY7BEnRX0eRwi0UWYa6xuXxdL3t4Kg7QVQK1a8eWakpwoZqliElS12lYHUjyGiH6FYpVJ8xyLjhCKVgXeNypB7OWuYFUfMUhxMwP5E1aL7lcNbnWTIrCIsRGZkWJXOCsBixkUlRMiOIKr4HuSMVO9T5GshKMZ96QdQcBhXfh4xBJk5eVsV8qudSUi2ImscY5HZtYhlX0SS18yipFESlU0NcZ6QGqk/605h25YwjCWe0QwyolaksR3qg79WI+t6litREEI4amSFV0SQVEUTVGhw1soGOJr1p+DSJjiCqQzXIy0MyyxFVxCe205VYQdTaqSFefp55zqqUK5FruxKZYqnwO8xy1AX0PR5OasqVOEFGOwQtEzkGoNUYZLIKfa+Pqe99okhMisX1BqNIVF2SCEGUHJxSMRqqS3qSIEnsKZaa32A5mHJ0XdIZ91mJNYKoTtUw1xuMDVMqksTW4YotgrAcjANaVSTpjutkxSIIy8G4IFZJIheE5WA80DpTxOkz7eK5qE9epDUIy8F4YboAzElAAHJ1Ds/vmpBvRnUiI4sgLAfjBS0HQY7MFfEvUUaSSCKIate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AoSZYkfrIgsd0YZOqGsNdWuSUxgmh+sU0Mz8t49tpi4iXMVbleia1It4NOEO2Ex8V7/UDfa/qeJ00OJDGCaM60i+cWJN7guiTbUL1BVwLG2amqRmIFAdclmYfqDVqunoRi3I5EC6I50y6+M1fEX8tSNGbSjprf+J7XDaWjJBWCQM2XLEj8aEmizRhkUgPteEibusU9v+GU1AiieXebODYvsZejSbpQ13Cc+L1JuS9Nbzx1goCjSepIW9QoJ5WCaKg2mS/ia0WgwRhkYofu7NSUw6tpqDXsSLUgUJ2ugsQRnlxMFjTplxfoS3KHygmpF0RDadeixNFFic3GIBMZdKtluptsGtMpKzIjiOZMuxhYlDjE9Um0UJ1BN+l3ex/ypJM5QTQsSjRkVQxNZgXRsCjhkHUxNJkXRENruwoS3+ZlK/6g5SF5gW8kde1U0NSNIBoq5gsS31qU+Dy3h51B7dpGgZ/lBV7MSvHtlLoTpByaR1mS6OfOlzXUkWoQGErzPIZf6loQDc2lFIGXFiW+VO/L62n5eaPAD3LAK2mfwwgCFqQCSsGKEi8UgKfqJbJQpMgDp3MCr9VbClULFqQKFFkk8NWCxP4liY6s1CxUUzQIjOcFjgrg+xwp7GFBXFCKLkB/UaKnAGxNSzpGaVMeuJgTGM4BQxwlnMOC+ITmWaTEniLwWBHYEPd8C81P5ICrOeBXQuBU1ucpwoYFCQGVmu2TwKNSYocEWotAJ72SBJq8Rh6KBAKYx3KaNCaAKSHwawGcE8AxTpUCBsD/A64FlTxHWoHIAAAAAElFTkSuQmCC + mediatype: image/png + install: + spec: + deployments: + - name: unifiedpush-operator + spec: + replicas: 1 + selector: + matchLabels: + name: unifiedpush-operator + strategy: {} + template: + metadata: + labels: + name: unifiedpush-operator + spec: + containers: + - command: + - unifiedpush-operator + env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: unifiedpush-operator + image: quay.io/aerogear/unifiedpush-operator:0.4.1 + imagePullPolicy: Always + name: unifiedpush-operator + resources: + limits: + cpu: 60m + memory: 128Mi + requests: + cpu: 30m + memory: 64Mi + serviceAccountName: unifiedpush-operator + permissions: + - rules: + - apiGroups: + - push.aerogear.org + resources: + - unifiedpushservers + - unifiedpushservers/status + - unifiedpushservers/finalizers + verbs: + - get + - list + - watch + - update + - apiGroups: + - "" + resources: + - services + - services/finalizers + - persistentvolumeclaims + - events + - configmaps + - secrets + - serviceaccounts + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - batch + resources: + - cronjobs + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - route.openshift.io + resources: + - routes + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - image.openshift.io + resources: + - imagestreams + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - apps.openshift.io + resources: + - deploymentconfigs + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - apps + resourceNames: + - unifiedpush-operator + resources: + - deployments/finalizers + verbs: + - update + - patch + - apiGroups: + - "" + resources: + - pods + verbs: + - get + - apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - apiGroups: + - enmasse.io + resources: + - addresses + - addressspaces + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - enmasse.io + resources: + - addressspaceschemas + verbs: + - get + - list + - apiGroups: + - user.enmasse.io + resources: + - messagingusers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + - prometheusrules + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - integreatly.org + resources: + - grafanadashboards + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + serviceAccountName: unifiedpush-operator + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - AeroGear + - Push + - UPS + - Mobile + links: + - name: AeroGear + url: https://aerogear.org/ + maintainers: + - email: aerogear@googlegroups.com + name: AeroGear + maturity: alpha + provider: + name: AeroGear + replaces: unifiedpush-operator.v0.4.0 + version: 0.4.1 diff --git a/deploy/olm-catalog/unifiedpush-operator/unifiedpush-operator.package.yaml b/deploy/olm-catalog/unifiedpush-operator/unifiedpush-operator.package.yaml index 5a8d41fc..0613b705 100644 --- a/deploy/olm-catalog/unifiedpush-operator/unifiedpush-operator.package.yaml +++ b/deploy/olm-catalog/unifiedpush-operator/unifiedpush-operator.package.yaml @@ -1,5 +1,5 @@ channels: -- currentCSV: unifiedpush-operator.v0.4.0 +- currentCSV: unifiedpush-operator.v0.4.1 name: stable defaultChannel: stable packageName: unifiedpush-operator diff --git a/deploy/operator.yaml b/deploy/operator.yaml index ae359883..b01082b0 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -16,7 +16,7 @@ spec: containers: - name: unifiedpush-operator # Replace this with the built image name - image: quay.io/aerogear/unifiedpush-operator:0.4.0 + image: quay.io/aerogear/unifiedpush-operator:0.4.1 command: - unifiedpush-operator imagePullPolicy: Always diff --git a/pkg/controller/unifiedpushserver/unifiedpushserver.go b/pkg/controller/unifiedpushserver/unifiedpushserver.go index 37080be0..4df6703d 100644 --- a/pkg/controller/unifiedpushserver/unifiedpushserver.go +++ b/pkg/controller/unifiedpushserver/unifiedpushserver.go @@ -407,16 +407,6 @@ func reconcilePrometheusRule(prometheusRule *monitoringv1.PrometheusRule, cr *pu Labels: critical, Annotations: unifiedPushConsoleDownAnnotations, }, - { - Alert: "UnifiedPushDatabaseDown", - Expr: intstr.IntOrString{ - Type: intstr.String, - StrVal: fmt.Sprintf("absent(kube_pod_container_status_running{namespace=\"%s\",container=\"postgresql\"} == 1)", namespace), - }, - For: "5m", - Labels: critical, - Annotations: unifiedPushDatabaseDownAnnotations, - }, { Alert: "UnifiedPushJavaHeapThresholdExceeded", Expr: intstr.IntOrString{ @@ -471,6 +461,22 @@ func reconcilePrometheusRule(prometheusRule *monitoringv1.PrometheusRule, cr *pu }, }, } + + // Don't add UnifiedPushDatabaseDown rule if there's no Postgresql + if !cr.Spec.ExternalDB { + rule := monitoringv1.Rule{ + Alert: "UnifiedPushDatabaseDown", + Expr: intstr.IntOrString{ + Type: intstr.String, + StrVal: fmt.Sprintf("absent(kube_pod_container_status_running{namespace=\"%s\",container=\"postgresql\"} == 1)", namespace), + }, + For: "5m", + Labels: critical, + Annotations: unifiedPushDatabaseDownAnnotations, + } + + prometheusRule.Spec.Groups[0].Rules = append(prometheusRule.Spec.Groups[0].Rules, rule) + } } func reconcileServiceMonitor(serviceMonitor *monitoringv1.ServiceMonitor) { diff --git a/version/version.go b/version/version.go index ea6f0bcf..64c7cd26 100644 --- a/version/version.go +++ b/version/version.go @@ -1,5 +1,5 @@ package version var ( - Version = "0.4.0" + Version = "0.4.1" )