Skip to content

Commit

Permalink
wip: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljackson committed Nov 14, 2019
1 parent 5ea96c8 commit c03e606
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
26 changes: 20 additions & 6 deletions deploy/crds/mattermost_v1alpha1_clusterinstallation_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,20 @@ spec:
description: Defines the backup retention policy.
type: string
backupRestoreSecretName:
description: Defines the secret to be used for uploading/restoring
backup.
description: Defines the secret to be used when performing a database
restore.
type: string
backupSchedule:
description: Defines the interval for backups in cron expression
format.
type: string
backupSecretName:
description: Defines the secret to be used for uploading/restoring
backup.
type: string
backupURL:
description: Defines the object storage url for uploading backups.
type: string
secret:
description: If the user wants to use an existing Secret or an external DB.
This can be inside the same k8s cluster or outside like AWS RDS
type: string
initBucketURL:
description: Defines the AWS S3 bucket where the Database Backup
is stored. The operator will download the file to restore the
Expand All @@ -171,6 +171,20 @@ spec:
description: Defines the resource requests and limits for the database
pods.
type: object
secret:
description: 'Optionally enter the name of an already-existing Secret
for connecting to the database. This secret should be configured
as follows: User-Managed Database - Key: DB_CONNECTION_STRING
| Value: <FULL_DATABASE_CONNECTION_STRING> Operator-Managed Database -
Key: ROOT_PASSWORD | Value: <ROOT_DATABASE_PASSWORD> - Key:
USER | Value: <USER_NAME> - Key: PASSWORD | Value: <USER_PASSWORD> -
Key: DATABASE Value: <DATABASE_NAME> Notes: If you define all
secret values for both User-Managed and Operator-Managed database
types, the User-Managed connection string will take precedence
and the Operator-Managed values will be ignored. If the secret
is left blank, the default behavior is to use an Operator-Managed database
with strong randomly-generated database credentials.'
type: string
storageSize:
description: Defines the storage size for the database. ie 50Gi
pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/clusterinstallation/mattermost.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (r *ReconcileClusterInstallation) checkMattermostDeployment(mattermost *mat
}
} else {
foundSecret := &corev1.Secret{}
err := r.client.Get(context.TODO(), types.NamespacedName{Name: mattermost.Spec.Database.Secret, Namespace: mattermost.Namespace}, foundSecret)
err = r.client.Get(context.TODO(), types.NamespacedName{Name: mattermost.Spec.Database.Secret, Namespace: mattermost.Namespace}, foundSecret)
if err != nil {
return errors.Wrap(err, "error getting database secret")
}
Expand Down

0 comments on commit c03e606

Please sign in to comment.